npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ip2

v1.1.1

Published

Get ip info & manage the hosts files

Downloads

48

Readme

Build Status NPM Version NPM Downloads

ip2

Get ip info & manage the hosts files.

Installation

$ npm i -g ip2
# or
$ sudo npm i -g ip2

Example

$ ip2 -h        # print help
$ ip2 -lis      # ip & system info
$ ip2 qq.com    # get dns information
$ ip2 8.8.8.8   # get ip geo location

$ ip2 ls        # list hosts
$ ip2 cat       # print hosts content
$ sudo ip2 add google.txt  # add hosts file to system
$ sudo ip2 use google      # use the hosts file

$ ip2 24           # 255.255.255.0
$ ip2 127.0.0.1    # ipv4 to long
$ ip2 2130706433   # long to ipv4
$ ip2 '! 255.255.255.0'  # 0.0.0.255
$ ip2 '192.168.1.134 or 0.0.0.255'  # 192.168.1.255
$ ip2 '192.168.1.134 mask 255.255.255.0'  # 192.168.1.0
$ ip2 '192.168.1.134 subnet 255.255.255.192'  # subnet information
$ ip2 192.168.1.134/26  # CIDR subnet, same as previous

NOTICE: The sudo is must be used when you operating the hosts file.

Usage

Usage: ip2 [options] [command]

  Commands:

    ls [dir]       list hosts
    cat [hosts]    print hosts contents
    add <file>     add custom hosts to system
    use <hosts>    change system hosts to custom hosts
    rm <hosts>     delete one custom hosts file
    reload         reload used hosts
    reset          reset hosts
    init           init hosts
    *              ip utilities
    help           help & example

  Options:

    -h, --help      output usage information
    -V, --version   output the version number
    -v, --version   get version number
    -f, --force     overwrite file
    -l, --local     get local ip
    -s, --system    get system info
    -i, --internet  get internet ip info
    -c, --chinese   output geo ip in chinese

See MANUAL for details.

Hosts file

Release History

See the CHANGELOG.

License

Copyright (c) 2015 Mark Zhan.

This project is available under the MIT license. See LICENSE for details.