Skip to content

sbuysse/claude-gnome-command-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command & Control

A self-hosted job scheduler that runs Claude Code on a cron schedule and displays results in a real-time web dashboard. Define prompts, set schedules, review outputs, and send follow-up instructions -- all from a single interface.

Features

  • Scheduled jobs -- Run Claude Code prompts on any cron schedule (every 5 minutes, daily, weekdays, monthly, etc.)
  • Real-time streaming -- Watch job output live via WebSocket as Claude works
  • Follow-ups -- Send follow-up prompts to completed results, maintaining context
  • Suggested actions -- Claude proposes next steps; click to execute them instantly
  • Visual cron builder -- Simple mode with frequency/time/day pickers, or raw cron for power users
  • Dashboard -- Dark-themed SPA with job management, result history, and live execution viewer
  • systemd integration -- Runs as a user service with automatic restart
  • File-based storage -- JSON persistence with no database required
  • Automatic cleanup -- Old results purged based on configurable retention

Architecture

backend/
  server.js              # Fastify entry point (REST + WebSocket + static files)
  services/
    executor.js          # Spawns Claude CLI, parses output, manages concurrency queue
    scheduler.js         # Wraps node-cron for job registration and lifecycle
    store.js             # File-based JSON persistence with atomic writes and locking
  routes/
    jobs.js              # CRUD for jobs
    results.js           # Result listing, detail, and follow-up execution
    status.js            # Summary endpoint (for external integrations)
    ws.js                # WebSocket broadcast manager
dashboard/
  index.html             # SPA shell with dialogs
  app.js                 # Client-side routing, API client, cron builder, rendering
  style.css              # Mission-control themed design system
data/
  config.json            # Runtime configuration
  jobs.json              # Job definitions
  results/               # Per-job result files

Prerequisites

  • Node.js >= 18
  • Claude Code CLI installed and authenticated (claude must be available in PATH)

Installation

git clone https://github.com/sbuysse/claude-gnome-command-control.git
cd claude-gnome-command-control
./install.sh

The install script will:

  1. Install backend dependencies (npm install)
  2. Initialize the data/ directory with default config
  3. Install and start the systemd user service
  4. The dashboard is accessible at http://127.0.0.1:7777

Manual start (without systemd)

cd backend
npm install
npm start

Configuration

Edit data/config.json:

Key Default Description
port 7777 HTTP server port
maxConcurrent 2 Max parallel Claude executions
retentionDays 30 Days to keep result history
defaultTimeout 300000 Per-job timeout in ms (5 min)

API

All endpoints are served from http://127.0.0.1:7777.

Method Path Description
GET /api/jobs List all jobs
POST /api/jobs Create a job
PUT /api/jobs/:id Update a job
DELETE /api/jobs/:id Delete a job
POST /api/jobs/:id/run Trigger immediate execution
GET /api/jobs/:id/results List results for a job
GET /api/jobs/:id/results/:rid Get a single result
POST /api/jobs/:id/results/:rid/followup Send a follow-up prompt
GET /api/status Summary for external integrations
WS /ws Real-time event stream

Service management

# Status
systemctl --user status command-control

# Logs
journalctl --user -u command-control -f

# Restart
systemctl --user restart command-control

# Stop
systemctl --user stop command-control

License

MIT

About

Self-hosted job scheduler that runs Claude Code on a cron schedule with a real-time web dashboard

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors