Commands
hostly has two entry points: the interactive app and the sync subcommand.
hostly
hostlyLaunches the interactive local domain manager. On start, hostly runs sudo -v to cache your credentials (needed to write /etc/hosts), then renders the main menu:
| Screen | What it does |
|---|---|
| Domains | List, add, edit, and delete domains. Shows sync status per domain. |
| Proxy & Caddy | Check the Caddy admin API, list live routes, and re-sync routes from your registry. |
| Certificate | Trust or untrust Caddy's local CA in your system trust store. |
| Daemon | Install or remove the boot daemon that runs hostly sync at startup. |
| Quit | Exit the app (same as Ctrl+C). |
Keyboard
| Key | Action |
|---|---|
| ↑ / ↓ | Move the selection |
| Enter | Select |
| r | Refresh (on the Domains screen) |
| Esc | Go back to the previous screen |
| Ctrl+C | Quit |
hostly sync
hostly syncRe-applies your saved domains to Caddy, then exits. It does not open the interactive UI and does not touch /etc/hosts.
This exists because Caddy's admin-API configuration is not persisted across restarts. After Caddy restarts, its routes are gone until something re-applies them. hostly sync:
- Waits for the Caddy admin API (
http://localhost:2019) to become reachable - Loads your domain registry
- Pushes the routing and TLS config to Caddy
The boot daemon (installed from the Daemon screen) runs this command for you at startup. You can also run it by hand whenever Caddy has lost its routes.
Exit codes: 0 on success, 1 if Caddy never became reachable or the config could not be applied. The error is printed to stderr.
Requirements
Both commands require Caddy (opens in a new tab) installed and on your PATH. hostly additionally requires a TTY (it's an interactive terminal app), while hostly sync is safe to run headless from a service.