Config
The CLI uses a layered configuration system. Resolution order (highest priority first):
- Flags -- Command-line flags
- Environment variables --
CABAL_*env vars - Project config --
.cabal/config.jsonin the current directory - Global config --
~/.cabal/config.json - Defaults -- Built-in defaults
cabal config list
Show the merged configuration with source annotations.
cabal config list
cabal config list --jsonExample Output
Configuration
output human [default]
hints true [default]
chains.solana.baseCurrency USDC [default]
chains.solana.slippage 200 [global]
chains.solana.explorer solscan [default]
chains.hyperliquid.baseCurrency USDC [default]
chains.hyperliquid.slippage 50 [default]
chains.hyperliquid.explorer hyperliquid [default]Source labels: [default], [global], [project], [env], [flag].
cabal config get
Get a single config value by dot-path.
cabal config get chains.solana.slippage
cabal config get outputThe config path is a positional argument. Chain aliases work: chains.sol.slippage resolves to chains.solana.slippage.
cabal config set
Set a config value. Preview-by-default.
# Set globally (default)
cabal config set chains.solana.slippage 200 --yes
# Set at project level
cabal config set output json --project --yesFlags
| Flag | Description |
|---|---|
--project | Write to project config (.cabal/config.json) instead of global |
The config path and value are positional arguments.
cabal config reset
Reset a config key to its default value, or delete the entire config file. Requires --yes.
# Reset a single key
cabal config reset chains.solana.slippage --yes
# Delete entire global config file
cabal config reset --yesThe config path is an optional positional argument. If omitted, the entire global config file is deleted.
cabal config path
Show the paths to global and project config files.
cabal config pathExample Output
Config Paths
Global: /Users/you/.cabal/config.json (exists)
Project: /Users/you/project/.cabal/config.json (not found)Valid Config Paths
| Path | Type | Default | Env Var |
|---|---|---|---|
output | human | json | human | CABAL_OUTPUT |
hints | boolean | true | CABAL_HINTS |
chains.solana.baseCurrency | string | USDC | CABAL_SOLANA_BASE_CURRENCY |
chains.solana.slippage | 1-5000 (bps) | 100 | CABAL_SOLANA_SLIPPAGE |
chains.solana.explorer | solscan | solana.fm | xray | solscan | CABAL_SOLANA_EXPLORER |
chains.hyperliquid.baseCurrency | string | USDC | CABAL_HYPERLIQUID_BASE_CURRENCY |
chains.hyperliquid.slippage | 1-5000 (bps) | 50 | CABAL_HYPERLIQUID_SLIPPAGE |
chains.hyperliquid.explorer | hyperliquid | hyperliquid | CABAL_HYPERLIQUID_EXPLORER |
Chain aliases work in dot-paths: chains.sol.slippage is the same as chains.solana.slippage.