Documentation
¶
Overview ¶
Command lyft can request and manage Lyft rides from the command line.
Usage
lyft [flags] [ride|place] [subcommand args...]
Flags ¶
The command's optional flags are:
-type <ride-type> Ride type: line, lyft, premier, lux, or luxsuv (default line). -dry-run Dry-run; don't actually create or modify rides (default false). -to <place> Use saved place as the end location for the ride. -notify Show desktop notifications (default false), macOS only. -from <place> Use saved place as the start location for the ride. -watch Watch ride status updates (default false).
Ride subcommand ¶
The ride subcommand can create, cancel, and track the status of rides.
lyft ride create lyft ride cancel <ride-id> lyft ride status <ride-id>
Place subcommand ¶
The place subcommand can save ride start and end locations for future use, so you don't have to enter full addresses each time you create a ride. If a name isn't specified, the show subcommand prints all saved places.
lyft place add <name> lyft place remove <name>... lyft place show [name]
Location input ¶
When prompted to enter a start or an end location, the input can be in these two formats.
- Latitude/longitude pair in the format "lat,lng"
- Street address
Setup ¶
The program uses the following environment variables.
GOOG_GEOCODE_KEY LYFT_CLIENT_ID LYFT_CLIENT_SECRET
GOOG_GEOCODE_KEY is the Google Maps Geocode API key used to geocode street addresses. It can be obtained from:
https://developers.google.com/maps/documentation/geocoding/get-api-key
The Lyft API keys can be obtained by following these steps.
- Sign in at https://www.lyft.com/developers/apps/new.
- Create a new app. Enter any values for the app name and description.
- Enter any unused local URL (e.g. http://localhost:90) for the Redirect URL.
(The first time you request a ride, the program will request authorization to create rides on your behalf. Follow the instructions printed on screen. You will only have to do this once.)
Notes ¶
Only one passenger is supported for Lyft Line rides requested by the program.
You will receive notifications via your smartphone's Lyft app as you usual for rides created by this program, so you can skip the -notify and -watch flags if you wish.
The program stores program-relevant data in a directory named ".lyft" in the user's home directory.