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 / runtimeInstall
curl -fsSL https://install.causet.io/install.sh | bash
causet versionThe 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, fishQuick path
Request access at causet.io, then:
causet login
causet context use env sandbox
causet context show
causet build
causet deploy --fork sandboxSandbox is https://sandbox.app.causet.cloud. Production is https://app.causet.cloud. The step-by-step path is the quickstart.
Command groups
| Group | Commands |
|---|---|
| Project | new, templates, init, dev, build, plan, deploy |
| Runtime | intent, query, queries, inspect, watch |
| Cloud | login, logout, context, dashboard, orgs, platforms, apps, usage |
| Operations | release, fork, webhook, api-keys, secrets, recovery, forensics, projection |
| Utilities | doctor, about, completion, version |
causet --help
causet help advancedContext 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 prodConfig sources:
| Source | Purpose |
|---|---|
~/.causet/config.json | Session, org/platform/app/fork, cloud target |
.causet/causet.yaml | Project defaults |
CAUSET_API_URL | Override the management API. Sandbox default from context is https://sandbox.api.causet.cloud. Prod is https://api.causet.cloud. |
CAUSET_CLOUD_URL | Override the control-plane UI |
CAUSET_COMPILER | Path 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 --yesBuild
causet build # lint → validate → compile
causet build validate
causet build compile --runtime ./causet --out dist
causet dev # watch + recompilePlan (side-effect free)
causet plan --fork sandbox
causet plan --from-release 1.0.0 --to local --fork mainDeploy (golden path)
causet deploy runs:
build lint → validate → compile → plan →
release create → publish → deploy apply → activatecauset deploy --fork sandbox --yes
causet deploy --fork main --full
causet deploy --fork canary --canary --streams refund_streamRuntime: 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 sandboxAccepted output includes a timeline id (not a decision id).
Query
causet queries list
causet query refund_timeline_by_id --param refund_id=rfnd_123Inspect
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_idinspect 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 sandboxWebhooks
causet webhook add \
--name "Refund completion" \
--url https://your-app.example/api/webhooks/causet/refunds \
--events event:REFUND_COMPLETED,event:REFUND_FAILED \
--fork sandboxUse 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-checkDoctor
causet doctor
causet doctor --jsonChecks (from shipped CLI):
| Check | What it validates |
|---|---|
| CLI version | Installed causet version |
| Compiler binary | Native compiler resolves |
| Auth token | Required for Managed Causet |
| Platform / application / fork | Effective CLI context |
| Project config | .causet/causet.yaml when present |
| Environment | sandbox or prod |
| API reachable | Management 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 sandboxJSON and CI
Most commands accept --json for machine-readable output. Set CI=1 to disable prompts.