Free, open-source, self-hosted AI code editor powered by local LLMs
No cloud. No API keys. No telemetry. Your code stays on your machine.
A free, open-source, self-hosted AI code editor powered entirely by your local LLM β no cloud, no API keys, no telemetry.
What is LocalAI Code Editor? LocalAI Code Editor is a free, open-source, self-hosted AI code editor that runs entirely on your local machine. It connects to local LLMs β Ollama, LM Studio, llama.cpp, vLLM, or any OpenAI-compatible server β to provide an agentic AI coding assistant without sending your code to the cloud. Think VS Code + AI, but private.
Key features: Monaco Editor (same as VS Code), agentic AI that reads/writes files and runs commands, MCP protocol support for external tools, a marketplace of 50+ agent skills, Docker-in-Docker sandboxing, LSP IntelliSense, full git panel with blame, and builds for Windows, macOS, Linux, Docker, and Unraid.
| Feature | Benefit |
|---|---|
| π 100% Private & Offline | Every completion, refactor, and agent run uses your local models. No data ever leaves your machine or your network. |
| π οΈ Full Agentic Assistant | The AI reads/writes files, runs shell commands, calls MCP tools, loads project skills, and iterates until the job is done. |
| π MCP-First Architecture | Connect any local (stdio) or remote (HTTP/SSE) MCP server β its tools become available to the agent automatically. |
| π§ Agent Skills System | Drop SKILL.md files into your project or home directory to teach the agent your conventions, workflows, and best practices. |
| π Real IntelliSense | LSP language servers provide completion, hover, diagnostics, go-to-definition, find-references, and rename. |
| π Complete Git Panel | Status, diff, stage/unstage, commit, branch management, push/pull, and log β all without leaving the editor. |
| π One Codebase, Every Target | Runs as a desktop app (Electron), local web app, or Docker container (Unraid, Kubernetes, any Docker host). |
- Features
- Supported LLM Providers
- Quick Start
- Configuration
- Agent Skills
- Language Servers (LSP)
- MCP Servers
- Docker & Unraid Deployment
- Development
- Project Structure
- Roadmap
- Changelog
- Contributing
- Security
- License
| Category | Capabilities |
|---|---|
| AI Agent | Streamed chat that reads/writes files, runs commands, calls MCP tools, and iterates to completion |
| Local LLM Support | Auto-detect Ollama, LM Studio, llama.cpp, and any OpenAI-compatible endpoint |
| MCP Client | Connect local (stdio) and remote (HTTP/SSE) MCP servers; expose their tools to the agent |
| Agent Skills | 50+ built-in skills; project + user SKILL.md files with frontmatter; loaded on demand |
| Skills Marketplace | Installed/Discover tabs with 18 curated skills across 12 categories; one-click install |
| Language Servers | LSP-based completion, hover, diagnostics, definition, references, rename |
| Git Panel | Status, diff, stage/unstage, commit, stash, branch manager, push/pull, log with diff preview, blame |
| File Explorer | Browse, open, edit, save β plus New File/Folder, Rename, and Delete from the sidebar |
| Quick Open & Search | Ctrl+P fuzzy file finder; workspace-wide text search with regex; @file mentions |
| Monaco Editor | The industry-standard editor used by VS Code, running locally |
View all 28 featuresβ¦
| Category | Capabilities |
|---|---|
| Agent Task History | View, replay, and branch from previous agent task trajectories |
| Model Comparison | Run the same prompt against multiple models side-by-side |
| Agent System Prompt Tuning | Preset templates, character count, expanded editor, template variables ({{workspace}}, {{git_branch}}, etc.) |
| Approve-before-Apply | Approve/deny per write+command via Agent panel toggle (diff-level review) |
| Docker-in-Docker Sandbox | Isolated Docker container for safe agent code execution β start/stop/exec via Settings |
| Provider Setup UI | Add, edit, test, and remove providers at runtime (Settings panel) β persisted per workspace |
| Workspace Management | Native folder picker on launch; switch projects anytime; live-rebinds git/skills/LSP |
| MCP Server Discovery | Curated registry of 15+ servers with search, category filter, and one-click install |
| MCP Tool Discovery | Searchable tool list grouped by server with expandable sections and descriptions |
| Token Usage Dashboard | Visual input/output breakdown, cost estimates, locale-formatted token counts |
| Conversation Export | Export chat history as Markdown or JSON for sharing and debugging |
| Skill Auto-Application | Workspace-aware skill suggestions based on project indicators and path heuristics |
| Terminal Integration | Run commands in an integrated terminal over WebSocket |
| Code Formatting | Format code with language-specific rules; auto-save with configurable delay |
| Command Palette | Quick access to all editor commands via Ctrl+Shift+P |
| Settings Persistence | Editor preferences saved to localStorage; workspace settings in .localai/ |
| Multi-tab Support | Tab management utilities for multiple files |
| Error Handling | Structured error types and retry logic throughout |
| Keyboard Shortcuts | Reference for all editor commands with platform-specific keys |
| File Change Tracking | Track agent modifications to files with change types |
| Editor Settings UI | Auto-save toggle, minimap visibility, font size, word wrap controls |
| Markdown Preview | Toggle Edit/Preview for .md files |
| Multi-Platform | Windows, macOS, Linux (Electron), and any web-capable device (Docker) |
LocalAI Code Editor connects to every major local inference server through their OpenAI-compatible APIs:
- Ollama β
http://localhost:11434/v1 - LM Studio β
http://localhost:1234/v1 - llama.cpp server β
http://localhost:8080/v1 - vLLM β
http://localhost:8000/v1 - Jan β
http://localhost:1337/v1 - Text-Generation-WebUI β
http://localhost:5000/v1 - Any OpenAI-compatible endpoint β Custom servers, enterprise proxies, and more
The editor health-checks each endpoint and lets you pick the running provider and model from the Agent panel.
No config file needed β open the Settings panel (β‘ icon) β LLM Providers:
- See every provider with live health/latency
- Add a provider from a preset (Ollama, LM Studio, llama.cpp, vLLM) or any custom OpenAI-compatible URL
- Edit label / base URL / API key, Test the connection before saving, or Remove
- Settings persist to
<workspace>/.localai/settings.jsonand survive restarts (dev, desktop, and Docker)
- Node.js 20+ and pnpm 10
- A local LLM server (e.g. Ollama) running with at least one model pulled:
ollama pull codellama:13b ollama serve
git clone https://github.com/wildfirebill-ai/localai-code-editor.git
cd localai-code-editor
pnpm install
pnpm build
pnpm dev:server # starts the server + web UI at http://127.0.0.1:4801Open http://127.0.0.1:4801 in your browser, pick your provider and model in the Agent panel, and start asking the AI to build, edit, run, and debug your code.
pnpm --filter @localai/desktop dev # run with hot reload
pnpm --filter @localai/desktop dist # package installers for your OSOn first launch the desktop app asks you to pick a project folder (native dialog). You can switch projects anytime from Settings β Workspace β Open Folderβ¦, or by typing an absolute path (also works in browser/Docker mode).
Or skip the build entirely β grab a ready-made installer from the latest release.
docker run -d --name localai-code-editor \
-p 4801:4801 \
-v /path/to/your/repo:/workspace \
-v /path/to/config:/root/.localai \
ghcr.io/wildfirebill-ai/localai-code-editor:latest- WebUI:
http://<your-host>:4801 /workspace= the repo you want to edit/root/.localai= persistent skills + config
Create a localai.config.json in your workspace (full example: localai.config.json.example):
| Key | Purpose |
|---|---|
providers |
LLM endpoints to connect to (auto-detects Ollama, LM Studio, etc.) |
mcpServers |
MCP servers to launch at startup (stdio or HTTP) |
languageServers |
LSP servers to manage for IntelliSense |
allowShell |
Whether the agent may run shell commands |
protectedPaths |
Paths the file tools may not touch (e.g. .git, .env) |
50+ production-grade skills ship built-in and work in every workspace β commit, test-and-fix, typecheck-fix, lint-clean, debug-failure, refactor-safe, docker-build-run, dependency-update, git-release, write-docs, security-check, and 40 more covering git, quality, testing, performance, frontend, backend, ops, and AI integration.
The Skills panel (π§ icon) has two tabs:
- Installed β all loaded skills with enable/disable controls and workspace-aware suggestions
- Discover β browse 18 curated skills across 12 categories (git, backend, frontend, devops, testing, security, quality, docs, docker, ai-integration, performance, maintenance) with search and one-click install
Skills are Markdown files with frontmatter that teach the AI your conventions, workflows, and best practices. Drop a SKILL.md into either location:
- Project skills:
<workspace>/.localai/skills/<name>/SKILL.md(overrides builtins) - User (global) skills:
~/.localai/skills/<name>/SKILL.md
---
name: ts-check
description: Typecheck a package with pnpm typecheck before committing
category: quality
---
Run `pnpm typecheck` from the package root and fix any errors.Project skills override same-named global skills. The agent loads them on demand via the read_skill tool.
Add language servers to languageServers in your config for full IntelliSense:
{
"languageServers": [
{ "id": "typescript", "language": "typescript", "extensions": [".ts", ".tsx", ".js", ".jsx"], "command": "typescript-language-server", "args": ["--stdio"] },
{ "id": "python", "language": "python", "extensions": [".py"], "command": "pyright-langserver", "args": ["--stdio"] },
{ "id": "rust", "language": "rust", "extensions": [".rs"], "command": "rust-analyzer", "args": [] }
]
}Install the server binaries yourself:
npm i -g typescript-language-server pyright rust-analyzerFeatures: completion, hover, diagnostics, go-to-definition, find-references, rename.
Connect any MCP server β local subprocesses and remote endpoints:
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
},
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
},
"postgres": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost/db"]
},
"remote": {
"type": "http",
"url": "http://localhost:9000/mcp"
}
}
}The MCP Servers panel has two tabs:
- Installed β connected servers with status indicators, tool counts, and a manual add form
- Discover β curated registry of 15+ servers (Filesystem, Git, GitHub, PostgreSQL, SQLite, Redis, Web Fetch, Brave Search, AWS, Kubernetes, Hugging Face, Memory, Sequential Thinking) with search, category filter, and one-click install
Connected tools are searchable and grouped by server in Settings β Connected Tools. Hover over any tool to see its description.
LocalAI Code Editor runs headless in Docker and is ideal for Unraid via Community Apps or a custom template. The image is published multi-arch (linux/amd64, linux/arm64) to GHCR by CI.
docker run -d --name localai-code-editor \
-p 4801:4801 \
-v /mnt/user/your_repo:/workspace \
-v /mnt/user/appdata/localai:/root/.localai \
ghcr.io/wildfirebill-ai/localai-code-editor:latest- WebUI:
http://<your-unraid-ip>:4801 /workspace= the repo you want to edit/root/.localai= persistent skills + config
If you want the editor to build and test Docker programs from inside the editor, you must mount the Docker socket:
volumes:
- /var/run/docker.sock:/var/run/docker.sockWARNING β read this before mounting the Docker socket.
Mounting
/var/run/docker.sockinto a container grants root-equivalent control over the entire Docker host to that container. Because LocalAI Code Editor's AI agent can run arbitrary shell commands, anything that can reach the editor's web UI β including a malicious prompt, an untrusted repository it opens, or any user who can reach port4801β could effectively take over your Unraid server and everything else on the Docker host.Use the socket mount only on a trusted, single-user server where you alone control access. Never expose the editor's UI to the internet or to untrusted users while the socket is mounted. Prefer to keep it on your LAN only.
| Option | What it does | Security |
|---|---|---|
| B β Edit here, build on the host | Develop the Docker program in the editor; build/run it on the Unraid host against the same mounted /workspace repo. |
β No socket, no risk. Recommended default. |
| C β Docker-in-Docker (DinD) | Run a nested Docker daemon inside the editor container, isolated from the host. | β Isolated from the host. Heavier (privileged container). |
| A β Docker CLI + socket | Mount the socket + docker CLI so the agent can run docker build / docker compose directly. |
In short: start with Option B for safety. Upgrade to Option A only if you truly need the agent to drive Docker from inside the editor and you fully control the network.
# Setup
pnpm install
# Development servers
pnpm dev:server # backend on :4801 (also serves the web UI)
pnpm dev:web # Vite dev server with hot reload on :5173
pnpm dev:desktop # Electron with hot reload
# Build & Quality
pnpm build # build all packages
pnpm typecheck # typecheck all packages
pnpm lint # lint all packages
pnpm test # run testsSee Project Structure and CONTRIBUTING.md for details.
packages/
provider/ LLM adapters β Ollama, LM Studio, llama.cpp, OpenAI-compatible
mcp/ MCP host β local (stdio) + remote (HTTP/SSE) servers, tool calls
agent/ Agentic loop β shell/file tools, tool-call iteration
git/ Git panel engine β status, diff, branches, push/pull
skills/ SKILL.md loader β project + user, frontmatter parsing
lsp/ Language-server host β spawn + JSON-RPC over stdio, WS bridge
server/ Node backend β WebSocket JSON-RPC + static web UI
apps/
web/ Editor UI β Monaco, explorer, agent/chat, git panel, MCP/skills
desktop/ Electron shell β spawns the server, loads the UI
See ROADMAP.md for the detailed roadmap.
| Milestone | Target | Status |
|---|---|---|
| Core editor + agent loop | v0.1 | β Done |
| MCP + Skills system | v0.1 | β Done |
| LSP IntelliSense | v0.1 | β Done |
| Git panel + blame | v0.1βv0.2 | β Done |
| Multi-platform (Win/Mac/Linux/Docker) | v0.1 | β Done |
| Agent Skills Marketplace | v0.2 | β Done |
| Docker-in-Docker Sandbox | v0.2 | β Done |
| Agent System Prompt Tuning | v0.2 | β Done |
| Skill Auto-Application | v0.2 | β Done |
| Enhanced MCP Tool Discovery | v0.2 | β Done |
| Editor Polish (themes, keybindings, navigation) | v0.3 | π Planned |
| Collaboration & Scale (multi-user, sessions) | v0.4 | π Planned |
| Extensibility Platform (plugins, extensions) | v0.5 | π Planned |
| Stability & Polish (tests, a11y, i18n) | v1.0 | π Planned |
Both workflows (ci.yml, docker.yml) run only when:
- A version tag is pushed β
git tag v0.1.4 && git push --tagsβ or - Manually triggered from the Actions tab (
workflow_dispatch)
Everyday pushes to main and pull requests do not run CI. Pushing a v* tag triggers the full pipeline:
| Job | What it does |
|---|---|
test |
Builds + typechecks + lints + tests on Windows, macOS, and Linux |
desktop |
Packages installers per OS (NSIS/zip, DMG/zip, AppImage/deb/tar.gz) |
release |
Publishes all desktop artifacts to a GitHub Release with generated notes |
docker |
Builds and pushes the multi-arch image to ghcr.io with semver tags |
See CHANGELOG.md for detailed release notes.
| Version | Date | Highlights |
|---|---|---|
| v0.2.7 | 2026-08-26 | Theme Switcher, Release Notes Modal, Skill Versioning, Skill Search |
| v0.2.6 | 2026-08-26 | Find & Replace, Debug Console, Bracket Matching, Multi-cursor, Code Folding, MCP Resilience (includes v0.2.4 + v0.2.5) |
| v0.2.3 | 2026-08-25 | Git Stash, Interactive Commit Editor, Commit History Viewer, Branch Comparison |
| v0.2.2 | 2026-08-25 | Prompt Variables, Chat Export, Tool Description Customization, Token Usage Dashboard |
| v0.2.1 | 2026-08-25 | Skills Marketplace, Docker-in-Docker Sandbox, Prompt Tuning UI, Skill Suggestions, Enhanced Tool Discovery |
| v0.2.0 | 2026-08-23 | MCP Discovery, Task History, Model Comparison, Terminal, Git Blame, Code Formatting, Settings UI |
| v0.1.6 | 2026-08-22 | Electron 43 (clears flagged CVEs), Docker slimmed + hardened, automated vuln scanning |
| v0.1.5 | 2026-08-21 | Quick Open (Ctrl+P), file search, @file mentions, 51 builtin skills, md preview |
| v0.1.0 | 2026-08-20 | Initial release: Core editor, agent loop, MCP, Skills, LSP, Git panel, Win/Mac/Linux/Docker |
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repo
- Create a feature branch:
git checkout -b feat/amazing-feature - Make your changes with tests
- Run quality checks:
pnpm typecheck && pnpm lint && pnpm test - Submit a PR with a clear description
See SECURITY.md for our security policy and how to report vulnerabilities. For full transparency, VULNERABILITIES.md documents every known weakness, attack surface, and accepted design tradeoff β including prompt-injection risk and the unauthenticated server β before you discover them the hard way.
- No external network calls unless you configure a remote provider/MCP
- Shell commands are opt-in (
allowShell: truein config) - Protected paths prevent the agent from touching sensitive files
- Docker socket mount is opt-in with explicit warnings
To report a security issue, email security@wildfirebill.ai or use GitHub Security Advisories.
MIT License β free to use, modify, and self-host.
- Monaco Editor β The editor that powers VS Code
- Model Context Protocol β For the MCP specification
- Ollama β Making local LLMs accessible
- Electron β Cross-platform desktop apps
- TypeScript β Type-safe JavaScript at scale
Star β this repo if you find it useful! It helps others discover LocalAI Code Editor.
{ "workspace": "/path/to/your/repo", "port": 4801, "host": "127.0.0.1", "providers": [ { "id": "ollama", "label": "Ollama", "baseUrl": "http://localhost:11434/v1" } ], "mcpServers": { "filesystem": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"] } }, "languageServers": [ { "id": "typescript", "language": "typescript", "extensions": [".ts", ".tsx"], "command": "typescript-language-server", "args": ["--stdio"] } ], "protectedPaths": [".git"], "allowShell": true }