Show / get / set configuration values.
wallet-cli config [<key>] [<value>] [options]
key— config key to read or set; omit to show the whole effective configvalue— new value; omit to read the key
Global options only.
Known keys:
| Key | Values | Built-in default | Meaning |
|---|---|---|---|
defaultNetwork |
network id | tron:mainnet |
Network used when --network is omitted |
defaultOutput |
text | json |
text |
Output format when -o is omitted |
timeoutMs |
integer ms | 60000 |
Default per RPC/device call timeout (--timeout overrides) |
waitTimeoutMs |
integer ms ≥ 0 | 60000 |
Default --wait polling cap for broadcast commands |
gasfreeApiKey |
string | (unset) | GasFree API key (gasfree) |
gasfreeApiSecret |
string | (unset) | GasFree API secret |
tronlinkSecretId |
string | (unset) | TronLink multi-sig service secretId (tx multisig) |
tronlinkSecretKey |
string | (unset) | TronLink multi-sig service secretKey |
tronlinkChannel |
string | (unset) | TronLink multi-sig service channel |
networks |
— | — | Known networks (read-only list) |
Precedence for a value that has both a flag and a config key (highest first): command-line flag > config value > built-in default — e.g. --timeout > config timeoutMs > built-in 60000.
The external-service credentials are per-environment: the GasFree (gasfreeApiKey / gasfreeApiSecret) and TronLink (tronlinkSecretId / tronlinkSecretKey / tronlinkChannel) credentials must match the service environment of the current --network (mainnet vs testnet); a mismatch fails with provider_error, so swap them when you switch environments. When a key is unset, the commands that need it fail with a clear error — gasfree_credentials_missing for gasfree, tronlink_credentials_missing for tx multisig.
An invalid value returns invalid_value (exit 2).
Show the whole effective config:
wallet-cli configdefaultNetwork tron:mainnet
defaultOutput text
timeoutMs 60000
waitTimeoutMs 60000
gasfreeApiKey ak_9f2c71d0e8b64a53
gasfreeApiSecret sk_e37a90c412f85b6d
tronlinkSecretId TEST
tronlinkSecretKey TESTTESTTEST
tronlinkChannel test
networks tron:mainnet, tron:nile, tron:shastaRead one key, then set it:
wallet-cli config timeoutMstimeoutMs 60000wallet-cli config timeoutMs 120000✅ Set config
Key timeoutMs
Value 120000wallet-cli config timeoutMs 120000 -o json{"schema":"wallet-cli.result.v1","success":true,"command":"config","data":{"key":"timeoutMs","value":120000,"input":"120000"},"meta":{"durationMs":3,"warnings":[]}}data varies by mode. Local command — no chain block.
| Mode | data fields |
|---|---|
| show all (no args) | one field per key: defaultNetwork, defaultOutput, timeoutMs, waitTimeoutMs, gasfreeApiKey, gasfreeApiSecret, tronlinkSecretId, tronlinkSecretKey, tronlinkChannel, networks (array of network ids) |
read (<key>) |
key, value |
set (<key> <value>) |
key, value, input (the raw string as typed) |
0 success · 1 execution failure (invalid_config — config.yaml is unreadable or not valid YAML; insecure_config — it holds service credentials but is a symlink or group/world-readable, so chmod 600 it) · 2 usage error (invalid_value — unknown key). See machine-interface.