LocalDNS.wtf
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 dev

localdns 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]
OptionDescription
--jsonOutput as JSON

localdns stats

Show resource usage (CPU, memory) of all running services.

localdns stats [options]
OptionDescription
--jsonOutput as JSON
-w, --watchWatch mode (refresh every 2 seconds)
--sort <field>Sort by: cpu | mem | name

localdns optimize

Optimize service configurations for resource efficiency.

localdns optimize [options]
OptionDescription
--dry-runShow what would change without applying
--aggressiveUse shorter idle timeouts
--skip-portsSkip port migration warnings

localdns migrate

Migrate a service to a new port in the safe range (7100-7899).

localdns migrate <domain> [options]
OptionDescription
-p, --port <port>Specific port to migrate to
--dry-runShow what would change