12Docs

CLI reference

Every bounded command and flag, grouped by purpose. One binary, no account creation; bounded <cmd> --help prints the same with an example block.

Install

curl -fsSL https://get.bounded.sh/install.sh | sh

Global flags: --json (structured output on commands that implement it; in CLI 0.0.51,bounded verify still emits its human proof report even when this flag is present), --quiet (minimal output), --env (production default, or staging; also BOUNDED_ENV). No login step: bounded.json records the project defaults, and the selected key source, usually ~/.bounded/credentials (or BOUNDED_PRIVATE_KEY), is your account (Auth).

Policy lifecycle

CommandDoesKey flags
initWrite starter policy.json plus public bounded.json--force
verify [policy.json]Run the Z3 proof engine, print the report + counterexamples--app-id (defaults to bounded.json), --operation, --constants
deploy [policy.json]Validate, compile, and push the policy--app-id (defaults to bounded.json) | --create --name | --environment, --protocol, --constants
bounded init                                            # scaffold policy.json + bounded.json
bounded verify                                         # prove the local policy first
bounded deploy --create --name my-app                  # gate again, create app + record appId
# after each policy change:
bounded verify
bounded deploy                                         # server re-runs the blocking proof gate

verify --operation

Default is verifyForDeploy (prove the whole policy). The others probe one expression:

--operationNeedsProves
verifyForDeploy, every obligation for the whole policy
checkTautology--expressionthe expression is always true
checkContradiction--expressionthe expression is always false
checkSatisfiability--expressionthe expression can be true
checkImplication--rule + --propertythe rule implies the property

--constants / --environment

--constants NAME=value (repeatable or comma-separated) does CLI-side substitution for the legacy @constants.NAME token, for one-off CI overrides; prefer an in-policy constants block (Policy reference). --environment <name> selects an entry from the policy’s environments block: it overlays that env’s constants, targets its appId, and strips the block before shipping a normal policy.

Identity & teams

CommandDoes
whoamiShow address, environment, key source (creates the key on first run)
linkBind the keypair to an email account via an OAuth device flow. Flags: --no-browser, --email <addr> for headless OTP approval, --timeout <dur> (default 10m).
share <wallet|email> --role developer|admin|viewer|billing --app-id <id>Add a collaborator. Wallet → direct; email → resolved to an auto-provisioned wallet so the invitee needs no wallet.policy is a legacy alias for developer. Owner only.
unshare <wallet> --app-id <id>Remove a collaborator (owner only)
collaborators --app-id <id>List collaborators (alias: shares)

Data plane

All data subcommands use bounded.json appId by default; pass --app-id <id> to override. Writes go through the realtime worker, which enforces the deployed policy atomically.

CommandDoes
data setWrite one document
data set-manyAtomic all-or-nothing batch (--from-json)
data getRead a doc, or list/filter a collection
data get-manyBatch-read paths from a JSON array
data queryRun a named policy query
data aggregateGrouped count/sum/avg/min/max
data searchFull-text search a collection
bounded data set       --path agents/a1/spend/a --data '{"amount":60}'
bounded data set-many  --from-json bundle.json
bounded data get       --path agents/a1/spend --filter '{"amount":{"$gt":10}}' --sort amount:desc --limit 20
bounded data aggregate --path agents/a1/spend --group category --sum amount
bounded data search    --path notes --query "shipping"

data get flags (collection reads)

FlagMeaning
--filter '{...}'MongoDB-style filter, e.g. {"amount":{"$gt":10}}
--sort field:asc|descrepeatable sort spec
--limit Npage size
--cursor <tok>pagination cursor from a prior page's nextCursor
--prompt "..."natural-language filter evaluated server-side
--include-subpathsalso walk nested sub-collections
--shape '{...}'resolve related docs inline

data aggregate: --group (repeatable) + at least one of --count, --sum F, --avg F, --min F, --max F; optional --filter. data search: --query (required), optional --fields a,b, --limit, --cursor. On set / set-many, --skip-preflight is an onchain-only flag (skips RPC preflight simulation; no effect on the realtime data plane).

Functions & live

functions, the imperative escape hatch
bounded functions deploy <name> --entry <file> \
  --auth '<rule>' [--timeout <sec>] [--secret NAME] [--act-as <address>]
printf '%s' "$VALUE" | bounded secret put NAME --value-stdin --app-id <id>
bounded functions list
bounded functions invoke <name> [--data '<json>']
bounded functions logs   <name>
live, native server-authoritative rooms
bounded live deploy <module>.live.ts   # upload source; prints version (etag)

Full guides: Functions and Realtime & live.