Global Flags and configuration
Use this page before deeper command reference pages when you need the shared rules that apply across the CLI.
Global Flags
Section titled “Global Flags”The root thru parser defines these flags globally, so they apply to every command family:
| Flag | What it does | Defined in |
|---|---|---|
--json | Emit machine-readable output instead of the default text output. | Cli.json |
--quiet | Suppress non-essential output, including interactive version check notifications. | Cli.quiet |
—url <URL> | Override the RPC base URL for this one invocation. | Cli.url |
—network <NAME> | Use a named network profile from config for this one invocation. | Cli.network |
Configuration File Location
Section titled “Configuration File Location”The CLI loads and saves its config at:
~/.thru/cli/config.yamlThat config stores:
- the default RPC base URL
- saved keys
- program IDs for built-in programs
- named network profiles
- the default named network
devtoolchain and SDK install metadata
Network Resolution Order
Section titled “Network Resolution Order”When a command needs an RPC target, the CLI resolves it in this order:
--url--network- the configured
default_network - the base
rpc_base_urlalready stored in config
Use --url when you want a one-off override. Use --network when you want to target a saved profile without changing the default.
Output Modes
Section titled “Output Modes”For agent workflows, prefer --json whenever you expect to parse a result or branch on output.
Use text output when:
- you are reading an error interactively
- the command is primarily instructional
- the command prints human-oriented follow-up guidance
Key Names vs Raw Addresses
Section titled “Key Names vs Raw Addresses”Identifier handling is not uniform across the CLI.
Some commands accept:
- key names from config such as
defaultortreasury - raw Thru public addresses in
ta...format - 32-byte hex public keys
Other commands require raw public keys or addresses and do not resolve key names for all arguments.
Practical rule:
- if the page says “key name from config,” a config alias is valid
- if the page says “public key” or “Thru address,” prefer a raw
ta...address or hex pubkey - if a command takes
--fee-payer, that flag usually resolves through configured key names
Configuration-Backed Program IDs
Section titled “Configuration-Backed Program IDs”Several command families default to program IDs stored in config unless you override them with flags.
Common examples:
programandabiuse configured manager program IDstokensupports--token-programregistrarandnameserviceuse configured name service and registrar program IDswthrusupports both--programand--token-program
- Load this page once, then move to a family page instead of repeating config rules in context.
- Prefer
--jsonfor automation or follow-up tool use. - If a command can mutate config, state, or on-chain accounts, the family page should be treated as the source of truth for accepted identifiers and side effects.