Skip to content
项目

关于

面向个人设备的安全、私密沙箱助手

人工智能与机器学习

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
-1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

GitHub stars License

CodeRunner: a private AI assistant with its own sandboxed computer

CodeRunner runs on your own computer. It picks a local model that suits your machine, does tasks on its own Linux computer in a VM that you can watch and take over, and searches the files you share with it.

The sandbox also serves your own agents: Claude Code, Codex and others can run code in it over MCP.

Models run on your machine. What leaves it is what the assistant looks up on the web for a task. A remote model or a chat channel gets data only after you turn it on.

The CodeRunner app: a research task on the left, the assistant's screen on the right

Quick start

The assistant (macOS 26 on Apple silicon, or Linux with Docker)

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

The installer sets up the sandbox VM and the coderunner command, then opens the app. The app shows the model it chose for this machine and what it will download. Choose Download and set up.

  • The installer asks for your admin password once, to install Apple's container tool.
  • You do not need a model runtime. Setup fetches its own llama.cpp: on a Mac with a Core ML embedding model, on Linux the build for your NVIDIA card (CUDA with driver 570 or later, Vulkan with an older one). To use Ollama instead, pass --runtime ollama.
  • coderunner app opens the app again later.
  • To set up in the terminal instead, pass --terminal-setup (the default over SSH and on Linux without a display) or run coderunner setup.
  • If coderunner is not found, add ~/.local/bin to your PATH.

File search only (for Claude Code, Codex or Claude Desktop)

git clone https://github.com/instavm/coderunner.git && cd coderunner
./install.sh --search                       # embedding model and index only (about 1.5 GB)
coderunner files add ~/Documents            # share a folder
coderunner files sources add mail           # optional: mail, messages, notes, calendar
claude mcp add coderunner-search -- coderunner mcp --tools search

This works on Apple silicon with macOS 15 or later, where embeddings run on the Neural Engine, and on Linux and Intel Macs, where they run on llama.cpp on the processor. For Codex: codex mcp add coderunner-search -- coderunner mcp --tools search. From the terminal: coderunner find "apartment lease notice period".

The sandbox on its own is on the v1 branch.

What it does

Tasks. You ask in the app. The assistant plans, browses and runs code on its own computer, a Linux VM with a desktop and Chrome. The app shows that screen live and you can take control at any point. You can attach files, dictate, and schedule a task to repeat.

A model chosen for your hardware. Setup reads the chip and memory, picks a model that fits, downloads it, and checks tool calls and vision before using it. Settings → Models & Mac shows what was chosen and can time it on your machine (coderunner models bench does the same). You can instead use your own OpenAI-compatible model server, or Claude with your own Anthropic key (coderunner claude on). The app says it is not private while Claude is on.

Models and benchmarks in Settings

Approvals. Reading pages and filling in searches need no approval. Anything that pays, books, sends, posts, deletes or changes settings asks you first. The assistant does not type passwords, 2FA codes or CAPTCHAs: it hands the screen to you. Text from web pages, mail and the sandbox is treated as untrusted, and after reading it a sensitive action needs a fresh approval.

Browsing. The assistant browses in Chrome inside the VM. If a site blocks the VM, it asks once to continue in its own browser on the Mac, which is separate from your browser. You can import your cookies for a single site.

Browser settings: the VM's browser and CodeRunner's own Mac browser

File search. The folders and Mac apps you choose are indexed on your machine: documents, PDFs, notes, code, spreadsheets, screenshots (read on device), photos, video and audio. Search them from the app's search box (⌘K), from the terminal, or let the assistant use them in a task.

File search for other agents

Agents connected with coderunner mcp --tools search get files_search, file_read, file_view, file_listen, memory_search and memory_save.

  • Search combines meaning and keywords. On the reproducible benchmark corpus the right file is first for 94.4% of questions, and a search takes 19 ms at the median (VALIDATION.md).
  • Secrets, private keys, .env files, hidden folders and ~/Library are never indexed. One-time codes and sign-in links are removed from indexed mail.
  • Small files that are only in iCloud can be downloaded to index and then returned to iCloud.

The sandbox VM

Code runs in a Linux VM (Apple container on macOS 26, Docker elsewhere) with an authenticated MCP server and a /workspace folder that persists.

Lifecycle

coderunner sandbox stop        # stop the VM; its files are kept
coderunner sandbox start       # start it
coderunner sandbox reset       # delete the VM and its files and create it again
coderunner sandbox status      # health and disk use
coderunner sandbox logs -f     # follow the VM's logs

Resources, mounts and network

./install.sh --cpus 4 --memory 8g \
  --mount "$HOME/projects/api:/workspace/api" \
  --mount "$HOME/projects/output:/workspace/output:rw"

./install.sh --network proxy   # only hosts you approve; no LAN, loopback or tailnet
./install.sh --network none    # no network

Extra mounts are read-only unless they end in :rw. To change resources, mounts or the network later, run coderunner sandbox reset with the same flags.

Running ./install.sh again keeps the VM's CPUs, memory, profile and mounts unless you give new ones. Giving settings that differ from the VM's asks before replacing it (--replace-sandbox agrees in advance). It first copies the VM's uploads, browser profile, Downloads and /workspace to ~/.coderunner/sandbox-files-<time>.tar. Packages installed inside the VM are not kept.

Connecting MCP clients to the sandbox

The sandbox MCP server listens at http://coderunner.local:8222/mcp (http://127.0.0.1:8222/mcp in proxy/none modes and on Linux). Every endpoint except GET /health requires Authorization: Bearer <token> (coderunner token prints the generated token in ~/.coderunner/api-token).

# Claude Code
claude mcp add --transport http coderunner http://coderunner.local:8222/mcp \
  --header "Authorization: Bearer $(coderunner token)"
// Gemini CLI (~/.gemini/settings.json) or OpenCode (~/.config/opencode/opencode.json)
{
  "mcpServers": {
    "coderunner": {
      "httpUrl": "http://coderunner.local:8222/mcp",
      "headers": {
        "Authorization": "Bearer <output of coderunner token>"
      }
    }
  }
}

For Claude Desktop and Kiro, point them at the stdio bridge in examples/claude_desktop/mcpproxy.py using ~/.coderunner/venv/bin/python (see examples/claude_desktop/claude_desktop_config.example.json). For managed cloud VMs, see InstaVM.

Skills

A skill is a folder with a SKILL.md and scripts under ~/.coderunner/assets/skills/user/<name>/. The sandbox lists and serves them through list_skills, get_skill_info and get_skill_file. Two are built in: pdf-text-replace and image-crop-rotate. See SKILLS-README.md.

Documentation

License

Apache 2.0. See LICENSE.

探索相关项目

加载中…