Silk Code

An open, model-agnostic AI coding harness. One environment that understands your repository, edits code, runs your tests, and manages git — with DeepSeek, Qwen, Kimi, GLM, MiniMax, Cloudflare Workers AI, or any model running on your own machine.

The coding environment belongs to the developer.
The AI model is replaceable.

Any model, cloud or local

Bring whichever model you trust

One provider layer speaks to every OpenAI-compatible endpoint, with native Ollama support and local-model discovery. Switch models mid-session — or per session — without changing how you work.

DeepSeekQwenKimiGLMMiniMax Cloudflare Workers AIOpenRouter OllamavLLMLM Studio any OpenAI-compatible endpoint

Dashed = runs on your own hardware. --model auto picks whatever you have: a running local server first, then any cloud provider with a key. Onboard anything else with silkcode models add — or pull local models Ollama-style with silkcode models pull qwen2.5-coder.

Quick start

Install once. Run it anywhere.

Requires Python 3.10 or newer (macOS ships 3.9 — grab a current Python from python.org first) and git. Keep Silk Code in its own virtual environment, then add a shell alias so the silkcode command is available from every project without activating the environment first.

01

Install or update Silk Code recommended

# install or update Silk Code
if [ -d "$HOME/SilkCode/.git" ]; then
    git -C "$HOME/SilkCode" pull
else
    git clone https://github.com/RupertCloud/SilkCode.git "$HOME/SilkCode"
fi

cd "$HOME/SilkCode"

# create the virtual environment if needed
[ -d .venv ] || python3 -m venv .venv

# install or update Silk Code
.venv/bin/python -m pip install -e .

# add the global command if it is not already configured
grep -q 'alias silkcode=' ~/.zshrc 2>/dev/null || \
    echo 'alias silkcode="$HOME/SilkCode/.venv/bin/silkcode"' >> ~/.zshrc

source ~/.zshrc

silkcode --help

This command block is safe to rerun: it updates an existing checkout, reuses its virtual environment, and avoids adding duplicate aliases. The alias invokes Silk Code directly inside its environment, so you do not need to activate .venv to use it.

02

Connect a model — either side works

# cloud: DeepSeek (or qwen / kimi / glm / minimax / openrouter)
export DEEPSEEK_API_KEY=sk-your-key

# or local & private: install Ollama from ollama.com, then
silkcode models pull qwen2.5-coder

Pick a model with tool-calling support — the agent works by calling tools. qwen2.5-coder is the reliable local choice.

03

Point it at a project

cd ~/Projects/my-project
silkcode gui .                        # browser GUI at 127.0.0.1:8377

silkcode gui ~/Projects/my-project    # or pass the project path directly
silkcode ~/Projects/my-project        # terminal REPL

silkcode gui ~/SilkCode opens the Silk Code source repository itself. To work on another codebase, pass that project’s directory instead.

Then just ask: “Build a small Flask API with tests, and make sure the tests pass.” Approve its actions as prompts appear; switch to --mode agent once you trust it.

The harness

Everything between you and the model

Multi-session GUI

Project explorer, streaming chat, agent activity timeline, diff viewer. Open parallel sessions with different models; a busy session keeps working while you use another.

Repository intelligence

Every session starts with a repo map, your SILKCODE.md project rules, accumulated project memory, and installed skills — the model knows the codebase before its first tool call.

Permissions with teeth

Commands are risk-classified. Reads run free, writes and installs ask, rm -rf / push / merge always require approval — unless you explicitly grant them for the session.

Checkpoints & revert

Files are snapshotted before the agent touches them. One click (or /revert) undoes a whole turn.

Verifies its own work

run_tests auto-detects pytest, npm, cargo, go, and flutter — the agent runs your suite and reads the failures before claiming success.

Long sessions that survive

Context compaction trims old tool output and turns as you approach the model’s window — sessions roll on instead of dying, and are resumable from GUI or CLI.

MCP client

Connect any Model Context Protocol server — its tools become agent tools, approval-gated like everything else.

Remote sandboxes

Run the agent’s commands in a disposable container instead of your machine: self-hosted with one command, or on Cloudflare Sandboxes via the bundled Worker.

Built-in evals

silkcode benchmark runs real coding tasks end-to-end per model — with an A/B mode that isolates what the harness itself contributes.

GitHub

Authorize like an app, ship like a team

Sign in with GitHub — install the Silk Code app, approve a code in your browser, done. No tokens to create or paste; short-lived credentials, scoped to the repos you chose, refreshed automatically.

silkcode connect githubsign in (or verify a $GITHUB_TOKEN)
/push · ⇧ Pushpush when you say so
--auto-pushpush automatically after each turn
github_create_pragent opens draft PRs, reads issues, merges on approval

And the harness signs its work. Agent-made commits register Silk Code as co-author — you stay the author, the record stays honest:

Fix login redirect after session refresh

Co-Authored-By: Silk Code <agent@silkcode.dev>
X-Silk-Model: deepseek/deepseek-chat
X-Silk-Session: 42

git log --grep=X-Silk-Model forever answers “which commits did the agent write, with which model?”

Command line

The whole harness from the terminal

silkcode [path]interactive REPL — /model, /mode, /diff, /revert, /push, /usage
silkcode -p "…"one-shot, scriptable: run a single request and exit
silkcode reviewAI review of your uncommitted changes
silkcode testrun the project’s tests, framework auto-detected
silkcode modelslist, add, pull, or set default models
silkcode sessions · resumecontinue any session — including ones started in the GUI
silkcode mcp · sandbox · benchmarktool servers, remote execution, model evals