lyft

command module
v0.0.0-...-af53dfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2020 License: BSD-3-Clause Imports: 23 Imported by: 0

README

lyft

GoDoc Build Status

Create and manage Lyft rides from the command line.

# Install
go get github.com/nishanths/lyft

# Set up env vars (see 'Setup' heading below)
export GOOG_GEOCODE_KEY=<key>
export LYFT_CLIENT_ID=<key>
export LYFT_CLIENT_SECRET=<key>

# Manage rides
lyft ride create
lyft ride cancel <ride-id>
lyft ride status <ride-id>

# Save places for future use when creating rides
lyft place add    <name>
lyft place remove <name>...
lyft place show   [name]

# Help
lyft -help # or https://godoc.org/github.com/nishanths/lyft

Lyft Line isn't available on Lyft's web application (October 2017), but this program can help you order Line rides from your computer.

Setup

The program uses the following environment variables.

GOOG_GEOCODE_KEY
LYFT_CLIENT_ID
LYFT_CLIENT_SECRET

Refer to the Setup section in godoc to set these up.

Example

License

BSD 3-Clause.

Built with lyft-go.

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.

  1. Latitude/longitude pair in the format "lat,lng"
  2. 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.

  1. Sign in at https://www.lyft.com/developers/apps/new.
  2. Create a new app. Enter any values for the app name and description.
  3. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL