An advanced open-source AI-native coding platform
Coder is a desktop application that integrates large language model providers, multi-agent orchestration, integrated terminal control, and a rich code editing environment into a single cohesive platform. Built on Electron with React and a Node.js backend, Coder provides a local-first, privacy-respecting alternative to cloud-dependent AI coding tools while maintaining full access to the capabilities of modern AI models.
- Multi-Agent Orchestration -- Specialized agents (coder, architect, reviewer, researcher, terminal) collaborate through a loop-based orchestration engine with planning, execution, observation, and iteration
- 13+ AI Provider Support -- First-class support for OpenAI, Anthropic, Google Gemini, Ollama, OpenRouter, and custom OpenAI-compatible endpoints with automatic fallback, retry, and rate limiting
- Integrated Terminal -- Full PTY terminal powered by node-pty and xterm.js with multi-instance support, split panes, and command execution with output capture
- Diff Viewer -- Unified and split-view diff rendering with syntax highlighting, inline decorations, and per-file diff navigation
- Plugin System -- Sandboxed extension runtime with VM isolation, allowing plugins to contribute commands, views, agent tools, providers, themes, and settings
- Monaco Editor -- Full-featured code editor with language configuration, custom themes, AI completion provider, and inline diff decorations
- Adaptive Performance -- Hardware profiling and performance mode selection (low / balanced / high) with real-time resource monitoring and context window management
- Cross-Platform -- Native desktop experience on Windows, macOS, and Linux with platform-aware shell detection, custom titlebar, and system tray integration
- Local-First Storage -- SQLite database via Drizzle ORM for conversations, projects, settings, tool execution logs, and long-term agent memory
- Streaming Responses -- Real-time SSE/JSON streaming pipeline with tool call extraction, reasoning block parsing, and typed event emission
- Safety Guardrails -- Permission-based file access control, command allowlists/blocklists, per-session cost caps, and token usage tracking
- Type-Safe Throughout -- TypeScript 5.7+ strict mode across all packages with project references, shared type definitions, and Zod runtime validation
Coder is an Electron desktop application structured as a pnpm monorepo. The backend runs as the Electron main process (or a standalone Node.js server for development), communicating with the React frontend through a typed IPC layer. All services communicate through a central event bus.
Frontend (React + Zustand) <-- IPC --> Backend (Node.js main process)
|
+----------------+----------------+
| | |
Agent Engine Terminal Mgr Filesystem Mgr
(orchestrator) (node-pty) (chokidar + rg)
|
Provider Comm
(OpenAI / Anthropic / Google / ...)
| Layer | Technology |
|---|---|
| Desktop Shell | Electron 34+ |
| Frontend | React 19+ |
| Language | TypeScript 5.7+ (strict) |
| Build | Vite 6+ |
| Package Manager | pnpm 9+ |
| State | Zustand 5+ |
| Database | Drizzle ORM + better-sqlite3 |
| Terminal | node-pty + xterm.js |
| Styling | Tailwind CSS 4 + CSS Modules |
| Components | Radix UI (headless) + custom |
| Code Editor | Monaco Editor |
| Testing | Vitest + Playwright |
| Linting | ESLint + Prettier |
Coder/
├── .github/
│ ├── ISSUE_TEMPLATE/ -- Bug report and feature request templates
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── ci.yml -- Lint, typecheck, test, build
├── agents/ -- @coder/agents — Agent orchestration engine
├── apps/
│ └── desktop/ -- @coder/desktop — Electron application entry
├── backend/ -- @coder/backend — Local backend service
├── docs/ -- Architecture, API docs, guides
├── downloads/ -- Production build output directory
├── frontend/ -- @coder/frontend — React UI application
├── packages/
│ ├── diff/ -- @coder/diff — Diff rendering
│ ├── editor/ -- @coder/editor — Monaco Editor wrapper
│ ├── file-tree/ -- @coder/file-tree — File tree component
│ ├── markdown/ -- @coder/markdown — Markdown rendering
│ ├── terminal/ -- @coder/terminal — Terminal component
│ └── ui/ -- @coder/ui — Shared component library
├── plugins/ -- @coder/plugins — Extension system
├── providers/ -- @coder/providers — AI model providers
├── scripts/
│ ├── build.ps1 -- Windows production build script
│ ├── build.sh -- macOS/Linux production build script
│ ├── dev.ps1 -- Windows development start script
│ └── dev.sh -- macOS/Linux development start script
├── shared/ -- @coder/shared — Shared types, utils, constants
├── tests/ -- Integration and E2E tests
├── .eslintrc.cjs
├── .gitignore
├── .npmrc
├── .prettierrc
├── ARCHITECTURE.md
├── LICENSE
├── README.md
├── package.json
├── pnpm-workspace.yaml
├── tsconfig.base.json
├── tsconfig.json
├── vite.config.base.ts
└── vitest.config.ts
- Node.js 18.0.0 or later (20.x recommended)
- pnpm 9.0.0 or later
Install pnpm if it is not already available:
npm install -g pnpmClone the repository and install dependencies:
git clone https://github.com/elijahshepherd/coder.git
cd coder
pnpm installRun the development server (installs dependencies if needed and launches frontend, backend, and desktop):
Windows:
.\scripts\dev.ps1macOS / Linux:
./scripts/dev.shOr use pnpm directly:
pnpm dev| Script | Description |
|---|---|
pnpm dev |
Start frontend, backend, and desktop concurrently |
pnpm dev:start |
Run platform-appropriate dev script |
pnpm build |
Build frontend, backend, and desktop |
pnpm lint |
Run ESLint across the monorepo |
pnpm typecheck |
Run TypeScript type checking |
pnpm test |
Run unit tests with Vitest |
pnpm test:watch |
Run tests in watch mode |
pnpm test:coverage |
Run tests with coverage reporting |
pnpm format |
Format all files with Prettier |
pnpm format:check |
Check formatting without writing |
pnpm clean |
Remove all build outputs across the monorepo |
Packages must be built in dependency order:
@coder/shared@coder/agents@coder/providers@coder/plugins@coder/backend@coder/ui@coder/markdown@coder/diff@coder/editor@coder/terminal@coder/file-tree@coder/frontend@coder/desktop
Production builds compile all packages, package the Electron application, and place the output in the /downloads/ directory.
For current download warnings, installation bugs, and resolved public issues, see Known Issues.
.\scripts\build.ps1Or:
pnpm build:prod:winOutput: Windows installer (.exe, .msi) in downloads/
Windows release builds are prepared and verified by the project maintainers before public download links are updated.
./scripts/build.sh macOr:
pnpm build:prod:macOutput: macOS disk image (.dmg) in downloads/
macOS release builds are prepared by the project maintainers before public download links are updated.
To build all packages and create an Electron package for the current platform:
pnpm build:prodContributions are welcome. Request new features in issues or report bugs.
This project is licensed under the MIT License.
Copyright (c) 2026 Coder