تخطَّ إلى المحتوى

nself config

هذا المحتوى غير متوفر بلغتك بعد.

View and manage project configuration.

nself config <subcommand> [flags]

nself config provides a complete interface for reading and writing ɳSelf configuration values. Config is stored in .env files, �P1� config reads and writes them safely, preserving comments and formatting.

Secret keys (any key containing SECRET, PASSWORD, KEY, or TOKEN) are masked as *** in output by default. Pass --reveal to show plaintext values. Use --env to target a specific environment file (e.g., --env staging reads .env.staging).

The validate subcommand runs all registered configuration validators and reports pass/fail per rule. It is automatically run during nself build, but you can run it independently to check config without rebuilding.

SubcommandDescription
showShow all key=value pairs sorted alphabetically (secrets masked)
get <key>Get a single configuration value
set <key> <value>Update a configuration value in .env
listShow KEY | VALUE | SOURCE table for all known config keys
validateValidate configuration against all registered rules
export <file>Export config to a named file
import <file>Import config from a file into .env
FlagDefaultDescription
--envcurrentTarget environment (reads .env.{env})
--jsonfalseJSON output
--revealfalseShow secret values in plaintext
--forcefalseSkip confirmation when importing (for import subcommand)
--help, -hnoneShow help
Terminal window
# Show all config (secrets masked)
nself config show
# Show config with secrets revealed
nself config show --reveal
# Show config for staging environment
nself config show --env staging
# Get a single value
nself config get BASE_DOMAIN
# Get a secret value
nself config get POSTGRES_PASSWORD --reveal
# Set a value
nself config set BASE_DOMAIN myapp.dev
nself config set REDIS_ENABLED true
# List all known keys with current values and source
nself config list
nself config list --env staging
# Validate configuration
nself config validate
nself config validate --env prod
# Export config to a file
nself config export backup.env
nself config export /tmp/prod-config.env --env prod
# Import config from a file
nself config import backup.env
nself config import staging.env --env staging --force

Commands | Home