All Projects → cbednarski → Hostess

cbednarski / Hostess

Licence: mit
An idempotent command-line utility for managing your /etc/hosts file.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Hostess

Wait4x
Wait4X is a cli tool to wait for everything! It can be wait for a port to open or enter to rquested state.
Stars: ✭ 30 (-96.15%)
Mutual labels:  cli, dns
Cloudflare Cli
CLI utility managing CloudFlare services using CloudFlare API
Stars: ✭ 61 (-92.17%)
Mutual labels:  cli, dns
Lexicon
Manipulate DNS records on various DNS providers in a standardized way.
Stars: ✭ 1,028 (+31.96%)
Mutual labels:  cli, dns
Freenom Dns Updater
A tool to update freenom's dns records
Stars: ✭ 117 (-84.98%)
Mutual labels:  cli, dns
Lenz
Console based MAP 🗺 : with lots of features 🤩
Stars: ✭ 51 (-93.45%)
Mutual labels:  cli, dns
Hostctl
Your dev tool to manage /etc/hosts like a pro!
Stars: ✭ 642 (-17.59%)
Mutual labels:  cli, dns
Sade
Smooth (CLI) Operator 🎶
Stars: ✭ 746 (-4.24%)
Mutual labels:  cli
Js Liftoff
Launch your command line tool with ease.
Stars: ✭ 761 (-2.31%)
Mutual labels:  cli
Dip
CLI gives the "native" interaction with applications configured with Docker Compose.
Stars: ✭ 737 (-5.39%)
Mutual labels:  cli
Friends
Spend time with the people you care about. Introvert-tested. Extrovert-approved.
Stars: ✭ 737 (-5.39%)
Mutual labels:  cli
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+826.7%)
Mutual labels:  cli
Term2048
🎉 2048 in your terminal
Stars: ✭ 777 (-0.26%)
Mutual labels:  cli
Crowbar
Cloud Operations Platform
Stars: ✭ 760 (-2.44%)
Mutual labels:  cli
Ipfs Deploy
Zero-Config CLI to Deploy Static Websites to IPFS
Stars: ✭ 740 (-5.01%)
Mutual labels:  cli
Dbxcli
A command line client for Dropbox built using the Go SDK
Stars: ✭ 764 (-1.93%)
Mutual labels:  cli
Bench
CLI to manage Multi-tenant deployments for Frappe apps
Stars: ✭ 745 (-4.36%)
Mutual labels:  cli
Bandwhich
Terminal bandwidth utilization tool
Stars: ✭ 6,737 (+764.83%)
Mutual labels:  cli
Captain
Captain - Convert your Git workflow to Docker 🐳 containers
Stars: ✭ 739 (-5.13%)
Mutual labels:  cli
Multi
Create a custom, lightweight macOS app from a group of websites
Stars: ✭ 755 (-3.08%)
Mutual labels:  cli
Chafa
📺🗿 Terminal graphics for the 21st century.
Stars: ✭ 774 (-0.64%)
Mutual labels:  cli

hostess Linux Build Status Windows Build Status GoDoc

An idempotent command-line utility for managing your /etc/hosts* file.

hostess add local.example.com 127.0.0.1
hostess add staging.example.com 10.0.2.16

Why? Because you edit /etc/hosts for development, testing, and debugging. Because sometimes DNS doesn't work in production. And because editing /etc/hosts by hand is a pain. Put hostess in your Makefile or deploy scripts and call it a day.

* And C:\Windows\System32\drivers\etc\hosts on Windows.

Note: 0.4.0 has backwards incompatible changes in the API and CLI. See CHANGELOG.md for details.

Installation

Download a precompiled release from GitHub, or build from source (with a recent version of Go):

git clone https://github.com/cbednarski/hostess
cd hostess
make install

Usage

Run hostess or hostess -h to see a full list of commands.

Note The hosts file is protected. On unixes you will need to use sudo or run the hostess command as root. On Windows, you will need to run hostess from an elevated prompt (right click and Run as administrator).

Format

On unixes, hostess follows the format specified by man hosts, with one line per IP address:

127.0.0.1 localhost hostname2 hostname3
127.0.1.1 machine.name
# 10.10.20.30 some.host

On Windows, hostess writes each hostname on its own line.

127.0.0.1 localhost
127.0.0.1 hostname2
127.0.0.1 hostname3

Configuration

hostess may be configured via environment variables.

  • HOSTESS_FMT may be set to windows or unix to override platform detection for the hosts file format. See Behavior, above, for details

  • HOSTESS_PATH may be set to override platform detection for the location of the hosts file. By default this is C:\Windows\System32\drivers\etc\hosts on Windows and /etc/hosts everywhere else.

IPv4 and IPv6

It's possible for your hosts file to include overlapping entries for IPv4 and IPv6. This is an uncommon case so the CLI ignores this distinction. The hostess library includes logic that differentiates between these cases.

Contributing

I hope my software is useful, readable, fun to use, and helps you learn something new. I maintain this software in my spare time. I rarely merge PRs because I am both lazy and a snob. Bug reports, fixes, questions, and comments are welcome but expect a delayed response. No refunds. 👻

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].