CLI tool for managing chess engine rating lists using round-robin tournaments via fastchess and Elo calculation via ordo.
  • TypeScript 100%
Find a file
Jay Honnold 873929708c
docs: add README, update CLAUDE.md and tech spec
- Add README.md with usage guide, prerequisites, and development info
- Update CLAUDE.md to include calibration.ts and integration tests
- Rename tech-spec.md to mvp-tech-spec.md and fix discrepancies:
  - Execution model: non-blocking CLI (only `run` blocks)
  - Add concurrency support and TC scaling to pipeline
  - Add `rate` command and `--concurrency` flag to CLI section
  - Remove invalid FAILED state from matchup state machine
  - Add ratings.txt to snapshot file layout
2026-03-15 17:31:12 -07:00
docs docs: add README, update CLAUDE.md and tech spec 2026-03-15 17:31:12 -07:00
src feat: add --concurrency flag to run command 2026-03-15 16:58:25 -07:00
tests feat: add --concurrency flag to run command 2026-03-15 16:58:25 -07:00
.gitignore fix: set cwd for fastchess spawn to avoid config.json in user's working directory 2026-03-15 13:07:36 -07:00
CLAUDE.md docs: add README, update CLAUDE.md and tech spec 2026-03-15 17:31:12 -07:00
package-lock.json feat: implement openelo MVP CLI 2026-03-15 11:30:40 -07:00
package.json feat: implement openelo MVP CLI 2026-03-15 11:30:40 -07:00
README.md docs: add README, update CLAUDE.md and tech spec 2026-03-15 17:31:12 -07:00
tsconfig.json feat: implement openelo MVP CLI 2026-03-15 11:30:40 -07:00
tsup.config.ts feat: implement openelo MVP CLI 2026-03-15 11:30:40 -07:00
vitest.config.ts feat: implement openelo MVP CLI 2026-03-15 11:30:40 -07:00

openelo

CLI tool for managing chess engine rating lists. Register engines, configure rating lists, and automatically run round-robin tournaments using fastchess with Elo ratings calculated by ordo.

Prerequisites

Installation

git clone https://github.com/jhonnold/openelo.git
cd openelo
npm install
npm run build
npm link   # makes `openelo` available globally

How It Works

openelo manages a pipeline from engine registration through to Elo ratings:

  1. Engines — Register chess engine binaries with version labels
  2. Rating Lists — Create lists that define tournament parameters (time control, variant, opening book, adjudication)
  3. Enrollment — Add engines to a list; openelo generates all round-robin matchups automatically
  4. Executionopenelo run feeds matchups to fastchess in batches, collecting PGN results
  5. Ratings — After games complete, ordo calculates Elo ratings and produces snapshots

All state lives in ~/.openelo/ — a SQLite database, PGN files, and rating snapshots.

Usage

Setup

Initialize the workspace (creates ~/.openelo/ with database and directories):

openelo init

Register an engine with a version label:

openelo engine add stockfish /usr/bin/stockfish --version 17
openelo engine add lc0 /usr/bin/lc0 --version 0.31 --uci WeightsFile=/path/to/weights.pb

Adding a new version to an existing engine automatically triggers version replacement on all lists where it's enrolled:

openelo engine add stockfish /usr/bin/stockfish-new --version 18

Create a rating list (interactive prompts for variant, time control, opening book, adjudication):

openelo list create bullet-list

Other management commands:

Command Description
openelo engine list List all registered engines
openelo engine versions <name> Show all versions of an engine
openelo engine remove <name> Remove an engine (blocked if enrolled)
openelo list show <name> Show list config, enrollments, progress
openelo list remove <name> Soft-delete a list (data preserved on disk)

Running

Enroll engines in a list to generate round-robin matchups:

openelo enroll stockfish bullet-list
openelo enroll lc0 bullet-list

Run all pending batches (blocks until complete, handles SIGINT gracefully):

openelo run                      # all lists
openelo run bullet-list          # specific list
openelo run --concurrency 16     # limit system threads for engine concurrency

Remove an engine from a list (supersedes its matchups and re-rates):

openelo drop lc0 bullet-list

Check progress:

openelo status              # all lists
openelo status bullet-list  # specific list

Results

Force a rating calculation (normally happens automatically after run):

openelo rate bullet-list

View the latest ratings:

openelo ratings bullet-list

View historical snapshots:

openelo history bullet-list

Export PGNs, ratings CSV, and cross-table:

openelo export bullet-list

Development

npm run build       # Build with tsup -> dist/index.js
npm run dev         # Run via tsx (dev mode)
npm test            # Run all tests (vitest)
npm run test:watch  # Watch mode

Project Structure

src/
  index.ts          # Entry point
  cli.ts            # Commander setup, all command definitions
  db.ts             # SQLite connection, schema init
  types.ts          # Shared TypeScript interfaces
  workspace.ts      # File path utilities, directory creation
  lock.ts           # Mutual exclusion lock file
  engine.ts         # Engine CRUD operations
  list.ts           # Rating list CRUD operations
  enrollment.ts     # Enroll/drop + version replacement logic
  scheduler.ts      # Matchup + batch generation (round-robin)
  executor.ts       # Fastchess batch execution, PGN consolidation
  calibration.ts    # NPS benchmarking, TC scaling under concurrency
  rater.ts          # Ordo integration, snapshot management
  recovery.ts       # Crash recovery (RUNNING -> PENDING)
  runner.ts         # Execution loop, graceful shutdown, SIGINT
tests/              # One test file per module + integration tests