Cabin is a local-first development workspace and workflow orchestration platform for open-source maintainers and code reviewers.
It is not "yet another AI PR reviewer." It is the operating system for code review.
The market for AI code reviewers is heavily commoditized. Modern developers already have GitHub Copilot, Claude Code, Cursor, Antigravity, and Gemini CLI embedded directly into their editors.
The real bottleneck for code maintainers is not the review intelligence itselfβit's the workflow orchestration and context gathering.
Before a maintainer can even begin assessing code, they must manually coordinate a multi-step context collection ritual:
- Open GitHub and navigate notifications.
- Read the issue and the surrounding discussion.
- Understand previous review comments.
- Verify CI status, test results, and merge conflicts.
- Fetch the branch locally to run test suites or manually inspect suspicious code blocks.
- Run local scripts, linters, or AI tools.
Currently, 90% of a maintainer's time is spent gathering context, and only 10% is spent applying human judgment.
Cabin reverses this ratio. It treats GitHub as a database and provides a dedicated, high-performance local workspace where the entire pipeline is automated in the background.
[ GitHub Event ] ββ> [ Cabin Local Engine ] ββ> [ Gathers Context, Runs Git, Spawns AI ] ββ> [ Decision Dashboard ] ββ> [ One-Click Approve ]
When a notification arrives, Cabin has already prepared the context in 10 seconds:
- CI & Checks: CI passed, DCO signed, no merge conflicts.
- Aggregated History: "Contributor addressed accessibility requests and inline styles."
- Local Run Results: AI analysis generated, code rules verified.
- Pre-Drafted Comments: Smart suggestions ready to post.
You read, decide, and click.
Cabin is designed as a clean monorepo desktop application utilizing Electron to bridge the high-privilege operations of your machine (filesystem, git, process spawning) with a rich React UI dashboard.
ββββββββββββββββββββββββββββββββββββ
β React UI (packages/ui) β
β Tailwind + Zustand + Motion β
βββββββββββββββββββ¬βββββββββββββββββ
β Electron IPC (preload)
βββββββββββββββββββΌβββββββββββββββββ
β Electron Main Process β
β (apps/desktop/src) β
ββββββββ¬βββββββββββ¬βββββββββββ¬ββββββ
β β β
βββββββββββββββββββΌβββ βββββββΌβββββββ βββΌβββββββββββββββββββ
β Local Filesystem β β SQLite DB β β CLI Spawner β
β (Repo Clones) β β (Settings, β β (Spawn git, ag, β
β ~/Cabin/repos/ β β Cache, etc)β β other local tools)β
ββββββββββββββββββββββ ββββββββββββββ ββββββββββββββββββββββ
- Zero Browser Sandboxing Limits: The browser cannot execute terminal commands or clone repositories. Electron's main process handles all high-privilege tasks.
- Private and Secure: Your source code, credentials, and API tokens never leave your machine.
- No Server Costs or Complex Deployments: Database operations use SQLite locally inside your home directory.
- Flexible CLI Integration: Spawning the Antigravity CLI,
git, or other linters uses Node.jschild_process.spawn().
The project is managed as an npm workspace monorepo:
Dev/
βββ package.json # Root workspace manager and script launcher
βββ tsconfig.json # Shared TypeScript compiler options
βββ apps/
β βββ desktop/ # Electron Shell (main and preload processes)
βββ packages/
βββ ui/ # React UI Frontend (Vite + Tailwind + Zustand + Router)
βββ database/ # SQLite controller (sqlite3 + sqlite promise wrapper)
βββ github/ # Octokit adapter for GitHub API reviews & comments
βββ git/ # simple-git wrapper for repository checkouts
βββ workers/ # Pipeline workers (Git, CI, DCO, Merge, Discussion, Context)
βββ review-engine/ # Orchestrator running pipeline workers in series
βββ providers/ # AI Providers (Antigravity CLI command spawner)
βββ shared/ # Zod schemas, models, and TypeScript types
Instead of the noisy GitHub notification feed, Cabin provides a focused queue representing the state of every pending PR:
- Ready for Review: CI passed, mergeable, AI checks complete.
- Blocked / Attention Needed: CI failing, merge conflicts detected.
- Awaiting Contributor: Feedback requested, waiting on fixes.
When you click a PR in the dashboard, the local Git Engine performs the heavy lifting:
- Clones the repository to
~/Cabin/repositories/if it doesn't exist. - Automatically fetches the branch and checks out the PR commits.
- Prepares the workspace for inspection or local testing.
Every worker has one responsibility, returning structured JSON reports back to the orchestrator:
- CI Worker: Fetches GitHub combined statuses and check runs.
- Merge Worker: Verifies branch mergeability and detects conflicts.
- DCO Worker: Runs
git logon the checkout and verifies DCO signatures. - Discussion Worker: Synthesizes issue and review comments into structured threads.
- Repository Context Worker: Scans for README rules, contributing guides, and PR templates.
Cabin connects directly to your local command-line tools. When a review is triggered, the Electron main process's aiService spawns the Antigravity CLI process:
// Spawns: ag review --pr 218
const process = spawn('ag', ['review', '--pr', prNumber], { cwd: repoPath });Outputs are streamed to the React UI in real-time, giving you console progress updates.
Review findings are mapped to editable markdown templates. You can click a button, preview the generated comment (optionally humanized by an LLM), and post it directly to GitHub in a single action.
- Node.js: Version 18 or higher is required.
- Git CLI: Installed and configured on your machine's path.
- GitHub Personal Access Token (PAT): Set up with
repopermissions to allow reading repositories, issues, PRs, and comments.
Clone the repository, navigate to the directory, and install all workspace dependencies:
npm installBefore running the application, you must build all local packages in the correct dependency order. We provide a helper command that does this automatically:
npm run build:allNote
Since this is a monorepo, if you modify any code inside packages/* (e.g., @cabin/shared, @cabin/database), you must re-run npm run build:all (or build that specific package using npm run build -w packages/<package-name>) for those changes to propagate to the Electron main process or UI.
To run Cabin in local development with hot-reloading for the frontend:
-
Start the Frontend UI Dev Server (Terminal 1) This starts the Vite development server for the React UI:
npm run dev:ui
The UI will now be serving and hot-reloading on
http://localhost:5173. -
Launch the Electron App (Terminal 2) This compiles the Electron main process code and launches the Electron application shell:
npm run dev:desktop
- Electron automatically detects development mode and loads the UI from
http://localhost:5173. - The Chromium developer tools will automatically open side-by-side with the dashboard for easy debugging.
- Electron automatically detects development mode and loads the UI from
- Cause: You edited a file under
packages/database,packages/shared, etc., but did not recompile the TypeScript output. - Fix: Run
npm run build:allto compile all packages, or compile the specific package you edited:npm run build -w packages/<package-name>
- Cause: Another Vite process is running.
- Fix: Find and kill the process using port 5173, or let Vite assign a different port. Note that if Vite uses a different port (e.g.
5174), you may need to update the load URL inapps/desktop/src/main.ts(around line 59) to match:mainWindow.loadURL('http://localhost:5174');
- Cause: Schema changes mismatch with local database.
- Fix: Delete or rename the local database file at
~/Cabin/settings/cabin.dbto let the app recreate it on the next launch. Alternatively, ensure database schema additions implementtry/catch ALTER TABLEwrappers inCabinDatabase.initialize.
- Cause: Missing or invalid Personal Access Token (PAT).
- Fix: Ensure your GitHub PAT has the
reposcope. Enter this token in the Settings screen of the Cabin dashboard.
