lectern

module
v2.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: MIT

README

Lectern

Run every coding agent you use — Claude Code, Codex, Gemini, OpenCode, Aider, Cursor and more — on machines you own, and drive them from your terminal, your phone, or a claude.ai chat.

version license go PWA MCP

Lectern terminal dashboard

curl -fsSL https://raw.githubusercontent.com/JeremiahM37/lectern/main/install.sh | sh
lectern up          # starts Lectern, finds your agent CLIs, opens the dashboard
lectern claude      # or: lectern codex, lectern opencode, … in any folder

What makes Lectern different

Start work from an ordinary chat

Brainstorm in claude.ai (web, desktop or phone). Then say "start a Lectern session that builds this" or "give my session fixing checkout this PDF". The design you worked out arrives as context, and uploaded files arrive as the real file. Your agent starts on your machine, and "end that session" archives it when you're done. ChatGPT works the same way with Developer mode. You approve the connection yourself, and a chat can never approve an agent's actions. → Use Lectern from claude.ai and ChatGPT

Starting a Lectern session from claude.ai

Every session one keystroke away

Type lectern for a live dashboard of every agent on every machine.

  • Click a session to jump in.
  • Right-click it to open it in a new terminal window while the list stays put.
  • Press b, tick several sessions, and open them all at once.
  • Open Projects to get a shell in any repository instantly.

lectern claude in any folder starts, or reuses, a tracked session there and drops you in. In an attached session, Ctrl+\ sends a file to the agent. → Terminal client

Opening a project shell from the dashboard

Any agent, without cluttered menus

Claude Code, Codex and Gemini are built in. Settings → Agents adds OpenCode, Aider, Goose, Amp, Cursor Agent, Copilot CLI, Qwen Code, Crush, Kimi or Cline in one click, or any CLI as a custom agent. Only the agents you pick appear in menus, and the rest sit under More agents…. Resume, fork, models, approvals, tasks and lectern <agent> work with each agent as far as its CLI allows. Lectern tells you plainly when a CLI can't do something. → Agents

Adding an agent from the catalog

Switch a live session to another agent or model without losing the thread:

Switching a session from Claude to Codex

Nothing gets lost
  • Restore brings back anything that ended: closed, archived, crashed, or cut off by a reboot, with its conversation when one was saved. Ending a session offers Undo, an agent that exits shows Revive, and lectern restore does the same from any terminal.
  • Sessions stay grouped by project and machine.
  • Lectern finds and adopts Claude and Codex sessions you started outside it.
  • Every saved Claude and Codex conversation on your machines is searchable, including ones Lectern never launched.

Your phone is the remote

The same control loop runs in an installable phone app:

  • Sessions that need you are flagged on their cards.
  • Chat shows tool calls as cards, with real diffs.
  • Approvals offer allow once, allow npm … this session, or deny with feedback, from the app or straight from the notification.
  • Voice mode lets you talk to your agent and approve out loud, using only the browser's free speech engine.
  • No Tailscale? Run lectern relay on any small server and pair a phone by QR code. Traffic is end-to-end encrypted (Noise, the protocol behind WireGuard); the relay only passes sealed frames and never serves app code.
  • An Android app (prototype, build from source) bundles the same web app, keeps the relay key in Keystore, and takes Approve / Deny / Reply from the notification with no Lectern screen open, via UnifiedPush and ntfy.

→ Mobile sessions · Relay · Remote access · Android app

Lectern on a phone

More than a launcher
  • A board of tasks: dispatch work to any machine, each task in its own git worktree, and review the diff or open a PR when it's done.
  • CI loop: when a PR's checks fail, Lectern sends the failing jobs and a trimmed log back to the agent that wrote the code, up to 3 tries, and pings your phone when it goes green. → CI loop
  • Usage limits: when Claude, Codex or Gemini hits its limit, the card and your phone show when it resets. Lectern can resume the same agent after the reset, or hand the work to another agent in the same workspace. → Rate limits
  • Best-of-N with a judge, and delegated builds: a cheap worker builds and a lead reviews and integrates.
  • Replay evals: find out which agent or model is best for your repo, scored against what actually shipped.
  • Agents that know about each other: each session sees what its peers are editing in the same repo, plus a claim board for who's doing what.
  • Memory: pairs with Grimoire, so a new session starts with the project's knowledge.
  • Budgets, usage and quota at a glance, and checks that run when an agent stops.
  • Runs anywhere: your laptop, anything reachable over SSH, a Proxmox container, or an ephemeral sandbox. One static binary, MIT licensed.
  • Scales: one Lectern process ran 250 concurrent sessions across 4 targets with 65 MB of memory; approvals round-trip in about 7 ms. → Benchmark

