New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hfm

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hfm

Host file manager for command line.

latest
Source
npmnpm
Version
2.0.3
Version published
Maintainers
1
Created
Source

HFM

travis npm downloads

Simple, programmatic hosts file manager. Just like nrm.

Install

npm install hfm -g

Usage

If you use OS X or Linux, this module assumes your hosts file is at /etc/hosts. On Windows, it assumes your hosts file is at C:/Windows/System32/drivers/etc/hosts.

help

Print help message for hfm

$ hfm help

  Usage: hfm [options] [command]

  Options:

    -V, --version         output the version number
    -h, --help            output usage information

  Commands:

    list|ls               List origin or local host files alias
    show                  Show all current domain records in hosts file
    alias <name> <path>   Alias a(n) origin/local host file
    del <name>            Unalias a(n) origin/local host file
    set <ip> <domain...>  Set a domain in the hosts file
    remove <domain...>    Remove a set of host entries from URL or local path
    search <domain>       Search related domain records in hosts file
    use <alias>           Use a(n) origin hosts path or an ALIAS_NAME(see `hfm ls`)
    unuse <alias>         Unuse a(n) origin hosts path or an ALIAS_NAME(see `hfm ls`)
    help                  Print help for hfm

list|ls

List origin or local host files alias

$ ./bin/cli.js ls
* Google        https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts
* GoogleMirror  https://coding.net/u/scaffrey/p/hosts/git/raw/master/hosts-files/hosts

show

Show all current domain records in hosts file

$ hfm show
# ----------------------------
# SYSTEM
127.0.0.1       localhost
255.255.255.255 broadcasthost

set [ip] [domain]

Set a domain in the hosts file

remove [domain]

Remove a set of host entries from URL or local path

alias [name] [path]

Alias a(n) origin/local host file
path could be local path or URL

del [name]

Unalias a(n) origin/local host file

search [domain]

Search related domain records in hosts file

$ hfm search \.com$
$ hfm search google.*
$ hfm search www.google.com

use [alias]

Use a(n) origin hosts path or an ALIAS_NAME(see hfm ls)

$ hfm use Google

unuse [alias]

Unuse a(n) origin hosts path or an ALIAS_NAME(see hfm ls)

Keywords

/etc/hosts

FAQs

Package last updated on 22 Jun 2018

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