1.0.7 • Published 6 years ago

getcoords-cli v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

🌐 getcoords-cli npm Build Status Known Vulnerabilities

Get lat and long coordinates from any address, in your terminal

getcoords-cli uses the Google Geocoding API to convert any address into geographic coordinates.

Install

$ npm install -g getcoords-cli

Local Installation

getcoords-cli is intended to be installed globally and run anywhere, but you can also install it locally in a project. Note that if you do this, you will only be able to run commands inside your local project directory.

With npx:

$ cd path/to/your/project
$ npm install getcoords-cli
$ npx getcoords "..."

Or, with npm scripts:

$ cd path/to/your/project
$ npm install getcoords-cli
// in package.json
"scripts": {
  "getcoords": "./node_modules/.bin/getcoords"
}
$ npm run getcoords "..."

API Key

In order to use the package globally, you must first obtain a Google API key and set process.env.GOOGLE_GEOCOORDS_API_KEY in your shell initialization file. Please visit the dev docs for instruction on how to obtain the key, and this Stack Exchange answer for instruction on how to add it to your shell.

Usage

$ getcoords --help

  Usage
    getcoords [address]

  Options
    --version Outputs the version

  Examples
    $ getcoords "Los Angeles, CA"
    34.0522342 -118.2436849

    $ getcoords "6801 Hollywood Blvd, Los Angeles, CA 90028"
    34.1022444 -118.3401679

Related

License

MIT © Melanie Seltzer

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago