A safe macOS hosts file CLI with backup/restore, URL normalization, and interactive domain removal.
Automatic backups before every change with easy restore functionality.
Accepts plain domains or full URLs, automatically extracts the domain.
Numbered picker interface for selecting and removing blocked domains.
brew tap ai-armageddon/manage-hosts-cli
brew install manage-hosts-cli./install.shUse --user flag for user-only install (no sudo required)
sudo blocked-sites init --migrate-existingsudo blocked-sites listsudo blocked-sites add instagram.com g2a.com
sudo blocked-sites add 'https://reddit.com/r/all'sudo blocked-sites remove instagram.com
sudo blocked-sites removeRun without arguments for interactive removal mode
sudo blocked-sites backups
sudo blocked-sites restore ./backups/hosts.YYYYMMDD-HHMMSS-ffffff.bak