PearAI

Open-source AI code editor that unifies chat, autonomous agents, and intelligent LLM routing in a single VS Code fork.

752stars
105forks
Shell

PearAI is an open-source AI code editor built as a fork of VS Code, designed to bring together the best AI coding tools into one cohesive environment. Rather than juggling separate subscriptions for GitHub Copilot, Claude, and ChatGPT, PearAI integrates an intelligent router that automatically selects the highest-performing language model for each coding task — whether that’s GPT-4o, Claude 3 Opus, or Llama 3.1.

Under the hood, PearAI is a multi-component system. The editor itself is a VS Code fork (pearai-app), extended with a Continue-powered AI chat pane (pearai-submodule) for contextual code discussions, and a Roo Code-powered autonomous agent (PearAI-Roo-Code) that can generate features and fix bugs without step-by-step prompting. A FastAPI backend (pearai-server) handles authentication via Supabase and provides optional cloud-based LLM access for users who don’t want to manage their own API keys.

PearAI also ships with a Model Context Protocol server (pearai-mcp) that connects the editor to external tools and data sources through the emerging MCP standard, positioning it well for the next wave of AI tooling integrations. Active development brings regular releases, and the project welcomes community contributions across its eight interconnected repositories.

What You Get

  • PearAI Router — Automatically selects the best-performing LLM (GPT-4o, Claude 3 Opus, Llama 3.1) for each coding task at runtime, so you always get the strongest model without switching tools or managing multiple subscriptions manually.
  • PearAI Chat (Continue fork) — A context-aware AI chat pane embedded directly in the editor that understands your codebase structure, open files, and project history to generate targeted edits and explanations.
  • PearAI Agent (Roo Code fork) — An autonomous AI coding agent that can plan and execute multi-step tasks such as generating new features, refactoring modules, or diagnosing and fixing bugs without requiring manual step-by-step prompting.
  • PearAI MCP Server — A Model Context Protocol server that connects the editor to external tools, APIs, and data sources, enabling the AI to interact with your full development ecosystem beyond the editor window.
  • Optional Cloud Backend — A FastAPI server with Supabase authentication that provides managed LLM access for users who prefer not to configure personal API keys, with usage tracking and optional telemetry via Axiom and PostHog.
  • Full VS Code Compatibility — All existing VS Code extensions, themes, keybindings, and debugging tools work as expected since PearAI is built directly on the VS Code codebase, giving you AI superpowers without giving up your existing workflow.

Common Use Cases

  • Consolidating AI tool costs — A developer running separate GitHub Copilot, ChatGPT, and Claude subscriptions replaces all three with PearAI’s Router, which dynamically picks the best model per task and cuts monthly AI spending to a single plan.
  • Agentic feature development — A solo developer describes a new REST endpoint in plain language; PearAI Agent scaffolds the route handler, writes the tests, and updates the OpenAPI spec autonomously, requiring only a final review.
  • Onboarding to an unfamiliar codebase — An engineer joining a large TypeScript monorepo uses PearAI Chat to ask contextual questions about any file, get inline explanations, and understand architectural decisions without hunting through documentation.
  • MCP-driven workflow automation — A team connects PearAI’s MCP server to their issue tracker and CI system, letting the AI query open bugs, pull test results, and propose targeted fixes without leaving the editor.
  • Privacy-conscious local development — A developer configures PearAI with their own Anthropic or OpenAI API key, bypasses the cloud backend entirely, and keeps all code context on their own machine.

Under The Hood

Architecture PearAI is structured as a multi-repository monorepo orchestrated via Git submodules, with each major capability living in its own independent component: the VS Code fork handles the editor shell, the Continue fork manages the AI chat pane, the Roo Code fork drives the autonomous agent, the FastAPI service provides optional cloud authentication and LLM proxying, and a dedicated MCP server bridges external tools. This strict component boundary means each layer can evolve independently — the Router, Chat, and Agent capabilities can be updated on separate release cycles — while the master repository acts purely as a versioned manifest that pins compatible combinations of submodule commits. The coordination model is pragmatic rather than prescriptive, relying on an automated GitHub Actions workflow to sync submodule hashes on a scheduled cadence.

Tech Stack The editor core is TypeScript running on Electron.js, inheriting VS Code’s full extension host architecture. The AI chat interface and agent frontend are React with Vite for fast hot-module-reload development cycles. The optional cloud backend is Python 3.11 with FastAPI and Supabase for authentication and persistent storage. The landing page runs on Next.js with TailwindCSS and Shadcn components. The MCP server adds Model Context Protocol support, enabling integration with external tools and APIs using the emerging standard. Logging and product telemetry flow through Axiom and PostHog. Build orchestration relies on a mix of npm, Yarn, and shell scripts, reflecting the multi-language nature of the project.

Code Quality The master repository itself is intentionally minimal — a few shell scripts and CI configuration — so quality assessment focuses on the orchestration layer and project discipline. Error handling in the setup scripts is explicit, using set -e and named error-handling functions that print diagnostics before exiting. The CI workflow is limited to a scheduled submodule-sync job, with no automated test suite or linting enforced at the monorepo level; quality controls exist within each submodule (Continue and Roo Code both have their own test suites), but there is no unified integration testing across components. Documentation is present and actively maintained in a dedicated documentation submodule and Discord community, which meaningfully reduces onboarding friction despite the complexity of the multi-component setup.

What Makes It Unique The defining innovation is the PearAI Router — a runtime model selection layer that dispatches each coding request to the LLM with the highest current performance for that task type, rather than locking users into a single provider. This means users benefit from model improvements across OpenAI, Anthropic, and Meta without changing their workflow. The second differentiator is the simultaneous integration of both a context-aware chat assistant (Continue) and a fully autonomous coding agent (Roo Code) within the same editor session, so developers can fluidly switch between guided conversation and hands-off task delegation without context loss. The addition of an MCP server layer positions PearAI ahead of most AI code editors in supporting structured, tool-use-based interactions with external systems.

Self-Hosting

PearAI does not publish a license file in its master repository, and the individual component repositories use a mix of open-source licenses inherited from their upstream projects — the VS Code core is MIT, Continue is Apache 2.0, and Roo Code is Apache 2.0. There are no commercial restrictions explicitly stated for self-hosting or modification. Developers can use PearAI freely in commercial projects, modify the code, and distribute their changes, though the absence of a unified license statement in the master repo means you should verify the license of each submodule you build against before deploying internally.

Running PearAI yourself requires assembling a non-trivial toolchain: Node.js 20.18.0, npm 10.8.2, Yarn 1.x, Python 3.11, Rust/Cargo, and a platform-specific C/C++ compiler. You are responsible for building each component from source, configuring your own LLM API keys (OpenAI, Anthropic, or compatible providers), and managing updates by pulling new submodule versions as the project releases them. There is no Docker-based self-hosted deployment path described in the documentation, and the server component (pearai-server) is described as semi-private, meaning the full backend code is not publicly available for self-hosting — users who want managed LLM access without personal API keys must use PearAI’s hosted cloud service.

The hosted PearAI service handles authentication, model routing, and API key management on your behalf, which is the primary advantage of the managed offering over self-hosting. Self-hosters give up the Router’s cloud-managed model performance rankings and any support SLAs, and must supply and rotate their own API keys across potentially multiple providers. There is no enterprise tier with SLA guarantees or dedicated support documented publicly; community support runs through Discord and GitHub Issues across the individual component repositories.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search