Skip to main content
Use this page before deeper command reference pages when you need the shared rules that apply across the CLI.

Global Flags

The root thru-cli parser defines these flags globally, so they apply to every command family:
FlagWhat it doesDefined in
--jsonEmit machine-readable output instead of the default text output.Cli.json
--quietSuppress 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:
~/.thru/cli/config.yaml
That config stores:
  • the default RPC base URL
  • saved keys
  • program IDs for built-in programs
  • named network profiles
  • the default named network
  • dev toolchain and SDK install metadata

Network Resolution Order

When a command needs an RPC target, the CLI resolves it in this order:
  1. --url
  2. --network
  3. the configured default_network
  4. the base rpc_base_url already 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

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 default or treasury
  • 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

Several command families default to program IDs stored in config unless you override them with flags. Common examples:
  • program and abi use configured manager program IDs
  • token supports --token-program
  • registrar and nameservice use configured name service and registrar program IDs
  • wthru supports both --program and --token-program

Notes

  • Load this page once, then move to a family page instead of repeating config rules in context.
  • Prefer --json for 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.