{"id":34243566,"url":"https://github.com/lukaszraczylo/lolcathost","last_synced_at":"2026-05-31T06:00:59.811Z","repository":{"id":326531580,"uuid":"1105965530","full_name":"lukaszraczylo/lolcathost","owner":"lukaszraczylo","description":"TUI cli for painless management of your /etc/hosts","archived":false,"fork":false,"pushed_at":"2026-05-22T04:26:11.000Z","size":617,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T13:30:52.090Z","etag":null,"topics":["developer-tools","devops-tools","homelab","kubernetes","linux","macos"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukaszraczylo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-28T12:19:38.000Z","updated_at":"2026-05-22T04:25:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lukaszraczylo/lolcathost","commit_stats":null,"previous_names":["lukaszraczylo/lolcathost"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/lukaszraczylo/lolcathost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Flolcathost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Flolcathost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Flolcathost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Flolcathost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukaszraczylo","download_url":"https://codeload.github.com/lukaszraczylo/lolcathost/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaszraczylo%2Flolcathost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33720897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","devops-tools","homelab","kubernetes","linux","macos"],"created_at":"2025-12-16T05:04:03.660Z","updated_at":"2026-05-31T06:00:59.805Z","avatar_url":"https://github.com/lukaszraczylo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/lolcathost.png\" alt=\"lolcathost logo\" width=\"200\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cspan style=\"font-size: 72px; font-weight: bold; background: linear-gradient(135deg, #f472b6 0%, #c084fc 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;\"\u003elolcathost\u003c/span\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lukaszraczylo/lolcathost/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/lukaszraczylo/lolcathost\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/lukaszraczylo/lolcathost\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/lukaszraczylo/lolcathost\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/lukaszraczylo/lolcathost\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eDynamic hosts file manager with interactive terminal UI\u003c/strong\u003e\n\u003c/p\u003e\n\nlolcathost manages your `/etc/hosts` file with an interactive terminal interface. It provides real-time management, automatic backups, group organization, presets, and a secure daemon-based architecture.\n\n## Features\n\n- **Interactive TUI** - Terminal interface with keyboard navigation\n- **Live management** - Add, edit, and delete host entries without restarting\n- **Groups** - Organize hosts into logical groups\n- **Presets** - Save and apply preset configurations with a single command\n- **Auto-backup** - Automatic backups before every change with rollback support\n- **Secure daemon** - Privileged daemon handles file access via Unix socket IPC\n- **Domain blocking** - Configurable blocklist to prevent dangerous entries\n- **Cross-platform** - Works on macOS (LaunchDaemon) and Linux (systemd)\n- **CLI \u0026 TUI** - Both command-line and interactive modes for flexibility\n- **Auto-update check** - Notifies you when a new version is available\n\n## Comparison with Other Tools\n\n| Feature | lolcathost | [HostsMan](https://hostsfileman.github.io/) | [Gas Mask](https://github.com/2ndalpha/gasmask) | Manual editing |\n|---------|------------|---------------------------------------------|------------------------------------------------|----------------|\n| **Platform** | macOS/Linux | Windows | macOS only | All |\n| **Interface** | Terminal TUI | Desktop GUI | Desktop GUI | Text editor |\n| **Daemon architecture** | Yes (secure) | No | No | N/A |\n| **Real-time sync** | Yes | No | Manual | Manual |\n| **Groups** | Yes | Yes | Yes | Manual |\n| **Presets** | Yes | Yes | Yes | No |\n| **Auto-backup** | 10 rolling | Manual | Manual | No |\n| **Rollback** | Yes | No | No | No |\n| **CLI automation** | Yes | Limited | No | Yes |\n| **Rate limiting** | Yes | No | No | N/A |\n| **Domain blocking** | Yes | No | No | No |\n| **Auto-update check** | Yes | No | No | N/A |\n\n## Installation\n\n### Homebrew (macOS)\n\n```bash\nbrew install --cask lukaszraczylo/taps/lolcathost\n```\n\n\u003e **Note**: If you previously installed via `brew install lukaszraczylo/taps/lolcathost` (formula), uninstall first:\n\u003e ```bash\n\u003e brew uninstall lolcathost\n\u003e ```\n\nAfter Homebrew installation, run:\n\n```bash\nsudo lolcathost --install\n```\n\n### Quick Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/lukaszraczylo/lolcathost/main/install.sh | bash\n```\n\n### Manual Download\n\nDownload binaries from the [releases page](https://github.com/lukaszraczylo/lolcathost/releases).\n\n### Build from Source\n\n```bash\ngit clone https://github.com/lukaszraczylo/lolcathost.git\ncd lolcathost\nmake build\nsudo ./build/lolcathost --install\n```\n\n### Verifying Release Signatures\n\nAll release checksums are signed with [cosign](https://github.com/sigstore/cosign) using keyless signing. To verify:\n\n```bash\n# Download the checksum file and its sigstore bundle from the release\ncosign verify-blob \\\n  --certificate-identity-regexp \"https://github.com/lukaszraczylo/lolcathost/.*\" \\\n  --certificate-oidc-issuer \"https://token.actions.githubusercontent.com\" \\\n  --bundle \"lolcathost-\u003cversion\u003e-checksums.txt.sigstore.json\" \\\n  lolcathost-\u003cversion\u003e-checksums.txt\n```\n\n### Post-Installation\n\nThe installer will:\n- Install the binary to `/usr/local/bin/lolcathost`\n- Create a LaunchDaemon (macOS) or systemd service (Linux)\n- Start the daemon automatically\n- Create the default config at `/etc/lolcathost/config.yaml`\n\n## Quick Start\n\nAfter installation, open a **new terminal** and run:\n\n```bash\nlolcathost\n```\n\n### Keyboard Controls\n\n| Key | Action |\n|-----|--------|\n| `↑↓` / `j/k` | Navigate entries |\n| `Space` / `Enter` | Toggle entry enabled/disabled |\n| `n` | Add new host entry |\n| `e` | Edit selected entry |\n| `d` | Delete selected entry |\n| `p` | Open preset picker |\n| `g` | Open group manager |\n| `/` | Search |\n| `r` | Refresh list |\n| `?` | Show help |\n| `q` | Quit |\n\n## Configuration\n\n### Config File Location\n\nThe configuration is stored at `/etc/lolcathost/config.yaml` and managed by the daemon.\n\n- **TUI/CLI changes**: All changes made through the TUI or CLI are automatically saved to this file\n- **Manual editing**: To edit manually, use `sudo nano /etc/lolcathost/config.yaml` (changes are picked up automatically via hot-reload)\n\n### Example Configuration\n\n```yaml\n# Groups for organizing host entries\ngroups:\n  - name: development\n    hosts:\n      - domain: myapp.local\n        ip: 127.0.0.1\n        enabled: true\n      - domain: api.myapp.local\n        ip: 127.0.0.1\n        enabled: true\n\n  - name: staging\n    hosts:\n      - domain: staging.example.com\n        ip: 192.168.1.100\n        enabled: false\n\n# Presets for quick configuration switching\npresets:\n  - name: work\n    enable:\n      - myapp-local\n      - api-myapp-local\n    disable:\n      - staging-example-com\n\n  - name: testing\n    enable:\n      - staging-example-com\n    disable:\n      - myapp-local\n\n# Domain blocklist (prevent adding these domains)\nblocklist:\n  - google.com\n  - facebook.com\n  - github.com\n```\n\n### Host Entry Fields\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `domain` | Yes | The hostname (e.g., myapp.local) |\n| `ip` | Yes | IP address to resolve to |\n| `enabled` | No | Whether entry is active (default: false) |\n\nNote: Aliases are auto-generated from domain names (e.g., `myapp.local` becomes `myapp-local`).\n\n## CLI Commands\n\n```bash\nlolcathost                  # Launch TUI\nlolcathost list             # List all entries\nlolcathost on \u003calias\u003e       # Enable entry\nlolcathost off \u003calias\u003e      # Disable entry\nlolcathost preset \u003cname\u003e    # Apply preset\nlolcathost status           # Show daemon status\n```\n\n### Version \u0026 Updates\n\n```bash\nlolcathost --version        # Show current version\nlolcathost --update         # Check for updates\n```\n\n### Installation Commands\n\n```bash\nsudo lolcathost --install   # Install daemon\nsudo lolcathost --uninstall # Uninstall daemon\n```\n\n## Status Indicators\n\n| Indicator | Description |\n|-----------|-------------|\n| `● Active` | Entry is enabled and in /etc/hosts |\n| `○ Disabled` | Entry is disabled |\n| `◐ Pending` | Operation in progress |\n| `✗ Error` | Operation failed |\n\n## Architecture\n\nlolcathost uses a daemon-based architecture for security:\n\n```\n┌─────────────────┐         ┌─────────────────────┐\n│   lolcathost    │  JSON   │      Daemon         │\n│   CLI / TUI     │◄───────►│    (runs as root)   │\n│  (runs as user) │  Unix   │                     │\n└─────────────────┘  Socket └──────────┬──────────┘\n                                       │\n                              ┌────────▼────────┐\n                              │   /etc/hosts    │\n                              └─────────────────┘\n```\n\n**Daemon** (runs as root):\n- Handles `/etc/hosts` modifications\n- Creates automatic backups (10 rolling)\n- Validates inputs (domain, IP)\n- Rate limiting protection (100 req/min per PID)\n- Flushes DNS cache automatically\n\n**Client** (CLI/TUI, runs as user):\n- Connects via Unix socket\n- JSON protocol for commands\n- No sudo required for operations\n- Real-time status updates\n\nSocket: `/var/run/lolcathost.sock`\nBackups: `/var/backups/lolcathost/`\n\n## Troubleshooting\n\n### \"daemon not running (socket not found)\"\n\nThe daemon isn't running. Install or reinstall:\n\n```bash\nsudo lolcathost --uninstall\nsudo lolcathost --install\n```\n\nThen open a **new terminal** for group membership to take effect.\n\n### Check Daemon Status\n\n```bash\n# macOS\nsudo launchctl list | grep lolcathost\n\n# Linux\nsudo systemctl status lolcathost\n```\n\n### View Daemon Logs\n\n```bash\n# macOS/Linux\ncat /var/log/lolcathost/daemon.log\ncat /var/log/lolcathost/daemon.err\n```\n\n### DNS Cache Not Flushing\n\nlolcathost automatically flushes the DNS cache after changes:\n\n- **macOS**: Uses `dscacheutil -flushcache` and `killall -HUP mDNSResponder`\n- **Linux**: Uses `systemd-resolve --flush-caches` or `nscd -i hosts`\n\nIf changes don't take effect, manually flush:\n\n```bash\n# macOS\nsudo dscacheutil -flushcache \u0026\u0026 sudo killall -HUP mDNSResponder\n\n# Linux (systemd)\nsudo systemd-resolve --flush-caches\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.24+\n- macOS or Linux\n\n### Build\n\n```bash\nmake build          # Build binary\nmake test           # Run tests\nmake test-coverage  # Tests with coverage\nmake lint           # Run linters\nmake dev            # Format, lint, test, build\n```\n\n### Project Structure\n\n```\ncmd/lolcathost/    - Entry point, CLI commands\ninternal/\n  protocol/        - JSON message types (Unix socket)\n  config/          - YAML config parsing, hot-reload\n  daemon/          - Socket server, /etc/hosts management\n  client/          - Socket client library\n  installer/       - --install/--uninstall logic\n  tui/             - Bubble Tea TUI\n  version/         - Update checker\n```\n\n## Telemetry\n\nOn startup this binary sends a single anonymous adoption ping — project name,\nversion, timestamp; no identifiers, no command output, no payload contents.\nFire-and-forget with a 2-second timeout; cannot block startup or panic.\n\nSee **[oss-telemetry — Disabling telemetry](https://github.com/lukaszraczylo/oss-telemetry#disabling-telemetry)**\nfor the exact wire format, source, and full opt-out documentation.\n\nQuick opt-out: set any of `DO_NOT_TRACK=1`, `OSS_TELEMETRY_DISABLED=1`,\nor `LOLCATHOST_DISABLE_TELEMETRY=1`.\n\n## License\n\nMIT License - see [LICENSE](LICENSE).\n\n## Acknowledgments\n\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - Terminal UI framework\n- [Lipgloss](https://github.com/charmbracelet/lipgloss) - Terminal styling\n\n## Links\n\n- [Website](https://lukaszraczylo.github.io/lolcathost)\n- [Issues](https://github.com/lukaszraczylo/lolcathost/issues)\n- [Releases](https://github.com/lukaszraczylo/lolcathost/releases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaszraczylo%2Flolcathost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukaszraczylo%2Flolcathost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaszraczylo%2Flolcathost/lists"}