Sign inSign up

jbcom/control-center

By jbcom

Updated 4 months ago

Image
0

7.7K

jbcom/control-center repository overview

Control Center

Enterprise AI orchestration for the jbcom ecosystem.

Go CI Go Reference License: MIT

Overview

Control Center is a unified CLI tool for managing AI agents, repository synchronization, and enterprise workflows across the jbcom ecosystem. It provides native integrations with:

  • Ollama (GLM 4.6 Cloud) - Fast code review and analysis
  • Google Jules - Multi-file refactoring with auto-PR creation
  • Cursor Cloud Agent - Long-running autonomous tasks

Installation

Go Install
go install github.com/jbcom/control-center/cmd/control-center@latest
Docker
docker pull jbcom/control-center:latest
Binary

Download from Releases.

Commands

Gardener

Enterprise-level cascade orchestrator. Discovers organizations, auto-heals control centers, processes backlog, and cascades instructions.

# Run for all organizations
control-center gardener --target all

# Run for specific organization
control-center gardener --target extended-data-library

# Dry run
control-center gardener --target all --dry-run
Curator

Nightly triage of issues and PRs. Analyzes and routes to appropriate AI agents.

# Curate a specific repository
control-center curator --repo jbcom/control-center

# Dry run
control-center curator --repo jbcom/control-center --dry-run
Reviewer

AI-powered code review using Ollama.

# Review a specific PR
control-center reviewer --repo jbcom/control-center --pr 123

# With debug output
control-center reviewer --repo jbcom/control-center --pr 123 --log-level debug
Fixer

Automated CI failure resolution.

# Analyze and suggest fix for a PR
control-center fixer --repo jbcom/control-center --pr 123

# Analyze a specific workflow run
control-center fixer --repo jbcom/control-center --run-id 12345678

GitHub Action

Control Center is distributed as a Docker-based GitHub Action. All actions pull the Docker image from Docker Hub at runtime.

Basic Usage

Use Control Center in your workflows:

- uses: jbcom/control-center@v1
  with:
    command: reviewer
    repo: ${{ github.repository }}
    pr: ${{ github.event.pull_request.number }}
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}
Specific Command Actions

Or use specific command actions for simpler interface:

# AI Code Review
- uses: jbcom/control-center/actions/reviewer@v1
  with:
    repo: ${{ github.repository }}
    pr: ${{ github.event.pull_request.number }}
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}

# CI Failure Analysis
- uses: jbcom/control-center/actions/fixer@v1
  with:
    repo: ${{ github.repository }}
    run_id: ${{ github.run_id }}
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}

# Nightly Triage
- uses: jbcom/control-center/actions/curator@v1
  with:
    repo: ${{ github.repository }}
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    GOOGLE_JULES_API_KEY: ${{ secrets.GOOGLE_JULES_API_KEY }}
    CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
Direct Docker Usage

You can also run Control Center directly via Docker:

# Pull the image
docker pull jbcom/control-center:latest

# Run a command
docker run --rm \
  -e GITHUB_TOKEN="$GITHUB_TOKEN" \
  -e OLLAMA_API_KEY="$OLLAMA_API_KEY" \
  jbcom/control-center:latest \
  reviewer --repo owner/repo --pr 123
Version Pinning

Recommended: Use floating major version tags for automatic updates:

- uses: jbcom/control-center@v1  # Latest v1.x.x

Stable: Pin to minor version for controlled updates:

- uses: jbcom/[email protected]  # Latest v1.1.x

Locked: Use exact version for reproducibility:

- uses: jbcom/[email protected]  # Exact version
Inputs
InputDescriptionRequiredDefault
commandCommand: gardener, curator, reviewer, fixerYes-
repoTarget repository (owner/name)No-
prPull request numberNo-
targetTarget for gardenerNoall
dry_runRun without making changesNofalse
log_levelLog level: debug, info, warn, errorNoinfo

Configuration

Environment Variables
VariableDescription
GITHUB_TOKENGitHub token for API access
CI_GITHUB_TOKENAlternative GitHub token (CI workflows)
OLLAMA_API_KEYOllama Cloud API key
GOOGLE_JULES_API_KEYGoogle Jules API key
CURSOR_API_KEYCursor Cloud Agent API key
Config File

Control Center looks for configuration in:

  • --config flag
  • $HOME/.control-center.yaml
  • ./.control-center.yaml
  • /etc/control-center/config.yaml

Example:

log:
  level: info
  format: text

gardener:
  target: all
  decompose: false
  backlog: true

curator:
  repo: jbcom/control-center

Architecture

control-center/
├── cmd/control-center/     # CLI entrypoint
│   └── cmd/                # Cobra commands
│       ├── root.go
│       ├── gardener.go
│       ├── curator.go
│       ├── reviewer.go
│       ├── fixer.go
│       └── version.go
├── pkg/
│   ├── clients/            # API clients
│   │   ├── ollama/         # Ollama GLM 4.6
│   │   ├── jules/          # Google Jules
│   │   ├── cursor/         # Cursor Cloud Agent
│   │   └── github/         # GitHub API + gh CLI
│   ├── config/             # Configuration
│   └── orchestrator/       # Orchestration logic
├── Dockerfile
├── action.yml              # GitHub Action
├── .goreleaser.yml         # Release config
└── .golangci.yml           # Linter config

Task Routing

The Curator automatically routes tasks to the appropriate AI agent:

Task TypeAgentReason
Quick fix (<5 lines)OllamaFast, inline
Multi-file refactorJulesAsync, AUTO_CREATE_PR
Complex debuggingCursorFull IDE context
DocumentationJulesFull file context
Ambiguous/sensitiveHumanRequires judgment

Development

Prerequisites
  • Go 1.23+
  • Docker (optional)
  • gh CLI (for GitHub operations)
Build
go build -o control-center ./cmd/control-center
Test
go test -v ./...
Lint
golangci-lint run
Release

Releases are automated via GoReleaser on tag push:

git tag v1.0.0
git push origin v1.0.0

License

MIT License - see LICENSE for details.


Built with ❤️ by the jbcom ecosystem

Tag summary

Content type

Image

Digest

sha256:40846e1ce

Size

32 MB

Last updated

4 months ago

docker pull jbcom/control-center