hostess

Manage /etc/hosts file entries from the command line

brewmacoslinux
Try with needOr install directly
Source

About

Idempotent command-line utility for managing your /etc/hosts file

Commands

hostess

Examples

Add a hostname entry$ hostess add 127.0.0.1 localhost.dev
Remove a hostname entry$ hostess remove localhost.dev
List all hostname entries$ hostess list