CLI & daemon
Everything the surfaces do rides on two binaries you can script directly.
The lectern CLI
| Command | What |
|---|---|
| lectern open . | Index a repo as a workspace (the brain's first look) |
| lectern run \"task\" [--apply] [--backend X] [--model Y] | One routed session; edits stay behind the Apply gate unless --apply, and it prints a suggested Conventional Commit for the changes |
| lectern conduct \"goal\" [--apply] | The Conductor: plan → per-model steps (parallel worktrees) → cross-review |
| lectern sessions · lectern skills list | History and learned skills from the local store |
| lectern export --session ID --out file.lec [--encrypt] | Portable session export — optionally sealed (scrypt + XChaCha20-Poly1305) |
| lectern doctor | Environment truth-check — engine + providers |
| lectern tui | Launch the terminal UI |
LECTERN_DEBUG=1 traces backend spawns and key engine events to stderr.
lecternd
A small local daemon speaking line-delimited JSON-RPC — unix socket on Linux/macOS, localhost + a per-boot token on Windows. It powers the TUI, background schedules (30s due-check loop), and any client you write:
Methods: run · cancel · sessions · history · session_rename · session_pin · models · skills · brain · usage · mcp_overview · ping/status. Runs stream AgentEvents as notifications on the same connection.
Schedules
Queue prompts for later from the composer's clock button (or the store API); the daemon runs them when due, with auto-continue after usage limits. The desktop's Schedule screen shows every queued run and can clear the finished ones.