Covendocs

Getting Started

Get up and running with Coven in minutes.

Getting Started with Coven

This guide takes a new user from a fresh checkout or npm install to a visible project-scoped agent session.

What Coven Is

Coven is a local-first runtime for coding-agent harnesses. It runs supported CLIs such as Codex and Claude Code inside explicit project boundaries, records session metadata and events, and exposes the work through a CLI, TUI, and local socket API.

The short promise:

One project. Any harness. Visible work.

Install Paths

For the full platform matrix, source build path, WSL2 guidance, and unsupported container/Nix status, see Install Coven.

Use the npm wrapper when you want the fastest public install:

npx @opencoven/cli doctor
pnpm dlx @opencoven/cli doctor

Build from source when you are contributing to Coven:

git clone https://github.com/OpenCoven/coven.git
cd coven
cargo build --workspace
cargo run -p coven-cli -- doctor

Prerequisites

Coven needs the local prerequisites below.

Coven prerequisites
PrerequisiteRequired whenPurpose
Rust stableBuilding from sourceCompiles the Rust CLI and daemon workspace.
GitAll installsProvides repository context and source checkout support.
Unix-like local runtimeCurrent daemon pathSupports the local Unix socket and PTY execution path.
Supported harness CLI on PATHRunning sessionsLets Coven launch Codex or Claude Code.

Supported v0 harnesses are codex and claude.

Install and authenticate a harness before expecting coven run to work:

npm install -g @openai/codex
codex login

npm install -g @anthropic-ai/claude-code
claude doctor

First Run

From a project directory:

coven

The default command opens the prompt-first TUI.

First-run TUI controls
ActionInputResult
Type a taskfix the failing tests or /run codex fix the failing testsLaunch or route the requested work.
Select a menu itemArrow keys or single-key shortcut, then EnterRuns the selected TUI action.
Open helph or /helpShows natural-language and slash-command examples.
QuitCtrl+C or EscExits the TUI.

If you prefer to run the explicit setup checks:

coven doctor

coven doctor checks setup readiness before you launch work.

Doctor checks
CheckGroupOutput
Store readinessStateConfirms local Coven state can be read and written.
Project detectionProjectShows whether Coven can identify a usable project root.
Built-in harness availabilityHarnessesChecks Codex and Claude Code executable availability.
Missing setup next stepsGuidancePrints the next install or auth step.

Run a Session

Start the daemon, then launch a harness session from a repository or project directory:

coven daemon start
coven run codex "fix the failing tests"

or:

coven run claude "polish the CLI help text"

For a more readable session list, pass a title:

coven run codex "update the docs" --title "Docs refresh"

Use a specific working directory only when it is inside the detected project root:

coven run codex "inspect this package" --cwd packages/cli

Coven rejects outside-root working directories. Clients may validate for nicer UX, but the Rust daemon is the authority.

Browse Sessions

In an interactive terminal:

coven sessions

This opens the session browser. You can select a session and choose contextual actions.

Session browser actions
ActionAvailable forEffect
RejoinLive sessionsReattaches to active output and input.
View LogCompleted sessionsReplays completed output.
SummonArchived sessionsRestores the record to the active list.
ArchiveCompleted visible sessionsHides the record while preserving events.
SacrificeNon-running sessionsPermanently deletes the session and events.

For scripts or copy/paste workflows:

coven sessions --plain
coven sessions --all --plain
coven sessions --json
coven sessions --json --all

Attach, Archive, Summon, and Sacrifice

Lower-level session verbs remain available:

coven attach <session-id>
coven archive <session-id>
coven summon <session-id>
coven sacrifice <session-id> --yes

Archive is reversible. Summon restores an archived session to the active list. Sacrifice is destructive and refuses live sessions.

Stop the Daemon

coven daemon stop

Use restart when the socket or daemon state looks stale:

coven daemon restart

Diagnostics and Relief

coven pc is a macOS-first system diagnostics and relief tool surfaced through the Coven CLI. All read operations are side-effect free.

Inspect:

coven pc                  # full report: CPU, memory, disk, top processes
coven pc status           # one-line health summary with 🟢/🟡/🔴 indicators
coven pc status --json    # machine-readable health summary
coven pc top --n 10       # top-N processes by CPU usage
coven pc disk             # disk usage breakdown

Relief operations mutate system state and require an explicit --confirm gate:

coven pc kill <pid> --confirm     # SIGTERM with PID identity re-check
coven pc cache clear --confirm    # clear ~/Library/Caches + /Library/Caches

Safety constraints in v1:

coven pc safety constraints
ConstraintRisk areaBehavior
Explicit write gateMutationAll write operations require --confirm; there is no bypass path.
SIGTERM onlyProcess controlTermination never escalates to SIGKILL.
PID identity re-checkProcess controlProcess identity is re-checked immediately before SIGTERM to prevent PID reuse.
Hardcoded cache path listFilesystemCache clear does not use glob expansion.
Redacted process argumentsPrivacyArguments are redacted by default; pass --verbose to inspect them.
No privileged system controlSystem integrityNo sudo, no LaunchAgent mutation, no system service control.

End-to-end Flow

Rendering diagram…

The "install → doctor → daemon → run → sessions" loop is the entire happy path for a first session. Everything else in this guide is fallback or troubleshooting.

Contributor Verification Loop

Before opening a PR:

cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --locked
python scripts/check-secrets.py

For daemon/session changes, also run the smoke test:

cargo test -p coven-cli --test smoke -- --nocapture

The smoke test uses a temporary COVEN_HOME and a fake harness executable. It does not require private harness credentials.

Last updated on

On this page