Skip to content

unbound-force/replicator

Repository files navigation

Replicator

CI Go 1.25+ License: MIT

Multi-agent coordination for AI coding agents. Single Go binary, zero runtime dependencies.

Go rewrite of cyborg-swarm (TypeScript). Same tools, same protocol, faster startup, simpler distribution.

Status

53 MCP tools | 190+ tests | 15MB binary | <50ms startup

All 5 implementation phases are complete:

  • Phase 0: MCP server, SQLite, tool registry
  • Phase 1: Org (11 tools) + Comms (10 tools)
  • Phase 2: Forge Orchestration (24 tools)
  • Phase 3: Memory / Dewey proxy (8 tools)
  • Phase 4: CLI (9 commands)
  • Phase 5: Parity testing (100% shape match)

Install

Homebrew (macOS)

brew install unbound-force/tap/replicator

Go Install

go install github.com/unbound-force/replicator/cmd/replicator@latest

Binary Download

Download from GitHub Releases. Available for macOS (arm64), Linux (amd64, arm64).

Usage

# Per-repo setup (creates .uf/replicator/ directory)
replicator init

# Per-machine setup (creates ~/.config/uf/replicator/ + SQLite DB)
replicator setup

# Start MCP server (AI agents connect via stdio)
replicator serve

# List work items
replicator cells

# Check environment health
replicator doctor

# Activity summary
replicator stats

# Run preset analytics queries
replicator query cells_by_status

# Generate tool reference docs
replicator docs

# Version info
replicator version

MCP Tools (53)

Replicator exposes 53 tools via the MCP protocol over stdio JSON-RPC:

Category Tools Purpose
Org 11 Work item tracking: create, query, update, close, epics, sessions, sync
Comms 10 Agent messaging: send, inbox, ack, file reservations
Forge 24 Orchestration: decompose, spawn, worktrees, progress, review, insights
Memory 8 Dewey proxy: store/find learnings, deprecated tool stubs

See the full Tool Reference for schemas and examples.

Connecting an AI Agent

Add replicator to your opencode.json:

{
  "mcp": {
    "replicator": {
      "type": "stdio",
      "command": "replicator",
      "args": ["serve"]
    }
  }
}

For Claude Code, add to mcp_servers in your config:

{
  "mcp_servers": {
    "replicator": {
      "command": "replicator",
      "args": ["serve"]
    }
  }
}

Environment Variables

Variable Default Purpose
REPLICATOR_DB ~/.config/uf/replicator/replicator.db SQLite database path
DEWEY_MCP_URL http://localhost:3333/mcp/ Dewey semantic memory endpoint
ZEN_API_KEY (none) OpenCode Zen gateway for LLM calls

Architecture

flowchart LR
    Agent["AI Agent\n(OpenCode, Claude)"]
    MCP["MCP Server\n(stdio JSON-RPC)"]
    Reg["Tool Registry\n(53 tools)"]
    Domain["Domain Logic\n(org, forge, comms)"]
    DB["SQLite\n(WAL mode)"]
    Dewey["Dewey\n(semantic memory)"]
    Git["Git\n(worktrees)"]

    Agent -->|stdin/stdout| MCP
    MCP --> Reg
    Reg --> Domain
    Domain --> DB
    Domain -->|HTTP proxy| Dewey
    Domain -->|os/exec| Git
Loading

Package Layout

cmd/replicator/       CLI entrypoint (cobra)
internal/
  agentkit/           Embedded agent kit (commands, skills, agents)
  config/             Configuration (env vars, defaults)
  db/                 SQLite + migrations (7 tables)
  org/                Cell CRUD, epics, sessions, sync
  comms/              Agent messaging, file reservations
  forge/              Decomposition, spawning, worktrees, review, insights
  memory/             Dewey proxy, deprecated tool stubs
  gitutil/            Git worktree operations (os/exec)
  doctor/             Health check engine
  stats/              Database activity summary
  query/              Preset SQL analytics
  mcp/                MCP JSON-RPC server + structured logging
  ui/                 Centralized lipgloss styles + table helpers
  tools/
    registry/         Tool registration framework
    org/              Org tool handlers (11)
    comms/            Comms tool handlers (10)
    forge/            Forge tool handlers (24)
    memory/           Memory tool handlers (8)
test/parity/          Shape comparison engine + fixtures
docs/                 Generated tool reference

Development

make build    # Build binary to bin/replicator
make test     # Run all tests
make vet      # Go vet
make check    # Vet + test
make serve    # Build and run MCP server
make release  # GoReleaser dry-run (local)
make install  # Install to GOPATH/bin

See CONTRIBUTING.md for development setup and PR workflow.

Credits

Go rewrite of cyborg-swarm, originally forked from swarm-tools by Joel Hooks. See LICENSE.

About

Go MCP server providing 53 tools for AI agent orchestration: work tracking (Org), inter-agent messaging (Comms), task decomposition with git worktree isolation (Forge), and semantic memory via Dewey. Ships an embedded agent kit (commands, skills, agents) scaffolded by replicator init. 15MB binary, <50ms startup. Installable via brew install.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors