Namespaces
Group secrets by environment or application while sharing one master password
Namespaces keep separate sets of secrets in the same repository vault. Use them
for environments such as production and staging, or for different applications.
Every namespace shares the vault's master password and password-storage backend.
Select a Namespace
Pass --namespace (or -n) to any secret command:
obscuro set API_KEY --namespace production
obscuro set API_KEY -n staging
obscuro get API_KEY -n production
obscuro edit API_KEY -n production
obscuro list -n production
obscuro remove API_KEY -n staging
obscuro import secrets.env -n production --on-conflict=skip
obscuro run -n production -- docker compose up -dWithout this flag, commands use default. Existing secrets are already in the
default namespace; no migration or re-initialization is required. Selection is
per invocation, not a saved active namespace.
Named namespaces are created automatically on the first successful set or
import. Reading a namespace that does not exist treats it as empty and creates
no files. Removing its last secret leaves an empty namespace. init and auth
continue to operate on the entire vault.
List Namespaces
obscuro namespace list
# default
# production
# stagingThis lists persisted namespaces plus default, in sorted order. No password is
required. obscuro namespaces list is an alias.
Inject from One Namespace
The same __KEY__ placeholder can resolve to different values depending on the
namespace. Secrets never fall back to default or another namespace.
obscuro inject -n production --strict < manifest.yamlWithout --strict, missing placeholders are left unchanged with a warning. In
strict mode, a missing placeholder fails the command without emitting output.
For Helm, pass the namespace as a post-renderer argument:
helm install myrelease ./chart --post-renderer obscuro \
--post-renderer-args inject \
--post-renderer-args=--namespace=production \
--post-renderer-args=--strictRun a Command with Namespace Secrets
obscuro run -n my-app -- docker compose up -dLoads only my-app secrets into the command's environment, overriding matching
inherited variables. Your shell is unchanged. See obscuro run
for process behavior and a Compose example.
Names and Storage
Names must contain 1–63 lowercase letters, digits, hyphens, or underscores and
start with a letter or digit. Windows-reserved filenames such as con, nul,
com1, and lpt1 are rejected on every platform for portability.
The default namespace stays in .obscuro/secrets.json. Each named namespace is
stored in .obscuro/namespaces/<name>.json, using the same encrypted flat-map
format. All paths resolve from the git repository root, even from a subdirectory.
Commit these encrypted files along with .obscuro/config.json.
Namespaces are organizational groups, not access-control boundaries. Anyone with the master password can decrypt all namespaces. Namespace names and secret names are public metadata; only secret values are encrypted.