How it compares

✓ yes · ◐ partly · ✗ no · ? couldn't verify. Every cell is checked against each project's own docs or source, with sources in docs/comparison.md. Corrections are welcome.

Lectern Orca HAPI Agent Orchestrator Agent of Empires Happy Vibe Kanban Conductor
Start and manage sessions from a claude.ai or ChatGPT chat ✓ ✗ ✗ ✗ ✗ ✗ ✗ ✓
Terminal dashboard across machines, open many at once ✓ ◐ ◐ ✗ ◐ ? ✗ ✗
Switch a live session to another agent, keeping context ✓ ? ? ✓ ◐ ◐ ✗ ?
Agents on your own machines: SSH, Proxmox, sandboxes ✓ ◐ ◐ ◐ ◐ ✗ ✗ ◐
Approve, deny or reply from the phone notification ✓ ◐ ✓ ◐ ◐ ◐ ✗ ◐
Allow once / for this session / deny with feedback ✓ ◐ ✓ ◐ ◐ ◐ ◐ ◐
Free voice mode with spoken approvals ✓ ◐ ◐ paid ◐ ◐ ◐ paid ? ?
End-to-end encrypted relay, no VPN needed ✓ ✓ ✓ ◐ ◐ ✓ ◐ ?
Task board with worktrees, diff review and PRs ✓ ✓ ◐ ✓ ◐ ◐ ✓ ◐
Best-of-N with a judge, and delegated builds ✓ ◐ ◐ ◐ ◐ ✗ ? ?
Evals replayed from your own merged PRs ✓ ? ? ? ? ? ? ✗
Agents aware of each other (claim board) ✓ ◐ ✓ ◐ ? ✗ ? ✗
Adopts agent sessions you started elsewhere ✓ ◐ ◐ ◐ ◐ ◐ ? ?
MCP server so other agents can drive it ✓ ✗ ◐ ✗ ✗ ◐ ✓ ✓
Native iOS / Android apps ✗ ✓ ✓ ✓ ✗ ✓ ✗ ✓
Self-hosted and open source ✓ MIT ✓ MIT ✓ AGPL ✓ Apache ✓ MIT ✓ MIT ✓ Apache ✗

Where others are ahead:

  • Orca, HAPI, Agent Orchestrator and Happy ship native phone apps. Lectern is an installable web app plus an unpublished Android prototype; on iPhone that means no Approve/Deny buttons on the notification itself.
  • Orca (30+), Agent Orchestrator (28) and Agent of Empires (about 20) list more agents out of the box. Lectern has 3 built in, a catalog of 10 more, and any CLI as a custom agent.
  • Orca swaps to another account when one hits its usage limit. Lectern waits for the reset or hands off to a different agent.
  • Agent of Empires has a plugin system and a multi-user edition with SSO.
  • Conductor, which is hosted and proprietary, also drives sessions from claude.ai and ChatGPT.

Install

Linux / macOS curl -fsSL https://raw.githubusercontent.com/JeremiahM37/lectern/main/install.sh | sh
Homebrew brew install JeremiahM37/tap/lectern
Windows irm https://raw.githubusercontent.com/JeremiahM37/lectern/main/install.ps1 | iex (client; host the server in WSL)
Docker docker run -d -p 127.0.0.1:9110:9110 -v lectern-data:/data ghcr.io/jeremiahm37/lectern:latest
Go go install github.com/JeremiahM37/lectern/v2/cmd/lectern@latest

Agents run on any machine with git, tmux, python3 and the agent's own CLI. lectern doctor checks everything and prints a fix next to anything that's wrong. You can try it with no setup at all, using fake agents: LECTERN_MOCK=1 lectern serve.

Documentation

