If youβve ever worked on multiple local services, youβve probably done this dance:
- edit
/etc/hosts - run a reverse proxy (Caddy / Nginx)
- generate HTTPS certs with mkcert
- fix broken configs after reboot
- repeat for every project
I got tired of that.
So I built hostly β a terminal-first tool that manages local development domains with HTTPS, reverse proxying, and persistence in one place.
π§ What is hostly?
hostly is an interactive terminal app for managing local development domains on macOS and Linux.
It lets you map friendly domains like:
https://app.local
https://api.local
to local ports like:
localhost:3000
localhost:8080
with:
- π Trusted HTTPS (green padlock)
- π Reverse proxy via Caddy
- π§© Automatic
/etc/hostsmanagement - π Persistent routing across reboots
βοΈ The problem it solves
A typical local setup looks like:
app.local β /etc/hosts β localhost β proxy β your app
But in reality:
-
/etc/hostsis manual and error-prone - Caddy config resets unless carefully managed
- HTTPS locally is annoying to maintain
- restarting your machine breaks everything
So developers end up duct-taping tools together.
β¨ What hostly does differently
Instead of managing 4 different systems manually, hostly introduces a single source of truth.
π₯οΈ One terminal UI
hostly
A full-screen interactive interface:
- Add/edit domains
- Map ports
- Choose HTTP / HTTPS
- Manage certificates
- Control daemon syncing
π HTTPS that just works
hostly uses Caddyβs internal CA to issue trusted certificates locally.
So instead of:
βNot Secure β οΈβ
You get:
https://app.local βοΈ (trusted)
π Automatic reverse proxying
Each domain is pushed to Caddy via its admin API:
app.local β 127.0.0.1:3000
api.local β 127.0.0.1:8080
No config files to touch manually.
π§© Safe /etc/hosts management
hostly only modifies a managed block:
# Hostly Start
127.0.0.1 app.local
# Hostly End
Everything else stays untouched.
π Boot persistence (daemon)
Caddy loses dynamic routes after restart.
So hostly includes a sync system:
hostly sync
And optional boot daemon:
- macOS β launchd
- Linux β systemd user service
It restores everything automatically.
π¦ Installation
Requirements
- Node.js β₯ 18
- Caddy installed
- macOS or Linux
Install
npm install -g hostly
Install Caddy:
brew install caddy
π Usage
Start the app:
hostly
Add a domain:
- Host:
app.local - Port:
3000 - Scheme:
https
Then open:
https://app.local
Done.
π§© How it works (simplified)
Browser
β
/etc/hosts (resolves domain)
β
Caddy (HTTPS + reverse proxy)
β
Your app (localhost:3000)
hostly is the glue that keeps everything in sync.
π₯οΈ Tech stack
- Ink (React for CLI UI)
- Zustand (state management)
- Caddy (reverse proxy + HTTPS)
- Node.js
- systemd / launchd integration
π‘ Why I built it
I wanted a local dev environment where:
- I donβt touch config files repeatedly
- HTTPS works by default
- domains feel real (
app.local, notlocalhost:3000) - everything survives restarts
So I turned it into a CLI tool.
π§ͺ Try it out
npm install -g hostly
hostly
π Links
- npm: https://www.npmjs.com/package/hostly
- GitHub: https://github.com/bilalbentoumi/hostly
- License: MIT
π Feedback welcome
This is still early, and Iβm actively improving it.
Feedback is welcome around:
- CLI UX
- missing features
- developer workflow improvements

Top comments (0)