Skip to content

Command Reference

This page lists the current public Petri command families. Run petri <command> --help for exact flags shipped by your build.

Option Purpose
--backend-url <URL> Amoeba API base URL.
--rpc-url <URL> One-process Solana and Light/Photon RPC override.
--cluster <LABEL> Expected cluster label; it cannot override identity checks.
--solana-config <PATH> Solana CLI configuration path.
--commitment <LABEL> Preflight and confirmation commitment.
--keypair <PATH_OR_URL> Local keypair path or hardware-wallet URL.
--allow-insecure-keypair Explicitly accept unsafe Unix keypair permissions.
--output plain|json Select output format.
--json Shortcut for JSON output.
--quiet Suppress plain output while preserving JSON.
--no-color Disable terminal color.
Command Purpose
markets List markets; show, status, print, or chart one market.
contracts --market <ID> Browse bounded option contracts.
trades prepare Prepare and validate one collective exact-input secondary swap.
trades submit Reobserve, validate, sign, submit, and confirm that swap.
writers Inspect and operate collective writer sleeves.
liquidity Validate manager-liquidity plan parity; public Petri does not execute it.
wallet Read the configured wallet address, token balances, and user collateral.
staking Queue/activate AMBA, unstake/claim sAMBA value, and inspect status.
history Read indexed wallet activity.
settlements Inspect settlement records and oracle readiness.
oracle Read current oracle state and review semantic drafts.
config Show non-secret effective settings and manage the saved RPC URL.
mcp Enable, repair, disable, or inspect Petri’s read/draft agent connection.
update Check for and install a trusted Petri source update.
tui Open the interactive Lab Bench.
Command Purpose
writers list [--owner <PUBKEY>] List visible collective sleeves.
writers show --sleeve <PUBKEY> Show exact sleeve and staged state.
writers deposit --sleeve <PUBKEY> --amount <ATOMS> Deposit writer principal and receive Flat under current funding rules.
writers bid --auction <PUBKEY> --series-index <INDEX> --price <ATOMS> --amount <ATOMS> Place a funded primary bid.
writers close-preview --sleeve <PUBKEY> --amount <ATOMS> --minimum-withdrawal <ATOMS> Request the pure Lean close preview.
writers close ... [--close-request <PUBKEY>] Submit only the next admitted staged-close action.
writers close-status --close-request <PUBKEY> Show progress and the next permitted close action.
writers claim --sleeve <PUBKEY> --variant collective-long|flat-residual ... Claim from the relevant frozen settlement ledger.
writers transfer-flat --sleeve <PUBKEY> --destination <PUBKEY> --amount <ATOMS> Transfer Flat through the exact Light Token plan.
writers policy-audit --sleeve <PUBKEY> Show the active policy and immutable commitments.
Command Purpose
staking or staking status Show available/queued AMBA, sAMBA, voting power, redeemable AMBA, and waits.
staking stake --amount <AMBA> Queue AMBA for the seven-day activation wait.
staking activate [--min-received <sAMBA>] Activate mature queued AMBA at the current share rate.
staking cancel Return queued AMBA without minting sAMBA.
staking unstake --amount <sAMBA> [--min-received <AMBA>] Burn sAMBA and start the seven-day unstaking wait.
staking claim Claim the fixed AMBA amount after the wait.

Queued AMBA earns no rewards or voting power. Staking yield is included in redeemable AMBA; there is no separate yield claim.

The Lab Bench currently covers markets, charts, options, wallet/ledger, staking, oracle tasks, GitBook help, Terms, and AI-agent connection management. Use the writers command family for collective writer operations; there is no dedicated writer TUI screen yet.

Petri MCP supports inspection, semantic drafts, validation, and JSON parity. It never invokes the configured wallet and exposes no transaction approval, signing, or submission tool.