Skip to content

Build from source

  • A Mac. The packaged app is Apple Silicon only.
  • Node 24 or newer. The server uses Node’s built-in SQLite.
  • pnpm, at the version pinned in package.json. Run corepack enable and Node provides it.
  • Xcode’s command line tools, if you want the iOS simulator pane.

Clone the repository (the GitHub link at the top of this site), then install:

Terminal window
pnpm install

Start the server and the interface, each in its own terminal:

Terminal window
pnpm dev:server
Terminal window
pnpm dev:ui

Open http://localhost:5173. The server listens on 127.0.0.1:4317 only.

Terminal window
pnpm dev:app

This opens Kestrel in its own window and starts a server of its own on a free port, so it does not collide with the two commands above.

Terminal window
pnpm demo

This opens the app on a workspace made for looking around: sample projects, sessions in every state, workstreams, pull requests and code reviews. A scripted agent answers, so no model is called and nothing is posted anywhere. pnpm demo --tickets adds a sample tracker, to try Tickets without connecting one. The demo keeps its own data, apart from your real Kestrel.

A checkout uses ~/.kestrel-dev, never the installed app’s ~/.kestrel, so developing Kestrel cannot disturb the copy you work in. A checkout never sends crash reports. If you run the browser and desktop versions at the same time, give one its own folder with KESTREL_DATA_DIR.

VariableDefaultMeaning
KESTREL_PORT4317The server’s port. It is always on this computer only
KESTREL_UI_ORIGINShttp://localhost:5173,http://127.0.0.1:5173The addresses allowed to call the server
KESTREL_DATA_DIR~/.kestrel-devWhere the database, access token and worktrees go
KESTREL_FAKEoff1 opens a separate store filled with sample data
KESTREL_DEMOoff1 opens the demo workspace, which pnpm demo does for you
KESTREL_PERSISTENCEsqlitememory keeps everything in memory and saves nothing

Run all three before sending a change. They are what the pipeline runs.

Terminal window
pnpm typecheck
Terminal window
pnpm test
Terminal window
pnpm --filter @kestrel/ui build
FolderWhat is in it
server/Node and TypeScript. The session store, the rules for where a session is filed, the agent adapters, worktrees, and Kestrel’s tools. HTTP and WebSocket, on this computer only
ui/React, TypeScript and Vite. Talks only to the server, and keeps working in a plain browser
app/The Electron shell: the window, the menu, updates and packaging
docs/The design document (docs/designs/kestrel.md), which is the specification
design/The visual prototype the interface was built from
spike/One-off scripts that established what each agent can do. Not part of the app

Read docs/designs/kestrel.md before changing behaviour, and CLAUDE.md for the full list. The ones most often tripped over:

  • Borrow, do not build. Agents run through their own SDKs. The terminal is xterm.js, and diffs are drawn by react-diff-view. No custom agent loop, terminal or diff engine.
  • Storage goes through one interface. Nothing outside server/src/persistence/ knows which database is in use.
  • No panel that slides in from the side. Anything that needs more than a click is a page.
  • Grey chrome. Colour is for status, diffs, code and errors, plus the one short palette a user can give a project, tag or workstream.
  • Every agent, in the same change. A tool, a card or a setting is built for Claude Code, Codex and OpenCode together, never for one first.
  • Three platforms. The code is written for macOS, Windows and Linux, though only the Mac app is released. What a platform cannot do says so, with the reason.
  • Undo, not a second path. An action that can be taken back shows a note with Undo, which runs the same action the other way.
  • One copy of server data in the interface, in the store, read through selectors.
  • Refusals carry a reason that a person or an agent can act on.
  • Tests come with server changes. Interface changes are checked at desktop width, light and dark.

Open an issue first for anything larger than a fix, so the approach can be agreed before you write it. Keep a change to one thing, and say in the description how you checked it.