CLI Reference
Power Management
Commands for controlling run modes, dormancy, and resource usage.
Power Management
localdns mode
Switch a service between dev and production mode.
localdns mode <domain> <mode>Modes: dev | production | custom
localdns mode myapp.local production
localdns mode myapp.local devlocaldns sleep
Put a service to sleep (dormant state). It will auto-wake on the next HTTP request.
localdns sleep <domain>localdns wake
Wake a dormant service immediately.
localdns wake <domain>localdns suspend
Suspend a service. Unlike sleep, it will NOT auto-wake on requests. Must be manually woken with localdns wake or localdns start.
localdns suspend <domain>localdns power
Show power state and run mode info for one or all services.
localdns power [domain] [options]| Option | Description |
|---|---|
--json | Output as JSON |
localdns stats
Show resource usage (CPU, memory) of all running services.
localdns stats [options]| Option | Description |
|---|---|
--json | Output as JSON |
-w, --watch | Watch mode (refresh every 2 seconds) |
--sort <field> | Sort by: cpu | mem | name |
localdns optimize
Optimize service configurations for resource efficiency.
localdns optimize [options]| Option | Description |
|---|---|
--dry-run | Show what would change without applying |
--aggressive | Use shorter idle timeouts |
--skip-ports | Skip port migration warnings |
localdns migrate
Migrate a service to a new port in the safe range (7100-7899).
localdns migrate <domain> [options]| Option | Description |
|---|---|
-p, --port <port> | Specific port to migrate to |
--dry-run | Show what would change |