Developer convenience commands for setting up and maintaining a local dev environment. Includes a one-shot bootstrap and a hot-reload file watcher.
# One-shot dev setup (run once on a new machine)
nself dev bootstrap
# Start file-watching hot reload
nself dev watchnself dev <SUBCOMMAND> [FLAGS]nself dev is a helper namespace for developer workflow commands. It is distinct from the production deploy pipeline — nself dev targets the local dev pre-deploy environment defined in your env cascade.
bootstrap is a one-shot command that installs prerequisites, generates dev SSL certificates, writes resolver entries, and starts the full stack. Run it once when setting up a new machine or after a fresh clone.
watch monitors config files for changes and automatically runs nself build and restarts affected services. Use it during active development to avoid manual rebuilds.
One-shot dev environment setup. Installs and configures everything needed to run the stack locally. Idempotent — safe to run again if something was skipped on a previous run.
nself dev bootstrap
# What it does:
# 1. Checks prerequisites (Docker, mkcert, nself CLI version)
# 2. Runs nself trust (DNS resolver + port forwarding + SSL — idempotent, skips if already done)
# 3. Generates dev SSL certs for *.local.nself.org
# 4. Creates .env from .env.example if not present
# 5. Runs nself build to generate docker-compose.yml
# 6. Pulls Docker images
# 7. Starts all services via nself start
# 8. Verifies health with nself doctorWatch for changes to .env*, nself.yaml, and plugin configs, then automatically rebuild and hot-reload affected services. Runs in the foreground; press Ctrl+C to stop.
nself dev watch
# Output:
# ↺ Watching for config changes...
# [14:22:01] .env.local changed → rebuilding...
# [14:22:03] nself build complete
# [14:22:04] Restarting: postgres, hasura
# [14:22:08] ✓ All services healthy| Flag | Type | Default | Description |
|---|---|---|---|
--skip-trust | bool | false | Skip DNS/SSL/port trust setup (if already configured) |
--skip-start | bool | false | Build without starting services |
--no-pull | bool | false | Skip Docker image pull |
--env | string | local | Environment to bootstrap (default: local dev) |
| Flag | Type | Default | Description |
|---|---|---|---|
--debounce | int | 500 | Milliseconds to wait after a change before rebuilding |
--service | string | Restart only this service on change (instead of all affected) | |
--no-restart | bool | false | Rebuild but do not restart services |
# Clone your project
git clone https://github.com/yourorg/yourproject
cd yourproject/backend
# One-shot bootstrap
nself dev bootstrap
# Stack is now running at https://local.nself.org# Safe to re-run — skips steps that are already complete
nself dev bootstrap# In one terminal: edit configs and plugin YAML
# In another terminal:
nself dev watch
# Changes to .env or plugin config auto-trigger rebuild# Prepare everything but don't start the stack yet
nself dev bootstrap --skip-start
nself start # start manually when readyNSELF_DEV_ENV — override the environment name used by dev commands (default: local)NSELF_NO_BROWSER — set to 1 to suppress browser-open steps during bootstrap0 — bootstrap complete or watcher stopped cleanly1 — prerequisite check failed (Docker not running, mkcert missing)2 — build or service startup failed3 — invalid subcommand or flags*.local.nself.org