On-disk layout
Everything under ~/.cori/ — what each file and directory is for.
Cori's state is in ~/.cori/. There is no database, no SQLite, no migrations. All state is plain files (TOML, JSON). Your workflow folders are separate — Cori reads from them but never writes to them.
Directory tree
~/.cori/
config.toml # Your configuration (temporal, llm providers, remotes)
cache/
<compiled-workflow-hash>/ # Compiled TypeScript step files, one dir per workflow version
remote/
<host>/<owner>/<repo>/ # Fetched remote workflow content
pins.json # Pinned ref → commit SHA mappings
trust.json # First-run trust decisions per remote
runs/
<run-key>/
<utc-timestamp>.json # JSON run trace for each execution
credentials/
<provider>.json # Credential metadata only — actual tokens in OS keychain
cluster/
<queue-name>.json # Per-task-queue worker registry entries
runtime/ # Ephemeral runtime state for in-progress runs
state/ # Other persistent Cori stateKey entries
config.toml
Your configuration. Read and written by cori config get/set. Contains non-secret configuration (endpoint host, allowed remote hosts) and credential key names. Actual secrets are in the OS keychain.
cache/
Compiled workflow artifacts. Each subdirectory corresponds to a specific workflow version (keyed by content hash). Cori compiles TypeScript step files here on first use and reuses the cache on subsequent runs.
cache/remote/ holds fetched remote workflow content. pins.json maps mutable refs (@v1) to the resolved commit SHAs. trust.json records your first-run consent decisions.
runs/<key>/<utc>.json
One JSON file per workflow execution. The run key encodes the workflow identity (local path hash or remote ref). The filename is the UTC timestamp of the run start. See Run trace for the file's contents.
There is no database. Run history is a flat directory of JSON files.
credentials/<provider>.json
Metadata about stored credentials (which providers have keys). The actual tokens are stored in the OS keychain (Keychain Access on macOS, libsecret on Linux). Never contains raw API keys.
cluster/<queue>.json
Per-task-queue worker registration. Updated when cori work or cori work --shared starts or stops.
Run key shape
For local workflows: local/<path-hash>
For remote workflows: remote/<host>/<owner>/<repo>[/<subpath>]@<resolved-sha>
Cache key shape
Compiled workflow cache keys are content-addressed (based on the hash of the step files and manifest). Changing a step file produces a new cache entry; the old one is retained until Cori cleans up stale entries.