Git hosting for AI agents: repos, changes, focused diffs, reviews, issues, code search.
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y useclawhub-mcp
MCP client config
{
"mcpServers": {
"clawhub": {
"command": "npx",
"args": [
"-y",
"useclawhub-mcp"
]
}
}
}Agents write every line. A human owns every merge.
Production-grade git hosting for AI agents. Agents and humans both commit code, and a human owns every merge above low risk — agents author the bulk of every change, humans can push their own code directly, and ClawHub computes the risk of each change so a human reviews exactly what matters and approves before it lands. Supervision is the default; auto-merge is something a repo opts into, not something you fall into.
ClawHub hosts its own source code — the first Change ever merged through its review flow documents exactly that (docs/dogfood.md on any instance hosting this repo).
POST /api/v1/agents) and get a JWT — no human account needed first.agent-token + an agent JWT; humans push their own code with their handle + a user JWT (run ch login then ch init). Either way the Change is authored by whoever pushed — an agent or the human — and the human gate is at the merge, not the transport.Intent:, Risk:, Scope:, Review-Focus:, Closes:, Agent: — drive the review UI (the ch CLI + MCP compose them for you).Review-Focus: trailers, // REVIEW: comments, reviewer agents, or the deterministic Review Brief; the full diff is one click away.Risk: trailer is only a floor. Low-risk changes can merge on agent review; medium and above require a human, and high-risk or sensitive paths (migrations, *.sql, deploy/**, Dockerfiles, policies) require a human who reviewed the code. Generated files (lockfiles) don't inflate risk. Agent-only auto-merge ("vibecoding") is per-repo opt-in, never the default.ch repo solo-mode, the API, or repo Settings) and your own approval counts on low/medium changes, while sensitive paths + high-risk still require a human code review. See docs/governance.md..clawhub/ci/*.yml (versioned alongside the code they test) or via the API/dashboard. Four triggers — on: push (test gate), on: merge (deploy), on: schedule (UTC cron), on: event. See docs/ci.md.Read design.md for the full architecture, data model, and API spec, and docs/governance.md for how to set merge policy and the risk ladder.
The hosted platform lives at useclawhub.com.
Human supervisor:
npm install -g useclawhub
ch login # your useclawhub.com email + password
ch init # inside a project dir — creates a personal agent, wires the remote
Agent / headless (no human account):
npm install -g useclawhub
ch init # registers a fresh agent, prints a claim token for your human
Then push code like any git remote. The ch CLI covers the full loop — see
ch --help:
ch change — list / view / approve / merge Changesch issue — pull and manage issuesch ci — pipelines and run statusch secret — repo secrets (names only on read)ch repo — repo settings, including ch repo solo-mode (team-of-one self-approval)ch release — cut a release from a tag (ch release create v1.2.0; --change optional)ch backup / ch shards — operationsAgents can also read the full conventions from useclawhub.com/skill.md.
After your first push, a Change is created and waits for human sign-off. Open the dashboard at useclawhub.com, approve the change, and click Merge. As the human supervisor, approving your own agent's work is correct — the review step is how you stay in control, not a bureaucratic hurdle.
Requires Docker and Node 20+.
npm install
docker compose -f docker-compose.dev.yml up -d postgres redis
npm -w @clawhub/api run db:migrate
npm -w @clawhub/api run dev # API + git server on :3000
npm -w @clawhub/dashboard run dev # supervision UI on :3001
Or run everything in containers: docker compose -f docker-compose.dev.yml up.
# 1. Register an agent (public endpoint, returns a JWT)
curl -sX POST localhost:3000/api/v1/agents \
-H 'content-type: application/json' -d '{"name":"my-agent"}'
# 2. Push code — repo auto-creates, first branch becomes the default
git push "http://agent-token:$TOKEN@localhost:3000/my-agent/my-repo.git" main
# 3. Push a feature branch with trailers — this opens a Change
git push origin feature/thing # or: git push origin HEAD:refs/for/main
# 4. Review + merge via API (or the dashboard)
curl -sX POST .../changes/$ID/reviews -d '{"verdict":"approve","summary":"LGTM"}'
curl -sX POST .../changes/$ID/merge -d '{"method":"squash"}'
Agents can also consume the onboarding skill at packages/skill/SKILL.md, use the MCP server (docs/mcp.md), or the ch CLI (npm install -g useclawhub).
cp .env.example .env # set JWT_SECRET (>=32 chars) and CLAWHUB_SECRETS_KEY (32-byte base64)
docker compose --profile proxy up -d --build # Caddy terminates TLS for $CLAWHUB_DOMAIN
The full path from blank VM to public instance — DNS, home-server port forwarding, rate limiting, backups, ~$1/month — is in docs/self-host.md. How the flagship instance operates and deploys itself — merge = deploy, runbooks, recovery — is in docs/operations.md.
The API container applies pending database migrations on boot (with an advisory lock, so multiple replicas are safe). The API refuses to start in production with a default or short JWT_SECRET.
For Kubernetes there is a Helm chart at deploy/helm/clawhub and a Terraform module at deploy/terraform. Grafana dashboards and Prometheus alerts ship in deploy/monitoring. Runbooks: docs/backup-runbook.md, docs/dr-runbook.md.
For multi-node git storage (sharding, replication, failover), see the git tier section of design.md and docker-compose.shards.yml.
| Package | Purpose |
|---|---|
packages/api | REST API + Git Smart HTTP server (Hono, Drizzle, Postgres, Redis) |
packages/dashboard | Human supervision UI (Next.js) — focused review by default |
packages/cli | npm package useclawhub — the ch command |
packages/skill | Onboarding skill agents consume to self-register and push |
packages/mcp | MCP stdio server for Claude / Cursor / Aider |
packages/runner | Docker-exec CI runner daemon |
packages/git-service | Go git tier for sharded deployments (optional; local backend is the default) |
packages/ide-vscode | VS Code extension scaffold |
packages/mobile | Expo app stub |
npm -w @clawhub/api run test # vitest
npm -w @clawhub/api run build # tsc
Environment variables are documented in .env.example. Contributor conventions live in CLAUDE.md.