Terminal interface for managing your /etc/hosts file with automatic backups, groups, presets, and a secure daemon architecture.
Everything you need for managing local host entries
Beautiful terminal interface with real-time updates and keyboard navigation
Add, edit, delete, and toggle host entries without restarting
Organize hosts into groups for better management
Save and apply preset configurations with a single command
Automatic backups before every change with rollback support
Privileged daemon handles file access via Unix socket IPC
Configurable domain blocklist to prevent dangerous entries
Works on macOS (LaunchDaemon) and Linux (systemd)
Both command-line and interactive modes for flexibility
Get started in under a minute
brew install lukaszraczylo/taps/lolcathost
sudo lolcathost --install
curl -fsSL https://raw.githubusercontent.com/lukaszraczylo/lolcathost/main/install.sh | bash
git clone https://github.com/lukaszraczylo/lolcathost.git
cd lolcathost
make build
sudo ./build/lolcathost --install
The installer will:
/usr/local/bin/lolcathost/etc/lolcathost/config.yamlSimple and intuitive interface
lolcathost
| Key | Action |
|---|---|
up/down or j/k |
Navigate entries |
Space or Enter |
Toggle entry enabled/disabled |
n |
Add new host entry |
e |
Edit selected entry |
d |
Delete selected entry |
p |
Open preset picker |
/ |
Search |
r |
Refresh list |
? |
Show help |
q |
Quit |
| Indicator | Description |
|---|---|
| ● Active | Entry is enabled and in /etc/hosts |
| ○ Disabled | Entry is disabled |
| ◔ Pending | Operation in progress |
| ✗ Error | Operation failed |
Flexible YAML-based configuration
Configuration is stored at /etc/lolcathost/config.yaml and managed by the daemon.
sudo nano /etc/lolcathost/config.yaml (hot-reload enabled)# Groups for organizing host entries
groups:
- name: development
hosts:
- domain: myapp.local
ip: 127.0.0.1
enabled: true
- domain: api.myapp.local
ip: 127.0.0.1
enabled: true
- name: staging
hosts:
- domain: staging.example.com
ip: 192.168.1.100
enabled: false
# Presets for quick configuration switching
presets:
- name: work
enable:
- myapp.local
- api.myapp.local
disable:
- staging.example.com
- name: testing
enable:
- staging.example.com
disable:
- myapp.local
# Domain blocklist (prevent adding these domains)
blocklist:
- google.com
- facebook.com
- github.com
| Field | Required | Description |
|---|---|---|
domain |
Yes | The hostname (e.g., myapp.local) |
ip |
Yes | IP address to resolve to |
enabled |
No | Whether entry is active (default: false) |
Scriptable command-line interface
lolcathost list
List all host entries
lolcathost enable <alias>
Enable a host entry by its alias
lolcathost disable <alias>
Disable a host entry by its alias
lolcathost add -d <domain> -i <ip> -g <group>
Add a new host entry
lolcathost delete <alias>
Delete a host entry by its alias
lolcathost preset <name>
Apply a named preset
lolcathost rollback <backup>
Restore from a backup
lolcathost status
Show daemon status
sudo lolcathost --install
Install the daemon service
sudo lolcathost --uninstall
Uninstall the daemon service
Secure daemon-based design
Socket: /var/run/lolcathost.sock