Skip to content

nkapp config ​

Unified command to manage all aspects of your nanokit.yml configuration from the CLI.

Usage ​

bash
nkapp config <subcommand> [options]

Subcommands ​

Core Modifiers ​

CommandDescription
set <key=value>Set any property path to a specific value.
del <key>Remove a property path from the configuration.

Domain Helpers ​

CommandDescription
config env set/delManage environment variables in the env block.
config deploy set/delManage deployment settings (targets, methods).
config infra set/delManage infrastructure provider settings.

Options ​

FlagDescription
-e, --env <env>Target a specific environment block instead of global root.

Examples ​

Global Settings ​

bash
nkapp config set name="my-new-project-name"
nkapp config set gatewayPort=8080

Environment Variables ​

bash
# Set a global variable
nkapp config env set API_KEY=12345

# Set a variable only for the 'stage' environment
nkapp config env set DB_NAME=staging_db -e stage

Deployment Configuration ​

bash
nkapp config deploy set target="ubuntu@10.0.0.1" -e production
nkapp config deploy set sshKey="~/.ssh/id_rsa"

Infrastructure Tweaks ​

bash
nkapp config infra set region="us-west-2" -e stage

Important. The config command performs validation against the official Nanokit schema before saving. If you attempt to set an invalid property or type, the command will fail and preserve your file.