Configuration and Wallets
The CLI is a Rust command. Run examples from the ameba_cli project unless a Docker command says otherwise.
cargo run -- --helpBackend and network
Section titled “Backend and network”The CLI talks to the hosted Amoeba backend by default at https://api.amoeba.farm.
export AMEBA_BACKEND_URL=https://api.amoeba.farmexport AMEBA_CLUSTER=devnetexport SOLANA_RPC_URL=https://api.amoeba.farmUse http://127.0.0.1:4000 only when you intentionally want a local development backend. A devnet CLI pointed at one backend while a wallet expects another environment can produce confusing results.
Wallet and signing
Section titled “Wallet and signing”For signing flows, pass a keypair path explicitly:
petri --keypair ~/.config/solana/id.json wallet addressThe CLI also understands standard Solana CLI config:
export SOLANA_CONFIG=~/.config/solana/cli/config.ymlexport SOLANA_KEYPAIR=~/.config/solana/id.jsonexport SOLANA_COMMITMENT=confirmedOn Unix systems, the CLI refuses group-readable or world-readable keypair files unless explicitly allowed:
petri --allow-insecure-keypair --keypair ./local-test-keypair.json wallet addressUse that override only for disposable local test keys.
Unified RPC configuration
Section titled “Unified RPC configuration”Petri uses https://api.amoeba.farm by default for both standard Solana and
compressed-state JSON-RPC methods. Save an advanced override from the CLI:
petri config set rpc-url https://rpc.examplepetri config showpetri config reset rpc-urlThe CLI and TUI read the same saved setting; endpoint editing is intentionally not exposed in the TUI. A custom endpoint must implement any compressed-state methods required by the selected command.
Remote overrides require HTTPS. Plain HTTP is accepted only for loopback or local-validator development. URL userinfo credentials are rejected, and Petri’s compressed-state and direct HTTP requests do not follow redirects.
Petri does not trust the RPC URL or AMEBA_CLUSTER label by itself. Before raw
chain reads, signing, or transaction broadcast, it compares its compiled
deployment catalog with the API’s short-lived chain-identity proof and fresh
genesis, program, mint, vault, and Light-account observations from the selected
RPC. If they disagree, the command stops before signing or sending. A custom RPC
must serve the same Amoeba deployment as the configured API. There is no silent
Devnet tree fallback.
Output format
Section titled “Output format”Plain output is intended for people. JSON output is intended for scripts and agents.
petri marketspetri --json marketspetri --output json settlements oracle ramx JUL26You can also set:
export AMEBA_OUTPUT=jsonConfiguration checks
Section titled “Configuration checks”Use these before signing or submitting anything:
petri config showpetri config set rpc-url https://api.amoeba.farmpetri wallet addresspetri wallet balanceconfig show should display effective configuration without printing secrets.

