Skip to content

nb config

nb config manages per-bundle settings like API keys and secrets. These values are stored in ~/.mpak/config.json and injected into bundle processes as environment variables at startup.

nb config <action> <bundle> [key=value|key]
ActionDescription
set <bundle> <key>=<value>Set a config value for a bundle
get <bundle> [key]Get config values for a bundle
clear <bundle> <key>Remove a config value

Store a configuration value for a bundle. The bundle is identified by its scoped name:

Terminal window
nb config set @nimblebraininc/granola api_key=grn_abc123def456
Saved api_key for @nimblebraininc/granola

The value is written to ~/.mpak/config.json with restricted permissions (mode 0600). Bundles that declare user_config fields in their manifest pick up these values as environment variables via ${user_config.<field>} references.

View the configured values for a bundle. Values are masked for security:

Terminal window
nb config get @nimblebraininc/granola
api_key: gr****

Values longer than 4 characters show the first 2 characters followed by ****. Shorter values show only ****.

If no config exists for the bundle:

Terminal window
nb config get @nimblebraininc/unknown
No config for @nimblebraininc/unknown

If no config file exists at all:

Terminal window
nb config get @nimblebraininc/granola
No config found.

Remove a specific key from a bundle’s config:

Terminal window
nb config clear @nimblebraininc/granola api_key
Cleared api_key for @nimblebraininc/granola

If the bundle has no remaining keys after clearing, its entry is removed from the config entirely.

Bundle configuration lives at ~/.mpak/config.json, separate from your nimblebrain.json. This file is shared with the mpak CLI and has this structure:

~/.mpak/config.json
{
"packages": {
"@nimblebraininc/granola": {
"api_key": "grn_abc123def456"
},
"@nimblebraininc/postgres": {
"connection_string": "postgres://user:pass@localhost/mydb"
}
}
}
  • nb bundle — manage which bundles are installed
  • nb reload — reload config on a running server after changing values
  • nb status — check workspace health