Wynn Netherland changelog.com/posts

Ghost means never having to touch /etc/hosts again

Ghost from Bodaniel Jeanes is a Ruby gem that lets you manage your local host names without futzing with /etc/hosts.

To install:

gem install ghost

And then from the command line:

$ ghost add mydevsite.local
  [Adding] mydevsite.local -> 127.0.0.1

$ ghost add staging-server.local 67.207.136.164
  [Adding] staging-server.local -> 67.207.136.164

$ ghost list
Listing 2 host(s):
  mydevsite.local      -> 127.0.0.1
  staging-server.local -> 67.207.136.164

$ ghost delete mydevsite.local
  [Deleting] mydevsite.local

Aside from basic list, add, and delete options, Ghost provides powerful import and delete_matching operations to import files or delete entries based on pattern matching.

Check out the source on GitHub.

UPDATE: We covered ghost-ssh, a hidden feature of ghost which lets you manipulate your ~/.ssh/config file as well.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00