nkapp service
Manage services in your nanokit.yml configuration without manually editing YAML.
nkapp service <subcommand> [options]Subcommands
service add [name]
Add a new service to nanokit.yml. Supports both interactive and non-interactive modes.
nkapp service add [name] [options]| Flag | Type | Description |
|---|---|---|
-i, --image <image> | string | Docker image (e.g., nginx, node:20-slim) |
-p, --port <port> | number | Host port |
-r, --runtime <runtime> | string | Runtime (e.g., node) |
--path <path> | string | Local path to service code |
Interactive Mode: If name is omitted, Nanokit launches an interactive wizard that prompts for the service name, image, and port.
# Non-interactive
nkapp service add api --image node:20-slim --port 3000 --path ./apps/api
# Interactive wizard
nkapp service addservice del <name> (alias: rm)
Remove a service from nanokit.yml and all environment overrides.
nkapp service del <name> [-y]| Flag | Type | Description |
|---|---|---|
-y, --yes | boolean | Skip confirmation prompt |
When a service is deleted, Nanokit automatically cleans up its entries from all environments.*.services.* blocks.
service set <name> <key=value>
Update a specific property for a service.
nkapp service set <name> <key=value> [-e <env>]| Flag | Type | Description |
|---|---|---|
-e, --env <target> | string | Set the property for a specific environment override |
# Set globally
nkapp service set api image=node:22-slim
# Set for staging only
nkapp service set api port=8080 -e stageExamples
# Add a new worker service
nkapp service add worker --image node:20-slim --port 4000 --path ./apps/worker
# Remove old service
nkapp service del legacy-api -y
# Change image for production
nkapp service set web image=my-app:v2.1 -e production