Skip to content

elijahshepherd/Coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coder

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.


Key Features

  • 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

Architecture

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 / ...)

Technology Stack

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

Project Structure

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

Getting Started

Prerequisites

  • 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 pnpm

Installation

Clone the repository and install dependencies:

git clone https://github.com/elijahshepherd/coder.git
cd coder
pnpm install

Development

Quick Start

Run the development server (installs dependencies if needed and launches frontend, backend, and desktop):

Windows:

.\scripts\dev.ps1

macOS / Linux:

./scripts/dev.sh

Or use pnpm directly:

pnpm dev

Available Scripts

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

Package Build Order

Packages must be built in dependency order:

  1. @coder/shared
  2. @coder/agents
  3. @coder/providers
  4. @coder/plugins
  5. @coder/backend
  6. @coder/ui
  7. @coder/markdown
  8. @coder/diff
  9. @coder/editor
  10. @coder/terminal
  11. @coder/file-tree
  12. @coder/frontend
  13. @coder/desktop

Building for Production

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.

Windows

.\scripts\build.ps1

Or:

pnpm build:prod:win

Output: Windows installer (.exe, .msi) in downloads/

Windows release builds are prepared and verified by the project maintainers before public download links are updated.

macOS

./scripts/build.sh mac

Or:

pnpm build:prod:mac

Output: macOS disk image (.dmg) in downloads/

macOS release builds are prepared by the project maintainers before public download links are updated.

Generic Production Build

To build all packages and create an Electron package for the current platform:

pnpm build:prod

Contributing

Contributions are welcome. Request new features in issues or report bugs.


License

This project is licensed under the MIT License.

Copyright (c) 2026 Coder


Repository

https://github.com/elijahshepherd/coder

About

Coder is an open-source AI coding agent. You provide your API key and model, and it creates a working development workspace for you.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors