Skip to main content

config

Utilities for managing application configuration files. These commands provide comprehensive tools for viewing, modifying, and maintaining your Babylon node's configuration settings across different versions and deployments.

Overview

The config command group provides utilities for managing Cosmos SDK application configuration files (app.toml) including reading, writing, migrating, and comparing configuration values.

babylond config [command] [flags]

Quick Reference

CommandDescriptionUse Case
diffShow config differences from defaultsConfiguration auditing
getGet a specific config valueValue retrieval
homeShow the home directory pathPath verification
migrateMigrate config to specified versionVersion upgrades
setSet a config valueConfiguration updates
viewView entire config fileConfiguration inspection

Global Flags

FlagTypeDefaultDescription
--homestring~/.babylondDirectory for config and data
--log_formatstringplainThe logging format (json|plain)
--log_levelstringinfoThe logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>')
--log_no_colorDisable colored logs
--tracePrint out full stack trace on errors

diff

Outputs all config values that are different from the app.toml defaults. Useful for configuration auditing and identifying customizations.

Usage

babylond config diff [target-version] <app-toml-path> [flags]

Arguments

ArgumentDescription
target-versionTarget version to compare against (optional)
app-toml-pathPath to the app.toml file to compare

Examples

Compare current config with defaults
babylond config diff ~/.babylond/config/app.toml
Compare with specific version
babylond config diff v1.0.0 ~/.babylond/config/app.toml

get

Get an application config value. The config argument must be the name of the config file without the .toml extension when used with babylond.

Usage

babylond config get [config] [key] [flags]

Arguments

ArgumentDescription
configConfig file name (without .toml extension) or full path
keyConfiguration key to retrieve

Examples

Get minimum gas prices
babylond config get app minimum-gas-prices
Get API configuration
babylond config get app api.enable
Get gRPC settings
babylond config get app grpc.enable
babylond config get app grpc.address
Common configuration queries
# Check telemetry settings
babylond config get app telemetry.enabled

# Check state sync settings
babylond config get app state-sync.snapshot-interval

# Check pruning configuration
babylond config get app pruning

home

Outputs the folder used as the binary home directory. The path can be changed by setting the $APPD_HOME environment variable or using the --home flag.

Usage

babylond config home [flags]

Examples

Show current home directory
babylond config home
Use in scripts
HOME_DIR=$(babylond config home)
echo "Babylon home: $HOME_DIR"
Verify custom home directory
babylond config home --home /custom/babylon/path

migrate

Migrate the contents of the Cosmos SDK app configuration (app.toml) to the specified version. The output is written in-place unless --stdout is provided.

Usage

babylond config migrate [target-version] <app-toml-path> [flags]

Flags

FlagTypeDescription
--skip-validateSkip configuration validation (allows migrating unknown configurations)
--stdoutPrint the updated config to stdout
--verboseLog changes to stderr

Arguments

ArgumentDescription
target-versionVersion to migrate the configuration to
app-toml-pathPath to the app.toml file to migrate

Examples

Migrate to latest version
babylond config migrate v1.0.0 ~/.babylond/config/app.toml
Preview migration changes
babylond config migrate v1.0.0 ~/.babylond/config/app.toml --stdout
Verbose migration with validation
babylond config migrate v1.0.0 ~/.babylond/config/app.toml --verbose
Migrate unknown configs (advanced)
babylond config migrate v1.0.0 ~/.babylond/config/app.toml --skip-validate
Backup First

Always backup your configuration files before running migration commands. In case of errors, no output is written to preserve the original file.


set

Set an application config value. The config argument must be the name of the config file without the .toml extension when used with babylond.

Usage

babylond config set [config] [key] [value] [flags]

Flags

FlagTypeDescription
-s, --skip-validateSkip configuration validation (allows mutating unknown configurations)
--stdoutPrint the updated config to stdout
-v, --verboseLog changes to stderr

Arguments

ArgumentDescription
configConfig file name (without .toml extension) or full path
keyConfiguration key to set
valueValue to set for the specified key

Examples

Set minimum gas prices
babylond config set app minimum-gas-prices "0.005ubbn"
Enable API server
babylond config set app api.enable true
babylond config set app api.address "tcp://0.0.0.0:1317"
Configure gRPC
babylond config set app grpc.enable true
babylond config set app grpc.address "0.0.0.0:9090"
Set pruning configuration
babylond config set app pruning "custom"
babylond config set app pruning-keep-recent "100"
babylond config set app pruning-interval "10"
Configure telemetry
babylond config set app telemetry.enabled true
babylond config set app telemetry.prometheus-retention-time 60
Preview changes before applying
babylond config set app minimum-gas-prices "0.005ubbn" --stdout

view

View the config file contents. The config argument must be the name of the config file without the .toml extension when used with babylond.

Usage

babylond config view [config] [flags]

Flags

FlagTypeDefaultDescription
--output-formatstringtomlOutput format (json|toml)

Arguments

ArgumentDescription
configConfig file name (without .toml extension) or full path

Examples

View app configuration
babylond config view app
View config in JSON format
babylond config view app --output-format json
View specific sections with grep
babylond config view app | grep -A 5 "\[api\]"
babylond config view app | grep -A 5 "\[grpc\]"