
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Helping terminal users find their way.
The terminal alone can achieve so much, so why leave it for directions or durations to various locations? Rather than tabbing to a browser to look up directions to the newest restaurant or the time it takes to reach the babysitter, way-cli
aims to assist in speeding a terminal user's locational needs.
npm i way-cli -g
This project is powered by the Google Maps Platform. The project does not supply an API Key. Click here to generate your Google Maps API key.
After creating your API Key create a .env
file at the root of the installed package. Edit your environment file to contain:
API_KEY=<API_KEY>
-a, --avoid <avoid>
Options: (defaults to null
)
tolls
highways
ferries
indoor
Adds restrictions to the route as an option to distance
command. Only a single restriction can be applied as an option.
-h, --help
Displays help information.
Usage: way-cli [options] [command]
Options:
-v, --version output the version number
-m, --mode <mode> Mode of transportation preference. Options: driving, walking, biycling, or transit (directions command only) (default: driving)
-u, --unit <unit> Return results in either metric or imperial units (default: metric)
-a, --avoid <avoid> Avoidance preferences. Options: tolls, highways, ferries, indoor (default: null)
-i, --interactive Performs command as interactive interface
-h, --help output usage information
Commands:
save|s [place] [alias] Save a location as an alias for optional <origins> or <destinations> arguements. If the alias already exists the aliases will be updated.
delete|del [alias] Remove an alias.
list|l List all saved aliases.
distance|dist [origins] [destinations] Creates a distance matrix between <origins> and <destinations>
directions|dir [origin] [destination] Outputs a Google Maps direction URL for copy/pasta ease
-i, --interactive
Executes the command in interactive mode to assist user interaction. Command arguements and options are presented via Inquirer prompt.
-m, --mode <mode>
Options:
bicycling
driving (default)
transit
directions
command.walking
Specify the mode of transportation/travel for either directions
or distance
commands.
-u, --unit <unit>
Options:
imperial
metric (default)
Specify the unit of results for the distance
command.
-v, --version
Ouputs the version of the cli.
delete || del [alias]
Deletes the specified alias
from aliases.json
if the alias exists.
directions || dir [origin] [destination] <options>
Arguements:
origin
'123 abc street, new york, new york'
or mall
if aliaseddestination
origin
arguement above for example inputoptions
Returns a Google Maps Direction URL. Terminals such as iTerm2 will allow clicking the output and opening the directions into a browser seemlessly.
distance || dist [origins] [destinations] <options>
Arguements:
origins
origins
, utilize the pipe (|
) character.
'123 abc street, new york|678 def st, new jersey'
aliases
will be honored.destinations
origins
arguement above for example inputoptions
Returns a Google Maps Distance Matrix detailing the duration and distance from origins to destinations.
Example: way-cli distance place-a 'place-b|place-c'
Origin | Destination | Duration | Distance |
---|---|---|---|
place-a | place-b | 20 mins | 20.0 km |
place-a | place-c | 13 mins | 6.5 km |
list || l
Lists all saved aliases.
Alias | Value |
---|---|
mall | 123 abc street, new york |
work | 678 def st, new jersey |
save || s [place] [alias]
Arguements:
place
123 abc street, new york
alias
place
arguement.
work
or fave-restaurant
Saves place
as alias
within aliases.json
. When specifying arguments for origin(s)
or destination(s)
the use of aliases will be honored through a dictionary lookup.
Having issues? Please submit an issue via GitHub repository.
FAQs
A tool to help terminal users find their way
The npm package way-cli receives a total of 9 weekly downloads. As such, way-cli popularity was classified as not popular.
We found that way-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.