The dynamic configurator for your Python Project
—
Comprehensive CLI for project initialization, configuration management, validation, and debugging with support for multiple file formats and environments. The dynaconf CLI provides a powerful set of tools for managing configuration throughout the development lifecycle.
Initialize new dynaconf projects with configuration templates and boilerplate.
# dynaconf init [OPTIONS]
#
# Options:
# --format TEXT Configuration file format (toml, yaml, json, ini, py)
# --path TEXT Path to create the files (default: current directory)
# --vars TEXT Name for the main settings file (default: settings)
# --secrets TEXT Name for the secrets file (default: .secrets)
# --wg / --no-wg Generate .gitignore entries (default: --wg)
# -y, --yes Skip confirmation prompts
# --django Create Django-specific configurationUsage examples:
# Initialize with TOML format (default)
dynaconf init
# Initialize with YAML format in specific directory
dynaconf init --format yaml --path ./config
# Initialize for Django project
dynaconf init --django --format yaml
# Initialize with custom file names
dynaconf init --vars config --secrets local_secretsGet specific configuration values with formatting and type casting options.
# dynaconf get <key> [OPTIONS]
#
# Arguments:
# key Configuration key to retrieve
#
# Options:
# --default TEXT Default value if key doesn't exist
# --env TEXT Environment to read from
# --unparse Show raw value without parsingUsage examples:
# Get a simple value
dynaconf get DATABASE_URL
# Get with default value
dynaconf get PORT --default 8000
# Get from specific environment
dynaconf get DEBUG --env production
# Get raw unparsed value
dynaconf get TEMPLATE_STRING --unparseList and inspect all configuration settings with detailed information.
# dynaconf list [OPTIONS]
#
# Options:
# --env TEXT Environment to list (default: current)
# --key TEXT Filter by specific key pattern
# --more Show more detailed information
# --loader TEXT Filter by loader source
# --all Show settings from all environments
# --output TEXT Output format (table, yaml, json)
# --output-flat Show flattened output
# --json Output as JSONUsage examples:
# List all settings
dynaconf list
# List settings from specific environment
dynaconf list --env production
# List with detailed information
dynaconf list --more
# List specific key pattern
dynaconf list --key "DATABASE*"
# Export as JSON
dynaconf list --json
# Show all environments
dynaconf list --allExport settings to files or external services like Redis and Vault.
# dynaconf write <to> [OPTIONS]
#
# Arguments:
# to Target (file path, redis://, vault://)
#
# Options:
# --vars TEXT Variable names to export (comma-separated)
# --secrets TEXT Export secrets separately
# --path TEXT Source path for settings
# --env TEXT Environment to export
# -y, --yes Skip confirmation promptsUsage examples:
# Export to TOML file
dynaconf write settings_backup.toml
# Export to YAML with specific variables
dynaconf write config.yaml --vars "DATABASE_URL,API_KEY"
# Export to Redis
dynaconf write redis://localhost:6379/0
# Export to HashiCorp Vault
dynaconf write vault://localhost:8200/secret/myapp
# Export specific environment
dynaconf write prod_config.json --env productionRun validation rules against configuration settings.
# dynaconf validate [OPTIONS]
#
# Options:
# --path TEXT Path to settings filesUsage examples:
# Run validation with default settings
dynaconf validate
# Run validation with custom settings path
dynaconf validate --path ./config/Inspect configuration loading history and debug settings resolution.
# dynaconf inspect [OPTIONS]
#
# Options:
# --key TEXT Inspect specific key
# --env TEXT Environment to inspect
# --format TEXT Output format (yaml, json, table)
# --old-first Show oldest entries first
# --limit INTEGER Limit number of entries
# --all Include internal settings
# --report-mode Show detailed report
# --verbose Verbose outputUsage examples:
# Inspect all settings loading
dynaconf inspect
# Inspect specific key
dynaconf inspect --key DATABASE_URL
# Inspect with verbose output
dynaconf inspect --verbose
# Generate detailed report
dynaconf inspect --report-mode
# Inspect specific environment
dynaconf inspect --env productionOptions available for all dynaconf commands.
# Global Options:
# --instance/-i TEXT Custom settings instance path
# --version Show version information
# --docs Open documentation in browser
# --banner Show dynaconf bannerUsage examples:
# Use custom settings instance
dynaconf --instance myapp.config.settings list
# Show version
dynaconf --version
# Open documentation
dynaconf --docs
# Show banner
dynaconf --banner# Validate configuration in CI
dynaconf validate --path ./deploy/
# Export production config
dynaconf write vault://prod-vault:8200/secret/app --env production
# Inspect configuration for debugging
dynaconf inspect --env staging --verbose# Initialize new project
dynaconf init --format yaml
# Check current settings during development
dynaconf list --env development --more
# Export settings for testing
dynaconf write test_config.json --env testing
# Validate before deployment
dynaconf validateInstall with Tessl CLI
npx tessl i tessl/pypi-dynaconf