Decentralized Git hosting server — P2P networking, CRDT collaboration, AI agent support.
Git + Issues + PRs + AI Agents — all in a single server.
Gitant is a decentralized Git hosting platform for solo developers and AI agents.
| Component | Role |
|---|---|
gitant-cli |
Developer CLI — push/pull, issues, PRs, agents |
gitant-daemon |
Server — HTTP API, git smart HTTP, optional P2P |
gitant-web |
Dashboard — Browser UI (Next.js) |
gitant-mcp |
Agents — MCP tools for AI integration |
git clone https://github.com/GrayCodeAI/gitant-daemon.git
cd gitant-daemon
docker compose up -dYour node is running at http://localhost:7777 🎉
# macOS (Apple Silicon)
curl -LO https://github.com/GrayCodeAI/gitant-daemon/releases/latest/download/gitant-daemon_<version>_Darwin_arm64.tar.gz
tar xzf gitant-daemon_*_Darwin_arm64.tar.gz
sudo mv gitant /usr/local/bin/
# Run
gitant servego install github.com/GrayCodeAI/gitant/cmd/gitant@v0.1.0
gitant servegit clone https://github.com/GrayCodeAI/gitant-daemon.git
cd gitant-daemon
make build
./bin/gitant serve💡 Note: For CLI commands (
push,pull,issues,PRs), also installgitant-cli.
┌─────────────────────────────────────────────────────────────┐
│ gitant-daemon (Go) │
├─────────────────────────────────────────────────────────────┤
│ 🌐 HTTP API (go-chi) REST endpoints for everything │
│ 📡 P2P Networking libp2p (DHT + GossipSub + mDNS) │
│ 🔐 Identity DID:key + UCAN + HTTP Signatures │
│ 💾 Storage go-git + SQLite + CRDT stores │
│ 🔍 Observability Prometheus + structured logging │
│ 🔒 Security Rate limiting, TLS, validation │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ gitant-mcp (TypeScript) 160 MCP tools for AI agents │
│ gitant-web (Next.js) Web dashboard & UI │
│ gitant-cli (Go) Developer CLI │
└─────────────────────────────────────────────────────────────┘
All endpoints under /api/v1/. OpenAPI spec at /api/v1/openapi.json.
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check with dependencies |
/api/v1/status |
GET | Version, uptime, repo count |
/api/v1/repos |
GET | List repos (paginated) |
/api/v1/repos |
POST | Create repo |
/api/v1/repos/{id} |
GET | Get repo by ID |
/metrics |
GET | Prometheus metrics |
curl -X POST http://localhost:7777/api/v1/repos \
-H 'Content-Type: application/json' \
-d '{"name":"my-project","description":"Hello world"}'mkdir my-project && cd my-project
git init && git add . && git commit -m "init"
gitant push --remote http://localhost:7777 --repo my-projectThree auth methods supported (all via Authorization: Bearer <token>):
| Method | Use Case |
|---|---|
| UCAN Bearer | Agents, CLI |
| HTTP Signatures (RFC 9421) | Signed requests |
| Session Token | Web frontend, username/password login |
# Generate DID
curl -X POST http://localhost:7777/api/v1/agents/generate-did
# Delegate capabilities
curl -X POST http://localhost:7777/api/v1/agents/<did>/delegate \
-H 'Authorization: Bearer <server-ucan>' \
-d '{"audience":"<client-did>","resource":"repo:*","actions":["read","write"]}'| Variable | Default | Description |
|---|---|---|
GITANT_PORT |
7777 |
HTTP port |
GITANT_CORS_ORIGINS |
http://localhost:3303 |
CORS origins |
GITANT_DAEMON_URL |
http://localhost:7777 |
For CLI/MCP |
# With certificates
gitant serve --tls-cert cert.pem --tls-key key.pem
# Behind reverse proxy
gitant serve --port 7777gitant serve --ssh --ssh-port 2222Clone via SSH:
git clone ssh://git@localhost:2222/my-repoState is persisted to SQLite with automatic migrations.
# Manual migrations
gitant migrate up # Apply migrations
gitant migrate down # Roll backdocker compose up -dsudo cp deploy/nginx/gitant.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/gitant.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginxsudo cp deploy/caddy/Caddyfile /etc/caddy/
sudo systemctl reload caddycurl http://localhost:7777/health
# Returns: {"status":"healthy","checks":{"identity":"ok","storage":"ok"}}curl http://localhost:7777/metricsMetrics include:
gitant_http_requests_total— request count by method/path/statusgitant_http_request_duration_seconds— latency histogram- Standard Go runtime metrics
make build # Build binary
make run # Run server
make test # Run tests
make lint # Lint code
make all # All checks- Full Setup Guide: QUICKSTART.md
- Architecture Docs: PLAN.md
- CRDT Sync: CRDT_SYNC.md
MIT — see LICENSE.