# Host

  $ glue host:COMMAND

# Commands

# host:add

Used to add mappings to your /etc/hosts file.

Will read your /etc/hosts file and let you choose which commented mappings to activate.

  • Use -a, --all to activate all mappings (usefull in combination with --env)
  $ sudo glue host:add

Aliases

  $ glue map
Option Function
-a, --all To map all posible mappings and avoid the prompt to choose one specific
-e, --env=live|pre|pro|blg|demos Map a set of urls from a specific environment to your local environment
-i, --ip=ip IP address to map to
-u, --url=url DNS url to map from

# Environment: -e, --env

Will let you choose between a set of predefined mappings for the environment you specified.

  • Use -a, --all to activate all mappings of the specified environment.
  $ sudo glue host:add --env live

# Custom mapping: -i, --ip && -u, --url

-i and -u work together to add a custom mapping to your hosts file.

  $ glue host:add --ip 127.0.0.1 --url customdomain.com

Results in a new line in /etc/hosts

127.0.0.1  customdomain.com

# host:remove

Used to remove active mappings from your /etc/hosts file.

Will read your /etc/hosts file and let you choose which active mapping to comment out.

  • Use -a, --all to remove all mappings.
  $ glue host:remove

Aliases

  $ glue unmap
Option Function
-a, --all Remove all active mappings (comments them)
-e, --env=live|pre|pro|blg|demos Unmap a set of urls from a specific environment

# Environment: -e, --env

Will let you choose between a set of predefined mappings for the environment you specified.

  • Use -a, --all to remove all mappings of the specified environment.
  $ sudo glue host:remove --env live

# host:list

Will read your /etc/hosts file and list all active mappings.

  $ glue host:list

Aliases

  $ glue hosts