ReferenceCLI Reference

Causet CLI

The causet CLI is the client for Managed Causet. It builds, deploys, submits intents, and inspects timelines. It does not install the platform.

Backend model:

org → platform → app → fork → release / deploy / runtime

Install

curl -fsSL https://install.causet.io/install.sh | bash
causet version

The installer places causet on your PATH. Commands that compile locally (causet build, causet build compile) invoke the causet-compiler binary (bundled or resolved via CAUSET_COMPILER).

Shell completions:

causet completion bash   # or zsh, fish

Quick path

Request access at causet.io, then:

causet login
causet context use env sandbox
causet context show
causet build
causet deploy --fork sandbox

Sandbox is https://sandbox.app.causet.cloud. Production is https://app.causet.cloud. The step-by-step path is the quickstart.


Command groups

GroupCommands
Projectnew, templates, init, dev, build, plan, deploy
Runtimeintent, query, queries, inspect, watch
Cloudlogin, logout, context, dashboard, orgs, platforms, apps, usage
Operationsrelease, fork, webhook, api-keys, secrets, recovery, forensics, projection
Utilitiesdoctor, about, completion, version
causet --help
causet help advanced

Context and login

causet login                 # Hosted Cloud (Clerk OAuth)
causet login --token $CAUSET_TOKEN
 
causet context show
causet context use org <org_id>
causet context use platform <slug>
causet context use app <slug>
causet context use fork sandbox
causet context use env sandbox   # or prod

Config sources:

SourcePurpose
~/.causet/config.jsonSession, org/platform/app/fork, cloud target
.causet/causet.yamlProject defaults
CAUSET_API_URLOverride the management API. Sandbox default from context is https://sandbox.api.causet.cloud. Prod is https://api.causet.cloud.
CAUSET_CLOUD_URLOverride the control-plane UI
CAUSET_COMPILERPath to causet-compiler

Project: init, build, plan, deploy

Scaffold

causet templates list
causet new event-driven-app my-event-app
causet init support-agent --template ai-support-agent --yes

Build

causet build                 # lint → validate → compile
causet build validate
causet build compile --runtime ./causet --out dist
causet dev                   # watch + recompile

Plan (side-effect free)

causet plan --fork sandbox
causet plan --from-release 1.0.0 --to local --fork main

Deploy (golden path)

causet deploy runs:

build lint → validate → compile → plan →
release create → publish → deploy apply → activate
causet deploy --fork sandbox --yes
causet deploy --fork main --full
causet deploy --fork canary --canary --streams refund_stream

Runtime: intents, queries, inspect

Submit an intent

causet intent REFUND_REQUESTED \
  --stream refund_stream \
  --entity rfnd_123 \
  --payload '{"refund_id":"rfnd_123","order_id":"ord_1002","customer_id":"cus_1","amount":50,"reason":"damaged","requested_at":"2026-07-15T12:00:00Z"}' \
  --fork sandbox

Accepted output includes a timeline id (not a decision id).

Query

causet queries list
causet query refund_timeline_by_id --param refund_id=rfnd_123

Inspect

causet inspect                                    # interactive
causet inspect state --stream refund_stream --fork sandbox
causet inspect entity rfnd_123 --stream refund_stream --fork sandbox
causet inspect events --stream refund_stream --fork sandbox
causet inspect timeline --entity rfnd_123 --stream refund_stream --fork sandbox
causet inspect timeline-item <timeline-id>
causet inspect event REFUND_COMPLETED
causet inspect projection refund_timeline
causet inspect query refund_timeline_by_id

inspect state shows current entity snapshots; inspect timeline shows committed steps; inspect events lists domain events for a stream/fork.

Watch

causet watch --stream refund_stream --fork sandbox

Webhooks

causet webhook add \
  --name "Refund completion" \
  --url https://your-app.example/api/webhooks/causet/refunds \
  --events event:REFUND_COMPLETED,event:REFUND_FAILED \
  --fork sandbox

Use this to push Causet state changes back into your existing DB. See Webhooks.


Forks and recovery

causet fork list
causet fork create refund-debug --parent sandbox
causet fork diff sandbox refund-debug
 
causet recovery replay --stream refund_stream
causet recovery rewind --entity rfnd_123 --to-timeline <n>
causet recovery repair plan
causet forensics replay-check

Doctor

causet doctor
causet doctor --json

Checks (from shipped CLI):

CheckWhat it validates
CLI versionInstalled causet version
Compiler binaryNative compiler resolves
Auth tokenRequired for Managed Causet
Platform / application / forkEffective CLI context
Project config.causet/causet.yaml when present
Environmentsandbox or prod
API reachableManagement API for the active environment

Retrofit loop (end to end)

Typical path for Retrofit an Existing App:

curl -fsSL https://install.causet.io/install.sh | bash
causet version
 
causet login
causet context use env sandbox
 
# In your workflow project (e.g. examples/payment-retrofit)
causet build compile --runtime . --out dist
causet deploy --fork sandbox
 
causet inspect timeline --entity <id> --stream payment --fork sandbox
causet webhook add --name "Refund completion" --url https://example.com/api/webhooks/causet/refunds \
  --events event:REFUND_COMPLETED,event:REFUND_FAILED --fork sandbox

JSON and CI

Most commands accept --json for machine-readable output. Set CI=1 to disable prompts.