Quickstart
From nothing to a running control plane with data in it. Every command here is run against a clean checkout; see Installation for the extras table and the container image, and Services to switch on Temporal, Metaflow, RAG, or the LLM gateway.
1. Install
Section titled “1. Install”Requires Python 3.12+ and uv.
git clone <the cairn source repository>cd cairnuv sync --extra devEverything below is uv run <cmd> (or .venv/bin/<cmd> if you prefer). A
cold uv sync builds the whole workspace and takes a few minutes.
2. Pick a store
Section titled “2. Pick a store”cairn keeps all of its own tables in one database, chosen by a single
variable, OBS_STORAGE. Nothing else needs configuring to get started.
SQLite (zero infrastructure)
Section titled “SQLite (zero infrastructure)”export OBS_STORAGE="sqlite:///$HOME/.cairn/cairn.db"One file, created on demand. Both spellings of an absolute path work
(sqlite:///abs/path and SQLAlchemy’s sqlite:////abs/path); a path without a
leading slash is relative to the working directory.
Postgres (multi-process, production)
Section titled “Postgres (multi-process, production)”createdb cairnexport OBS_STORAGE="postgres://cairn@127.0.0.1:5432/cairn"uv sync --extra dev --extra storage-postgresThe storage-postgres extra brings asyncpg. Use Postgres whenever more than
one process touches the data — the server and a Temporal worker, for example.
3. Seed demo fixtures
Section titled “3. Seed demo fixtures”uv run cairn demoThis creates a demo workspace with three enabled workflows, three completed
runs, an audit trail, and one run paused at an approval gate — enough to
make every console surface show real content. It is idempotent, so re-run it
freely. Tear it down with uv run cairn demo --archive (a soft delete: runs
and audit history are preserved).
4. Check the install
Section titled “4. Check the install”uv run cairn doctor # every setting, its value, and service reachabilityuv run cairn ls # what packs and workflows are installeddoctor is the fastest way to see what cairn thinks its configuration is —
it prints each knob with its resolved value or the default it fell back to.
5. Run the server
Section titled “5. Run the server”OBS_TRIGGER_PORT=8000 uv run cairn-servercairn-server is a separate console script, not a CLI verb. It serves the API
and the web console from one port:
curl -s localhost:8000/healthz# {"ok":true,"skills_loaded":3,"environment":"production", ...}Then open http://localhost:8000/console/ and switch to the demo
workspace (top bar) to see the seeded runs.
6. Run the console in dev mode (optional)
Section titled “6. Run the console in dev mode (optional)”The server already serves a built console. You only need this if you are changing the UI and want hot reload:
npm --prefix console installnpm --prefix console run dev # Vite dev server on :5173, proxying the APIOpen http://localhost:5173/console/. To produce the bundle the server ships:
npm --prefix console run build # type-checks, then writes console/distThe engine image bakes console/dist in at build time, so a stale bundle is
the usual cause of “my UI change didn’t show up in the container”.
Run something
Section titled “Run something”--input takes the path to a JSON file of inputs, not inline key=value
pairs. No sample data ships in the repo yet, so make some:
cat > /tmp/sample.jsonl <<'EOF'{"input": "great product", "output": "thanks!"}{"input": "call me at 415-555-0199", "output": "noted"}EOFecho '{"path": "/tmp/sample.jsonl"}' > /tmp/input.jsonCompile and inspect the plan without executing anything — no credentials needed:
uv run cairn run dataset-readiness/check --input /tmp/input.json --dry-runuv run cairn replay <run-id> # the persisted trace of a past runWhere to next
Section titled “Where to next”- Services — enable Temporal, Metaflow, Prefect, RAG, LiteLLM, MLflow, and OpenTelemetry.
- Deployment — the compose stack, TLS, auth, and profiles.
- Web console — what each surface shows.