Ubuntu / Linux news and application reviews.

uber logo

Uber CLI is a tool to get time-to-pickup and price estimates for Uber from the command line. The application cannot be used to request Uber rides.

This is useful if you use Uber and the command line a lot, as it's much faster than checking these details on your phone, especially if you create some Bash aliases for your home address and the places you frequently use Uber to get to.

The developer says that he created Uber CLI because "[...] as a lazy person it pains me every time [I] open my phone, open the Uber app, type my destination, and see the estimated price, only for my inner, responsible, cost-cutting, fiduciary-self to end up taking the bus all the way home. I think we can all agree that it would be much more efficient to simply be disappointed before I open my phone at all".


Installing and using Uber CLI


1. To install Uber CLI, you'll need Node.js and npm.

For Ubuntu 16.04 and newer, you can use the Node.js and npm packages from the official repositories:
sudo apt install nodejs npm

For Ubuntu versions older than 16.04, you'll need a newer Node.js/npm version. This can be installed by using the official Node.js repository. You'll find exact instructions HERE (in my test I installed Node.js 6.x in Ubuntu 14.04 and uber-cli installed without any issues).

2. Install Uber CLI

Before proceeding, you may wish to set up npm to allow installing packages globally without sudo. For how to do this, see our previous article. You can skip this and use the command below with sudo, but that's not recommended!

To install Uber CLI, simply type the following command in a terminal:
npm install uber-cli -g

That's it. You can now start using Uber CLI. To get a time-to-pickup estimate, use the following command:
uber time 'pickup address'
replacing 'pickup address' with the address the Uber ride should pick you up.

Here's an example:
$ uber time '10 downing street london uk'
┌───────────────────────────────────────────────────┐
│  10 Downing St, Westminster, London SW1A 2AA, UK  │
├──────────────────┬────────────────────────────────┤
│                  │                                │
├──────────────────┼────────────────────────────────┤
│ 2 min.           │ uberPOOL,uberX,uberXL          │
├──────────────────┼────────────────────────────────┤
│ 4 min.           │ UberEXEC                       │
├──────────────────┼────────────────────────────────┤
│ 6 min.           │ UberLUX                        │
├──────────────────┼────────────────────────────────┤
│ 8 min.           │ uberASSIST                     │
├──────────────────┼────────────────────────────────┤
│ 17 min.          │ uberWAV                        │
├──────────────────┼────────────────────────────────┤
│ 14 min.          │ taxi                           │
└──────────────────┴────────────────────────────────┘

You may skip the city and country - in my test, this worked without any issues, but I assume it is required in cases where there are multiple streets with the same name, etc.

To get price estimates, use the following:
uber price -s 'start address' -e 'end address'
replacing the start and end addresses with the actual locations.

Here's an example:
$ uber price -s '10 downing street london uk' -e '221b baker street london uk'
┌────────────┬───────────────────────┬──────────┬─────────┬──────────┐
│            │                       │          │         │  Surge   │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ uberPOOL   │ £10-£11               │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ uberX      │ £9-£12                │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ uberXL     │ £13-£17               │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ UberEXEC   │ £17-£23               │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ UberLUX    │ £27-£35               │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ uberASSIST │ £9-£12                │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ uberWAV    │ £9-£12                │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┼──────────┼─────────┼──────────┤
│ taxi       │ ?undefined-?undefined │ 3.74 mi. │ 20 min. │          │
├────────────┼───────────────────────┴──────────┴─────────┴──────────┤
│            │ 10 Downing St, Westminster, London SW1A 2AA, UK       │
├────────────┼───────────────────────────────────────────────────────┤
│            │ 221B Baker St, Marylebone, London NW1 6XE, UK         │
└────────────┴───────────────────────────────────────────────────────┘

The blank cells in the examples above are Emoji, but I removed them so the columns don't get messed up. To get Emoji support in Linux, install the EmojiOne Color SVGinOT font (but note that it doesn't work properly with monospace formatted text and causes incorrect character alignment, or at least that's the case at the time I'm writing this).

app seen @ desdelinux.net