A modern CLI tool to manage your /etc/hosts file with ease. It provides a web UI and CLI for managing hosts, with features like backup, validation, and Caddyfile generation.
For detailed documentation, please see the docs.md file.
- Web UI: A user-friendly web interface for managing hosts.
- CLI: A powerful command-line interface for all operations.
- Backup and Restore: Create backups of your hosts file and restore them when needed.
- Validation: Validate your hosts file for correct syntax.
- Caddyfile Generation: Automatically generate a Caddyfile for your local domains.
- Search and Filtering: Easily search and filter your hosts.
- Download the latest release from the releases page.
- Place the executable in a directory in your PATH.
Alternatively, you can build from source:
-
Clone the repository:
git clone https://github.com/your-username/hosts.git cd hosts -
Build the binary:
go build -o hosts
Start the web UI by running the hosts command without any flags.
./hostsThe web UI will be available at http://localhost:3000.
Note: You may need to run the application with sudo to save changes to the hosts file.
The CLI provides a comprehensive set of commands for managing your hosts file.
Add a host:
./hosts add example.localRemove a host:
./hosts remove example.localList all hosts:
./hosts listFor more commands and options, see the documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
