CLI Overview
causet-cli is a Go CLI tool for compiling, developing, debugging, and operating Causet applications from the command line.
Note: This section predates the shipped CLI and mixes real commands with an earlier, more elaborate proposal for self-hosted operations (Kafka/Redis/S3-backed microservices). Each command’s page marks its actual status below. For the authoritative, currently-shipped command set, see the CLI table in Install Causet and the commands used throughout Deployments.
Installation
Install the CLI with the install script:
curl -fsSL https://raw.githubusercontent.com/Causet-Inc/causet-cli/main/install.sh | sh
causet versionSee Install Causet for sign-in, local vs. cloud commands, and next steps. Homebrew and npm wrappers are planned — see Roadmap.
Commands
| Command | Status | Description |
|---|---|---|
causet version | available | Print CLI version, commit, and build date; verifies compiler version parity |
causet build compile | available | Compile a .causet application to IR (real name: build compile, not bare compile) |
causet dev | available | Local compile + file-watch loop (local only — does not push IR to a running fork) |
causet doctor | available | Checks CLI version, compiler binary, auth, context, and runtime/query/cloud reachability — narrower than the checks described below |
causet forensics | available | Sandbox drift check (replay-check) and per-decision inverse repair (repair-plan / repair-apply) — see Forensics CLI |
causet inspect entity / causet inspect timeline | available | Inspect an entity’s current snapshot or its deterministic decision-by-decision timeline (--entity, --stream, --fork) |
causet fork create / list / diff / delete | available | Create and manage sandbox forks of state for replay and testing — e.g. causet fork create <name> --parent main |
causet recovery replay / causet recovery rewind | available | Sandbox-only stream replay from a ledger cursor — see Recovery |
causet plan | available | IR-level change analysis before deploy — shows what will change |
causet projections list | proposed — no CLI equivalent today | List projections and their status |
causet projections doctor | proposed — no CLI equivalent today | Validate projection health before deploy |
causet projections replay | proposed — no CLI equivalent today | Rebuild a specific projection |
causet projections failures list | proposed — no CLI equivalent today | List open projection failures |
causet projections failures retry | proposed — no CLI equivalent today | Retry a specific projection failure |
causet replay | proposed — different from the real causet recovery replay | Reset consumer group offset for replay |
causet migrations apply | proposed — no CLI equivalent today | Apply IR-driven DDL to a tenant schema |
causet migrations status | proposed — no CLI equivalent today | Show pending vs applied migrations |
Global Flags
| Flag | Description |
|---|---|
--config <path> | Path to causet config file (default: ~/.causet/config.yaml) |
--env <name> | Target environment (e.g. production, staging) |
--verbose | Enable verbose output |
--help | Show help for any command |
Configuration File
The CLI reads configuration from ~/.causet/config.yaml:
environments:
local:
runtime_url: "http://localhost:8080"
query_url: "http://localhost:8082"
saas_url: "http://localhost:8085"
control_plane: "http://localhost:3000"
kafka: "localhost:9092"
postgres:
causet: "postgres://localhost:5432/causet"
projections: "postgres://localhost:5432/projections"
production:
runtime_url: "https://runtime.mycompany.com"
query_url: "https://query.mycompany.com"
saas_url: "https://saas.mycompany.com"
kafka: "kafka-broker-1.mycompany.com:9092"Proposed: The configuration file format is on the roadmap. Currently the CLI reads individual flags or environment variables.
Exit Codes
All commands follow standard exit code conventions:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error or issues found |
| 2 | Invalid arguments |