Configuration#
The Seesaw CLI uses a layered configuration system. Settings can be defined in a config file, environment variables, or CLI flags. When the same setting is defined in multiple places, the CLI applies a strict precedence order.
Config File#
The default config file location is:
~/.seesaw/config.yaml
Create it with:
seesaw config init-file
Full Schema#
# Solana RPC endpoint
rpc_url: https://api.mainnet-beta.solana.com
# Path to Solana keypair JSON file
keypair: ~/.config/solana/id.json
# Seesaw indexer API base URL
api_url: https://api.seesaw.markets
# Seesaw Solana program ID
program_id: SEEsawgSrxRsgtKRbaThZFEKrVqX3Y64hDipTWyi8F8
# Output format: "json" or "human"
output: json
# Blockchain target: "solana"
chain: solana
All fields are optional. Any omitted field falls back to the default value shown above. The beta CLI is Solana-only; non-Solana chain values are rejected from both config files and CLI flags.
Environment Variables#
| Variable | Description | Example |
|---|---|---|
SEESAW_RPC_URL | Solana RPC endpoint | https://api.devnet.solana.com |
SEESAW_KEYPAIR | Path to keypair file | ~/.config/solana/devnet.json |
SEESAW_API_URL | Indexer API base URL | http://localhost:3002 |
SEESAW_PROGRAM_ID | Seesaw Solana program ID | SEEsawgSrxRsgtKRbaThZFEKrVqX3Y64hDipTWyi8F8 |
SEESAW_OUTPUT | Output format | human |
Note: chain cannot be set via an environment variable. Use the config file or
the --chain CLI flag.
Example:
export SEESAW_RPC_URL=https://api.devnet.solana.com
export SEESAW_KEYPAIR=~/.config/solana/devnet.json
seesaw market get <address>
CLI Flags#
| Flag | Description |
|---|---|
--rpc-url | Override RPC endpoint |
--keypair | Override keypair path |
--api-url | Override API URL |
--program-id | Override Seesaw Solana program ID |
--config | Custom config file path |
--chain | Blockchain target: solana |
--human | Force human-readable output |
--json | Force JSON output |
Flags are specified before the subcommand:
seesaw --rpc-url https://api.devnet.solana.com --human market get <address>
Precedence#
When the same setting is defined in multiple places, the CLI resolves it in this order (highest priority first):
CLI flags > Environment variables > Config file > Defaults
For example, if rpc_url is set to https://api.mainnet-beta.solana.com in the config file and SEESAW_RPC_URL is set to https://api.devnet.solana.com, the environment variable wins. If --rpc-url https://localhost:8899 is also passed, the CLI flag wins over both.
Wallet / Keypair Setup#
For wallet setup instructions (generate a keypair, point the CLI at an existing key, devnet vs. mainnet, security notes), see the CLI Quick Start.