Skip to content
Simple cli tool for get your internal ip addresses
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
cli.js
index.js
license
package.json
readme.md
test.js

readme.md

get-ip Build Status

Simple CLI tool for get your internal IP addresses

Install

$ npm install get-ip

Usage

const getIp = require('get-ip');

getIp();
//=> ['192.168.9.104', '192.168.9.104']

API

getIp()

Returns an Array of IPv4 addresses.

getIp.v6()

Returns an Array of IPv6 addresses.

CLI

$ npm install --global get-ip
$ get-ip --help

  Usage
    $ get-ip

  Options
    -c, --copy  Copy first IP to clipboard
    -6, --ipv6  Use IPv6

  Examples
    $ get-ip
    192.168.9.58

    $ get-ip --copy
    192.168.9.58

License

MIT © alonalon

You can’t perform that action at this time.