# Repository Briefing: instavm/coderunner
> Source: https://repoforai.com/repo/instavm/coderunner (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/instavm/coderunner
- **Official Docs / Website**: https://instavm.io
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A (78/100 · Maintenance 35/35 · Adoption 12/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, Local AI, MCP, CLI, GPU
- **Momentum**: 903 ★ total (+0 24h / +1 7d) · 40 forks
- **Topics**: `anthropic`, `apple`, `apple-container`, `claude-code`, `claude-skills`, `containerization`, `gemini-cli`, `llm`, `llmstudio`, `mcp`, `openai`
- **When to Use**: Best for: Individuals and small teams with a supported host that want local inference, search across explicitly shared files, and a browser desktop they can supervise. Existing MCP clients can adopt search without installing the full assistant. Skip if: You need a managed multi-user service, require the full desktop on Intel Macs, or only need an inference endpoint. If operating offline, plan for the initial runtime and model downloads and keep web tools and remote connectors out of the workflow.

## Overview
```text
### Architecture & Core Mechanics
CodeRunner pairs a host-side assistant and file index with a separate Linux execution environment. The assistant plans tasks using the configured model, then browses or runs code inside a sandbox with Chrome, a desktop the user can take over, and a persistent `/workspace`. The isolation backend is Apple `container` on macOS 26 or Docker on Linux; these are distinct deployment paths and should not be treated as equivalent security boundaries.

The Python package requires 3.10+ and declares `httpx`, Starlette, Uvicorn and `websockets`. The MCP extra pins `fastmcp==3.4.7` and `mcp>=1.26,<2` because the gateway uses the MCP 1.x low-level `list_tools` and `call_tool` decorators. Agents can start a search-only MCP process without deploying the sandbox, or connect to the sandbox over bearer-authenticated HTTP for execution. Skills extend the sandbox tool surface through `SKILL.md` and associated scripts that it can list and serve.

### Key Capabilities & Differentiators
Setup selects a model based on the machine's chip and memory, then checks tool calls and vision before use. The default runtime is llama.cpp; Ollama is an installer option, and OpenAI-compatible endpoints and Claude are alternatives to the bundled path. The assistant can browse, run code, accept attachments and repeat scheduled tasks. It requires approval for actions such as buying, booking, sending, deleting or changing settings, requires fresh approval for sensitive actions after reading untrusted content, and hands passwords, 2FA and CAPTCHAs back to the user.

Local retrieval combines semantic and keyword search across selected folders and app sources, including documents, PDFs, code, spreadsheets and media. Search is available in the app, at the CLI and over MCP, where tools include `files_search`, `file_view`, `file_listen` and memory operations. On the reproducible validation corpus, the correct file ranked first for 94.4% of questions and median search took 19 ms. Those figures measure retrieval, not end-to-end task completion or performance on a new collection.

### Trade-offs & Limitations
Compared with standalone Ollama, CodeRunner adds a browsable desktop, local indexing, approval checkpoints and MCP execution, but couples inference to more components and competes for host resources with the sandbox. If an existing agent already handles planning, search-only MCP is a lighter integration. Compared with hosted assistants, local inference keeps model inputs on the machine by default, but model fit and speed depend on the host. Web use still generates outbound traffic, and enabling remote models or chat channels changes where data goes.

Approval is an application-level control, not a substitute for a network policy. Extra mounts default to read-only, but `:rw` deliberately exposes host writes; `--network proxy` restricts access to approved hosts and `--network none` removes sandbox network access. Reconfiguration can require a reset that deletes sandbox files. Installer-driven replacement archives uploads, the browser profile, Downloads and `/workspace`, but does not preserve packages installed inside the sandbox. Treat those archives as sensitive and verify what you need to retain before replacing the environment.

### Hardware & Deployment Guide
The full assistant targets Apple silicon with macOS 26 or Linux with Docker. `./install.sh` installs the CLI and sandbox, with `--build` available for a local image build. Model setup downloads the runtime and weights; `--terminal-setup` or `coderunner setup` provides a terminal path. On Mac the bundled setup includes a Core ML embedding model. On Linux the documented NVIDIA build uses CUDA with driver 570 or later and Vulkan with an older driver. Budget for both inference and the Chrome desktop, and use `coderunner models bench` to test the selected model on the intended host rather than assuming a fixed VRAM requirement.

The supplied Compose file publishes port 8222 on `127.0.0.1` and requires an API token of at least 32 bytes. Set `CODERUNNER_DOCKER_RUNTIME=runsc` if gVisor is installed and intended for the deployment. Search-only installation is about 1.5 GB and also supports Apple silicon on macOS 15+, Intel Macs and Linux. The Python manifest identifies version `0.2.0`, but no GitHub release is listed. The older standalone sandbox is on the `v1` branch; neither the branch nor the package version establishes a tagged release history.
```

## Key Capabilities
```text
- Execution: Apple `container` on macOS 26 or Docker on Linux, with a persistent `/workspace` and a live Chrome desktop that the user can take over.
- Model setup: Hardware-aware selection with tool-call and vision checks; bundled llama.cpp by default, optional Ollama, OpenAI-compatible endpoints or Claude.
- Retrieval: Local semantic and keyword search over selected sources; the validation corpus measured 94.4% top-1 file retrieval and a 19 ms median search.
- MCP integration: Search-only clients use `coderunner mcp --tools search`; sandbox execution is served over authenticated HTTP on port 8222.
- Action control: Payments, sends, deletes and other sensitive changes require approval; passwords, 2FA and CAPTCHAs are handed to the user.
- Isolation controls: Extra mounts default to read-only; networking can be disabled or restricted to approved hosts, and Linux Compose can use gVisor's `runsc` when installed.
```

## Quick Start / Clone
```bash
git clone https://github.com/instavm/coderunner.git && cd coderunner
./install.sh            # add --build to build the sandbox image locally
```
