Skip to Content
CLI Referencenkapp service

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]
FlagTypeDescription
-i, --image <image>stringDocker image (e.g., nginx, node:20-slim)
-p, --port <port>numberHost port
-r, --runtime <runtime>stringRuntime (e.g., node)
--path <path>stringLocal 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 add

service del <name> (alias: rm)

Remove a service from nanokit.yml and all environment overrides.

nkapp service del <name> [-y]
FlagTypeDescription
-y, --yesbooleanSkip 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>]
FlagTypeDescription
-e, --env <target>stringSet 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 stage

Examples

# 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