Socket
Book a DemoInstallSign in
Socket

ip-location-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-location-cli

Command line utility to get an IP or hostname geo location.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

ip-location-cli

Command line utility to fetch the location of an IP address, host name, or your own location.

Uses freegeoip.net to query for information. freegeoip.net uses MaxMind Geolite 2.

Install

npm i --global ip-location-cli

Usage

$ ip-location-cli --help

  Command line utility to get an IP or hostname geo location.

  Usage
    $ ip-location [ip-or-hostname]

  Hostname Example
    $ ip-location github.com

     {
       "ip": "192.30.252.130",
       "country_code": "US",
       "country_name": "United States",
       "region_code": "CA",
       "region_name": "California",
       "city": "San Francisco",
       "zip_code": "94107",
       "time_zone": "America/Los_Angeles",
       "latitude": 37.7697,
       "longitude": -122.3933,
       "metro_code": 807
     }

   IP Address Example
     $ ip-location 8.8.8.8

     {
       "ip": "8.8.8.8",
       "country_code": "US",
       "country_name": "United States",
       "region_code": "CA",
       "region_name": "California",
       "city": "Mountain View",
       "zip_code": "94040",
       "time_zone": "America/Los_Angeles",
       "latitude": 37.3845,
       "longitude": -122.0881,
       "metro_code": 807
     }

   Your Own IP Address Example
     $ ip-location
  • ip-location API for this module.

License

MIT - Copyright (c) JP Richardson

Keywords

cli-app

FAQs

Package last updated on 26 Jan 2016

Did you know?

Socket

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.

Install

Related posts