Build from source
What you need
Section titled “What you need”- 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. Runcorepack enableand Node provides it. - Xcode’s command line tools, if you want the iOS simulator pane.
Run it
Section titled “Run it”Clone the repository (the GitHub link at the top of this site), then install:
pnpm installIn a browser
Section titled “In a browser”Start the server and the interface, each in its own terminal:
pnpm dev:serverpnpm dev:uiOpen http://localhost:5173. The server listens on 127.0.0.1:4317 only.
As the desktop app
Section titled “As the desktop app”pnpm dev:appThis 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.
The demo workspace
Section titled “The demo workspace”pnpm demoThis 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.
Where a checkout keeps its data
Section titled “Where a checkout keeps its data”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.
Settings you can pass
Section titled “Settings you can pass”| Variable | Default | Meaning |
|---|---|---|
KESTREL_PORT | 4317 | The server’s port. It is always on this computer only |
KESTREL_UI_ORIGINS | http://localhost:5173,http://127.0.0.1:5173 | The addresses allowed to call the server |
KESTREL_DATA_DIR | ~/.kestrel-dev | Where the database, access token and worktrees go |
KESTREL_FAKE | off | 1 opens a separate store filled with sample data |
KESTREL_DEMO | off | 1 opens the demo workspace, which pnpm demo does for you |
KESTREL_PERSISTENCE | sqlite | memory keeps everything in memory and saves nothing |
Run all three before sending a change. They are what the pipeline runs.
pnpm typecheckpnpm testpnpm --filter @kestrel/ui buildHow the code is laid out
Section titled “How the code is laid out”| Folder | What 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 |
Rules for a change
Section titled “Rules for a change”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.
Sending a change
Section titled “Sending a change”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.