Full guide Everything in depth: sessions, tasks, auth, phone alerts, delegated builds, local models
Use from claude.ai / ChatGPT The chat connector: setup, what a chat can do, troubleshooting
Terminal client Dashboard keys, multi-window, lectern claude, send-file
Agents Catalog, capabilities per agent, custom agents
Mobile sessions Chat cards, approvals, voice mode
Remote access Phone pairing and tunnels without Tailscale
Local / Docker · Docker Standalone and container setups

Lectern was called AgentDeck until v2.3. Old AGENTDECK_* settings still work.

MIT © Jeremiah Mackey

Directories

Path Synopsis
cmd
lectern command
Command lectern is the control plane: one binary that serves the API, the PWA and the scheduler that drives every dispatched agent.
Command lectern is the control plane: one binary that serves the API, the PWA and the scheduler that drives every dispatched agent.
lectern/localruntime
Package localruntime starts the per-user Lectern control plane used by the local CLI.
Package localruntime starts the per-user Lectern control plane used by the local CLI.
internal
a2a
Package a2a implements the server half of the Agent2Agent (A2A) protocol v1.0 (Linux Foundation) over its JSON-RPC 2.0 binding: the public Agent Card, the request/response envelope, the Task object, and the mapping from Lectern's board columns onto the protocol's task states.
Package a2a implements the server half of the Agent2Agent (A2A) protocol v1.0 (Linux Foundation) over its JSON-RPC 2.0 binding: the public Agent Card, the request/response envelope, the Task object, and the mapping from Lectern's board columns onto the protocol's task states.
agentevents
Package agentevents ingests the push-based lifecycle and usage signals an agent reports about itself — Claude Code's settings-driven hooks and statusline, and (where 0.155 supports it) Codex's hooks.json/notify — and turns them into session state, per contract in docs/agent-events.md section 2.
Package agentevents ingests the push-based lifecycle and usage signals an agent reports about itself — Claude Code's settings-driven hooks and statusline, and (where 0.155 supports it) Codex's hooks.json/notify — and turns them into session state, per contract in docs/agent-events.md section 2.
agents
Package agents is the coding-agent adapter seam.
Package agents is the coding-agent adapter seam.
alerts
Package alerts pushes a phone notification when an interactive session needs its operator — docs/agent-events.md section 3.
Package alerts pushes a phone notification when an interactive session needs its operator — docs/agent-events.md section 3.
api
The CI-aware PR loop's API surface (internal/ciloop, docs/ci-loop.md): arming a watch when the commit button opens a PR, the manual "watch this PR" endpoint for a PR the agent opened itself, and the card view.
The CI-aware PR loop's API surface (internal/ciloop, docs/ci-loop.md): arming a watch when the commit button opens a PR, the manual "watch this PR" endpoint for a PR the agent opened itself, and the card view.
app
Package app wires every component together.
Package app wires every component together.
auth
Package auth resolves who is making a request — a local process on this box, a tailnet user identified through tailscaled, or a bearer token — and decides what mode of gating the control plane runs under.
Package auth resolves who is making a request — a local process on this box, a tailnet user identified through tailscaled, or a bearer token — and decides what mode of gating the control plane runs under.
autonomy
Package autonomy contains the deterministic daily experiment policy.
Package autonomy contains the deterministic daily experiment policy.
awareness
Package awareness gives interactive agent sessions visibility into what OTHER live sessions (and running task attempts) are doing in the same repository, so two agents working the same checkout — or two worktrees of it — don't duplicate or collide with each other's work.
Package awareness gives interactive agent sessions visibility into what OTHER live sessions (and running task attempts) are doing in the same repository, so two agents working the same checkout — or two worktrees of it — don't duplicate or collide with each other's work.
broker
Package broker is the approval gate: the hook blocks here until a human — or expiry — decides.
Package broker is the approval gate: the hook blocks here until a human — or expiry — decides.
budget
Package budget closes the "hard stop / spend alerts" competitive gap: daily/weekly USD caps (overall and optionally per agent), a per-task budget_usd field, Claude 5h/7d quota-threshold alerts, and a cost-anomaly check — all built on top of the account's own usage_daily/attempts history (internal/store) and delivered through the existing sinks.Notifier (docs/agent-events.md section 3), the same way internal/alerts and internal/autonomy already extend that infrastructure rather than duplicating it.
Package budget closes the "hard stop / spend alerts" competitive gap: daily/weekly USD caps (overall and optionally per agent), a per-task budget_usd field, Claude 5h/7d quota-threshold alerts, and a cost-anomaly check — all built on top of the account's own usage_daily/attempts history (internal/store) and delivered through the existing sinks.Notifier (docs/agent-events.md section 3), the same way internal/alerts and internal/autonomy already extend that infrastructure rather than duplicating it.
bus
Package bus is the in-process SSE fan-out.
Package bus is the in-process SSE fan-out.
checks
Package checks runs a project's check command against a session's worktree when its agent stops, and stores the result for the card to show.
Package checks runs a project's check command against a session's worktree when its agent stops, and stores the result for the card to show.
ciloop
Package ciloop is the CI-aware PR loop (docs/ci-loop.md): once Lectern opens a pull request for a task or session on a project that opted in, it watches the PR's checks through the target's own `gh`, and when they fail it sends the owning agent a short failure report — failing job names and a trimmed, redacted log tail — asking it to fix them.
Package ciloop is the CI-aware PR loop (docs/ci-loop.md): once Lectern opens a pull request for a task or session on a project that opted in, it watches the PR's checks through the target's own `gh`, and when they fail it sends the owning agent a short failure report — failing job names and a trimmed, redacted log tail — asking it to fix them.
claims
Package claims is the Claim board's logic half: a shared, vendor-neutral record of who is doing what in a repository, so agents from different vendors (Claude Code, Codex, ACP agents) and humans coordinate instead of duplicating work on the same checkout.
Package claims is the Claim board's logic half: a shared, vendor-neutral record of who is doing what in a repository, so agents from different vendors (Claude Code, Codex, ACP agents) and humans coordinate instead of duplicating work on the same checkout.
config
Package config holds every knob lectern reads from the environment.
Package config holds every knob lectern reads from the environment.
console
Package console is a terminal client for the same API used by the web UI.
Package console is a terminal client for the same API used by the web UI.
creds
Package creds provisions agent authentication onto targets.
Package creds provisions agent authentication onto targets.
ctxbundle
Package ctxbundle stages the files a dispatched agent should read before it starts.
Package ctxbundle stages the files a dispatched agent should read before it starts.
delegation
Package delegation is the "Delegated builds" feature: a lead agent plans a piece of work and reviews the result, and a cheaper worker agent does the implementation in between, as a Lectern task in its own worktree.
Package delegation is the "Delegated builds" feature: a lead agent plans a piece of work and reviews the result, and a cheaper worker agent does the implementation in between, as a Lectern task in its own worktree.
desktop
Package desktop gives a target a private graphical display the operator can watch from a browser.
Package desktop gives a target a private graphical display the operator can watch from a browser.
drivers
Package drivers is the one seam between "an unattended agent run" and everything that wants to start one: the scheduler (queued attempts today launched by tmux + a polled events.jsonl file, unchanged), the new steering endpoint, and — the reason this package exists standalone rather than as scheduler-internal helpers — future best-of-N and agent-eval workers that want to start a run directly, with no task, board or database involved.
Package drivers is the one seam between "an unattended agent run" and everything that wants to start one: the scheduler (queued attempts today launched by tmux + a polled events.jsonl file, unchanged), the new steering endpoint, and — the reason this package exists standalone rather than as scheduler-internal helpers — future best-of-N and agent-eval workers that want to start a run directly, with no task, board or database involved.
evals
Package evals holds the pieces of the agent-test-suite ("evals") feature that do not need the database or a live target: the `.lectern/evals/*.yaml` suite format and its parsing/validation, and pure result-aggregation math (leaderboards, run comparison) that the API layer feeds real rows into.
Package evals holds the pieces of the agent-test-suite ("evals") feature that do not need the database or a live target: the `.lectern/evals/*.yaml` suite format and its parsing/validation, and pure result-aggregation math (leaderboards, run comparison) that the API layer feeds real rows into.
executor
Package executor abstracts "run a command / move a file on a machine".
Package executor abstracts "run a command / move a file on a machine".
forward
Package forward carries TCP from a port on the control plane to a service that only listens on a target's localhost.
Package forward carries TCP from a port on the control plane to a service that only listens on a target's localhost.
hooks
Package hooks embeds the two agent-side Python scripts staged into every worktree.
Package hooks embeds the two agent-side Python scripts staged into every worktree.
isolation
Package isolation builds the per-agent-process sandbox a session or task attempt can run inside, as a fast, no-clone alternative to the full LXC clone in internal/sandbox: bubblewrap (no daemon, Linux only) or a disposable Docker container.
Package isolation builds the per-agent-process sandbox a session or task attempt can run inside, as a fast, no-clone alternative to the full LXC clone in internal/sandbox: bubblewrap (no daemon, Linux only) or a disposable Docker container.
limits
Package limits makes Lectern usage-limit aware: it recognises when an agent CLI has been stopped by its provider's usage limit, records a hold with the reset time, and applies the session's or project's policy — notify, wait and resume at the reset, or hand the work to another agent.
Package limits makes Lectern usage-limit aware: it recognises when an agent CLI has been stopped by its provider's usage limit, records a hold with the reset time, and applies the session's or project's policy — notify, wait and resume at the reset, or hand the work to another agent.
mcp
Package mcp exposes lectern over the Model Context Protocol on stdio, so any MCP client — Claude Code, an mcpo bridge, a chat bot — can file and steer tasks.
Package mcp exposes lectern over the Model Context Protocol on stdio, so any MCP client — Claude Code, an mcpo bridge, a chat bot — can file and steer tasks.
mediapost
Package mediapost is the one way a file or link reaches Lectern's media feed.
Package mediapost is the one way a file or link reaches Lectern's media feed.
memory
Package memory is lectern's seam onto a durable knowledge store.
Package memory is lectern's seam onto a durable knowledge store.
nativeidentity
Package nativeidentity is the single read-only native conversation identity implementation shared by the API history reader and session recovery.
Package nativeidentity is the single read-only native conversation identity implementation shared by the API history reader and session recovery.
oauth
Package oauth is the authorization server for Lectern's public MCP web connector (Streamable HTTP), ported from Grimoire's grimoire-mcp OAuth server — the same owner's MIT-licensed sibling project, already live in production for exactly this problem.
Package oauth is the authorization server for Lectern's public MCP web connector (Streamable HTTP), ported from Grimoire's grimoire-mcp OAuth server — the same owner's MIT-licensed sibling project, already live in production for exactly this problem.
onboard
Package onboard holds the small set of environment checks a brand-new install needs answered before its first session: which agent CLIs are on PATH, and whether tmux/git are available.
Package onboard holds the small set of environment checks a brand-new install needs answered before its first session: which agent CLIs are on PATH, and whether tmux/git are available.
outcomes
Package outcomes closes the "cost per outcome" competitive gap: tying every dollar spent to what it produced (a passing check, an accepted change, kept lines, an eval pass), per agent and model.
Package outcomes closes the "cost per outcome" competitive gap: tying every dollar spent to what it produced (a passing check, an accepted change, kept lines, an eval pass), per agent and model.
pairing
Package pairing lets a phone with no Tailscale reach Lectern through an ordinary public tunnel (Cloudflare Tunnel, `tailscale funnel`, ...) without handing it the operator's static LECTERN_AUTH_TOKEN.
Package pairing lets a phone with no Tailscale reach Lectern through an ordinary public tunnel (Cloudflare Tunnel, `tailscale funnel`, ...) without handing it the operator's static LECTERN_AUTH_TOKEN.
policy
Package policy holds a project's "always allow" rules, evaluated server-side before a human is ever paged.
Package policy holds a project's "always allow" rules, evaluated server-side before a human is ever paged.
push
Package push is the web-push (VAPID) notification sink.
Package push is the web-push (VAPID) notification sink.
relay
Package relay holds the pieces of Lectern's end-to-end encrypted relay that both ends share: key material, the Noise handshake between a phone and the host, the framing of HTTP and WebSocket traffic inside that encrypted channel, and the relay's own routing frames.
Package relay holds the pieces of Lectern's end-to-end encrypted relay that both ends share: key material, the Noise handshake between a phone and the host, the framing of HTTP and WebSocket traffic inside that encrypted channel, and the relay's own routing frames.
relay/client
Package client is a Go implementation of the phone's side of the relay (the browser's is frontend/src/relay).
Package client is a Go implementation of the phone's side of the relay (the browser's is frontend/src/relay).
relay/host
Package host is the Lectern side of the end-to-end encrypted relay (docs/relay.md).
Package host is the Lectern side of the end-to-end encrypted relay (docs/relay.md).
relay/server
Package server is `lectern relay`: a single-process, stateless router of opaque frames between a Lectern host and that host's paired devices.
Package server is `lectern relay`: a single-process, stateless router of opaque frames between a Lectern host and that host's paired devices.
replay
Package replay builds eval cases from a project's own merged-PR history — "replay evals" (docs/replay-evals.md): the answer to "which agent/model is best for MY repository" ground-truthed against what actually landed, not a hand-written prompt.
Package replay builds eval cases from a project's own merged-PR history — "replay evals" (docs/replay-evals.md): the answer to "which agent/model is best for MY repository" ground-truthed against what actually landed, not a hand-written prompt.
routines
Package routines turns a job you keep asking for into one you can press a button for, or schedule.
Package routines turns a job you keep asking for into one you can press a button for, or schedule.
sandbox
Package sandbox owns the ephemeral LXC lifecycle: clone template, start, run, destroy.
Package sandbox owns the ephemeral LXC lifecycle: clone template, start, run, destroy.
scheduler
Package scheduler promotes queued attempts, tails running ones and finalises results.
Package scheduler promotes queued attempts, tails running ones and finalises results.
scratch
Package scratch reclaims throwaway workspaces nobody is using.
Package scratch reclaims throwaway workspaces nobody is using.
sessions
Package sessions is lectern's second execution mode: an INTERACTIVE agent you work with, rather than a task you hand off.
Package sessions is lectern's second execution mode: an INTERACTIVE agent you work with, rather than a task you hand off.
shellq
Package shellq renders values as shell words.
Package shellq renders values as shell words.
sinks
Package sinks fans notifications out to web-push, a Discord webhook and ntfy, best-effort and never blocking the caller.
Package sinks fans notifications out to web-push, a Discord webhook and ntfy, best-effort and never blocking the caller.
skills
Package skills manages project skill intent and target-local materialization.
Package skills manages project skill intent and target-local materialization.
state
Package state is the task state machine — the single source of truth for which board moves are legal.
Package state is the task state machine — the single source of truth for which board moves are legal.
store
Package store is lectern's SQLite persistence layer: schema, typed row accessors, and the small JSON helpers the rest of the service shares.
Package store is lectern's SQLite persistence layer: schema, typed row accessors, and the small JSON helpers the rest of the service shares.
terminal
Package terminal is one-click terminal attach: spawn a ttyd on the control plane that wraps `tmux attach` (locally, over ssh, or via pct) for a running attempt.
Package terminal is one-click terminal attach: spawn a ttyd on the control plane that wraps `tmux attach` (locally, over ssh, or via pct) for a running attempt.
testutil
Package testutil contains small safety helpers shared by real-process tests.
Package testutil contains small safety helpers shared by real-process tests.
triggers
Package triggers lets a project pick up work on its own — from a labelled GitHub issue, an @mention in a PR/issue comment, a Slack message, a /lectern slash command, or a labelled Linear issue — the way Devin, Cursor, Codex, Tembo and Charlie already do.
Package triggers lets a project pick up work on its own — from a labelled GitHub issue, an @mention in a PR/issue comment, a Slack message, a /lectern slash command, or a labelled Linear issue — the way Devin, Cursor, Codex, Tembo and Charlie already do.
version
Package version carries the single source of truth for the release string.
Package version carries the single source of truth for the release string.
workflows
Package workflows describes the optional, bundled project workflows.
Package workflows describes the optional, bundled project workflows.
worktree
Package worktree owns the git worktree lifecycle and diff capture, all through the Executor interface so it works identically on every target kind.
Package worktree owns the git worktree lifecycle and diff capture, all through the Executor interface so it works identically on every target kind.
tools
stress command
Command stress is Lectern's scale benchmark driver.
Command stress is Lectern's scale benchmark driver.
Package web embeds the lectern PWA so the binary is fully self-contained: one file to deploy, and the UI works with no internet access.
Package web embeds the lectern PWA so the binary is fully self-contained: one file to deploy, and the UI works with no internet access.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL