Global Flags
The rootthru-cli 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
The CLI loads and saves its config at:- 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
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
--url when you want a one-off override. Use --network when you want to target a saved profile without changing the default.
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
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
- 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
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
Notes
- 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.