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 version

See Install Causet for sign-in, local vs. cloud commands, and next steps. Homebrew and npm wrappers are planned — see Roadmap.


Commands

CommandStatusDescription
causet versionavailablePrint CLI version, commit, and build date; verifies compiler version parity
causet build compileavailableCompile a .causet application to IR (real name: build compile, not bare compile)
causet devavailableLocal compile + file-watch loop (local only — does not push IR to a running fork)
causet doctoravailableChecks CLI version, compiler binary, auth, context, and runtime/query/cloud reachability — narrower than the checks described below
causet forensicsavailableSandbox drift check (replay-check) and per-decision inverse repair (repair-plan / repair-apply) — see Forensics CLI
causet inspect entity / causet inspect timelineavailableInspect an entity’s current snapshot or its deterministic decision-by-decision timeline (--entity, --stream, --fork)
causet fork create / list / diff / deleteavailableCreate and manage sandbox forks of state for replay and testing — e.g. causet fork create <name> --parent main
causet recovery replay / causet recovery rewindavailableSandbox-only stream replay from a ledger cursor — see Recovery
causet planavailableIR-level change analysis before deploy — shows what will change
causet projections listproposed — no CLI equivalent todayList projections and their status
causet projections doctorproposed — no CLI equivalent todayValidate projection health before deploy
causet projections replayproposed — no CLI equivalent todayRebuild a specific projection
causet projections failures listproposed — no CLI equivalent todayList open projection failures
causet projections failures retryproposed — no CLI equivalent todayRetry a specific projection failure
causet replayproposed — different from the real causet recovery replayReset consumer group offset for replay
causet migrations applyproposed — no CLI equivalent todayApply IR-driven DDL to a tenant schema
causet migrations statusproposed — no CLI equivalent todayShow pending vs applied migrations

Global Flags

FlagDescription
--config <path>Path to causet config file (default: ~/.causet/config.yaml)
--env <name>Target environment (e.g. production, staging)
--verboseEnable verbose output
--helpShow 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:

CodeMeaning
0Success
1Error or issues found
2Invalid arguments