| Crates.io | unport-cli |
| lib.rs | unport-cli |
| version | 0.5.0 |
| created_at | 2025-12-03 16:32:48.959778+00 |
| updated_at | 2025-12-05 17:00:58.873428+00 |
| description | Local development port manager with automatic domain routing |
| homepage | https://github.com/ozankasikci/unport |
| repository | https://github.com/ozankasikci/unport |
| max_upload_size | |
| id | 1964480 |
| size | 211,493 |
Local development port manager. Access your apps via clean domains like http://api.localhost instead of localhost:3847.
cargo install unport-cli
Or with Homebrew:
brew tap ozankasikci/tap && brew install unport
# 1. Start the daemon (needs sudo for port 80)
sudo unport daemon start -d
# 2. In your project directory, create unport.json
echo '{"domain": "myapp"}' > unport.json
# 3. Start your app
unport start
# Your app is now at http://myapp.localhost
unport runs a reverse proxy on port 80 that routes requests based on the Host header.
Browser: http://api.localhost/users
↓
unport daemon (port 80)
↓ routes api.localhost → port 4000
Your app (port 4000)
When you run unport start:
domain from unport.jsonThe daemon handles all routing. Your apps don't need to know about each other—just use stable domains like http://api.localhost.
| Command | Description |
|---|---|
sudo unport daemon start -d |
Start daemon in background |
sudo unport daemon start -d --https |
Start daemon with HTTPS support (ports 80 + 443) |
unport daemon status |
Show daemon status (PID, uptime, services) |
unport daemon stop |
Stop the daemon |
unport start |
Start app in current directory |
unport list |
Show all running services |
unport stop <domain> |
Stop a service |
sudo unport trust-ca |
Add unport CA to system trust store (for HTTPS) |
sudo unport trust-ca --remove |
Remove unport CA from system trust store |
unport clean-certs |
Delete generated TLS certificates |
unport regen-cert |
Regenerate TLS certificate for all domains |
Create unport.json in your project:
{
"domain": "myapp"
}
Most frameworks are auto-detected (Next.js, Vite, Express, Django, Rails, Go, etc.). If detection fails, add a start command:
{
"domain": "myapp",
"start": "npm run serve"
}
Your app must read the port from the PORT environment variable:
// Node.js
const port = process.env.PORT || 3000;
// Go
port := os.Getenv("PORT")
unport can serve your apps over HTTPS with automatically generated certificates.
# 1. Start daemon with HTTPS enabled
sudo unport daemon start -d --https
# 2. Trust the CA certificate (one-time setup)
sudo unport trust-ca
# 3. Start your app as usual
unport start
# Your app is now available at both:
# - http://myapp.localhost
# - https://myapp.localhost
When started with --https, unport:
~/.unport/ca.crt)*.localhost domainsThe CA only needs to be trusted once. After that, all *.localhost domains will have valid HTTPS.
# Regenerate certificates (e.g., after adding many domains)
unport regen-cert
# Remove CA from trust store
sudo unport trust-ca --remove
# Delete all generated certificates
unport clean-certs
MIT