Skip to content

Repository files navigation

ClawCode

An open-source task orchestration platform for OpenCode and OpenClaw. Create, queue, monitor, and manage AI-driven coding tasks through a web dashboard — powered by OpenCode or OpenClaw sessions under the hood.

┌──────────────┐    ┌──────────────────┐    ┌────────────────────┐
│  Dashboard   │    │  Orchestrator    │    │   Workers          │
│  (React)     │◄──►│  API (Elysia)    │◄──►│   (BullMQ)         │
│  Shadcn-UI   │    │  PostgreSQL      │    │  Queue consumers   │
└──────────────┘    └────────┬─────────┘    └─────────┬──────────┘
                             │                        │
                             ▼                        ▼
                   ┌───────────────────────┐
                   │  OpenCode / OpenClaw  │
                   │  AI Coding Server     │
                   └───────────────────────┘

Features

  • Task lifecycle management — Create, queue, execute, monitor, cancel, and retry AI coding tasks
  • Real-time dashboard — SSE-powered live updates for task status, events, and stats
  • Task templates — Reusable prompts with optional cron scheduling and approval gates
  • Integrations — GitHub, Slack, Notion, Jira, Linear, Trello, Asana, and custom webhooks
  • GitHub webhooks — PR/issue labels trigger automatic task creation and execution
  • Stale task detection — Auto-fails tasks stuck beyond configurable timeouts
  • Analytics — Success rates, duration stats, per-trigger breakdowns, and time-series charts
  • Horizontal scaling — Stateless workers with BullMQ for distributed job processing

Tech Stack

Layer Technology
Runtime Bun
Monorepo Turborepo
Language TypeScript (strict)
API Elysia
Database PostgreSQL + TimescaleDB
ORM Drizzle
Queue BullMQ + Redis
Frontend React 19 + Vite + Shadcn/UI
Routing TanStack Router
State TanStack Query + Zustand
Testing Vitest
Linting oxlint

Prerequisites

Getting Started

  1. Clone the repository:

    git clone https://github.com/Sudigital/ClawCode.git
    cd clawcode
  2. Install dependencies:

    bun install
  3. Start infrastructure (PostgreSQL + Redis):

    docker compose up -d
  4. Configure environment:

    cp .env.example .env
    # Edit .env with your settings (see Configuration below)
  5. Run database migrations:

    cd packages/db
    bun run drizzle-kit push
    cd ../..
  6. Start the AI coding server (in a separate terminal):

    # Using OpenCode
    opencode serve
    
    # Or using OpenClaw
    openclaw serve
  7. Start all services:

    bun dev

    This starts the API, web dashboard, and worker concurrently via Turborepo.

Configuration

Copy .env.example to .env and configure:

Variable Description Default
DATABASE_URL PostgreSQL connection string postgresql://postgres:postgres@localhost:5432/clawcode
REDIS_URL Redis connection string redis://localhost:6379
OPENCODE_URL OpenCode/OpenClaw server URL http://localhost:4096
OPENCODE_SERVER_PASSWORD OpenCode/OpenClaw server password (empty)
API_PORT API server port 3001
API_KEY Bearer token for API auth (empty, auth skipped in dev)
JWT_SECRET Secret for JWT signing (must set in production)
GITHUB_WEBHOOK_SECRET GitHub webhook secret (optional)
GITHUB_TOKEN GitHub API token (optional)

Project Structure

apps/
  api/           Elysia REST API — task orchestration, webhooks, SSE events
  web/           React dashboard — task management, analytics, integrations
  worker/        BullMQ consumers — execute tasks via OpenCode/OpenClaw
packages/
  db/            Drizzle ORM schema, migrations, and database client
  logger/        Shared structured logging
  shared/        Shared TypeScript types, enums, and constants
  opencode-client/  OpenCode server API client
docs/            Architecture decisions and design documentation

Development

# Run all tests
bun test

# Lint
bun lint

# Format
bun format

# Type-check
bun check-types

Documentation

Contributing

See CONTRIBUTING.md for guidelines on how to contribute.

License

MIT

About

An open-source task orchestration platform for [OpenCode](https://opencode.ai) and [OpenClaw](https://openclaw.ai/). Create, queue, monitor, and manage AI-driven coding tasks through a web dashboard — powered by OpenCode or OpenClaw sessions under the hood.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages