Skip to main content
gen config manages the persisted client configuration the CLI uses to reach an RPC endpoint. There are two things to set: the RPC URL and any default HTTP headers (for example, the bearer token required by DevNet). Both are stored on disk and applied to every subsequent gen client or gen wallet call that talks to the network. You can always override the persisted values on a single call with the global --rpc-url <URL> (-s) and --header <NAME=VALUE> flags. The persisted file is the default; flags win for that invocation only.

Where the config lives

The CLI stores its client config at ~/.gen/client_config.yml. Print the resolved path:
gen config path
The file is plain YAML. You can edit it by hand, but the gen config subcommands handle the read-modify-write for you and avoid format mistakes. Wallets are stored separately under ~/.gen/wallets/; see gen wallet.

gen config init

Create the default config file if it does not already exist. Safe to run on a fresh machine; it does nothing if the file is already present.
gen config init
You generally do not need to run this. The first gen config set call creates the file if it is missing.

gen config show

Print the effective config (file values plus the built-in defaults). The output is YAML:
DevNet access. Ask your Gen Labs contact for the RPC URL and a bearer token; substitute them for <DEVNET_RPC_URL> and <your-jwt> in the examples below.
gen config show
client:
  rpc_url: <DEVNET_RPC_URL>
  headers:
    authorization: Bearer <your-jwt>
    x-gen-protocol-version: 0.1.0
x-gen-protocol-version is set by the CLI and pins the wire-protocol version it speaks. You do not need to manage it.

gen config set

Persist a configuration value. Two targets: rpc-url and header.

gen config set rpc-url <URL>

Set the default RPC endpoint. Subsequent gen client and gen wallet calls use this URL unless --rpc-url/-s is passed.
gen config set rpc-url <DEVNET_RPC_URL>

gen config set header <NAME> <VALUE>

Persist a default HTTP header sent on every RPC request. Headers are stored case-insensitively (lower-case in the file). The most common use is the DevNet bearer token:
gen config set header authorization "Bearer <your-jwt>"
Set additional headers by repeating the command with a different name. Calling set header for a name that already exists replaces the value.

Configuring for DevNet

The two-command sequence every new partner runs after receiving their JWT:
gen config set rpc-url <DEVNET_RPC_URL>
gen config set header authorization "Bearer <jwt-from-gen-labs>"
After this, gen wallet and gen client calls reach DevNet automatically. For the current URL and access policy, see Network status.

gen config unset

Remove a persisted value. Two targets, matching set.

gen config unset rpc-url

Clear the persisted RPC URL. After this, gen client/gen wallet calls require --rpc-url on every invocation.
gen config unset rpc-url

gen config unset header <NAME>

Remove a single persisted header.
gen config unset header authorization

Global flags

These global flags apply to every gen client and gen wallet subcommand that talks to RPC:
  • -s, --rpc-url <URL>: override the persisted RPC URL for this call only.
  • --header <NAME=VALUE>: add or override a header for this call only. Accepts name=value or quoted 'name: value'. Repeat the flag for multiple headers.
  • -j, --json: emit the JSON envelope ({ ok, command, timestamp, result | error }) instead of human output. Required for scripting.
  • --wallet-root <PATH>: point at a wallet store other than ~/.gen/wallets. Useful for tests and ephemeral environments.
gen config itself only accepts -j and -h (see gen config --help); it does not need the connection flags.

See also

  • Network status: the current RPC endpoint and the access requirements for each network.
  • gen wallet: wallet store layout (~/.gen/wallets/) and how the active wallet is selected.
  • Quickstart: configure the CLI against DevNet and send your first transfer.