Skip to content

CLI Commands ​

CheckAI is one binary with eleven commands. Running it with no arguments prints an animated welcome screen listing them all.

CommandWhat it does
serveREST + WebSocket API server with Swagger UI and web UI
playPlay in the terminal, against the engine or a human
watchWatch the engine play itself
analyzeAnnotate a position, a move list or a PGN file
evalInspect the evaluation, ranked moves, book and tablebase
benchFixed twelve-position benchmark suite
perftVerify move generation against known node counts
uciSpeak UCI on stdin/stdout for chess GUIs
exportExport archived games as text, PGN or JSON
updateUpdate to the latest release from GitHub
versionPrint the current version

Global options ​

FlagDescription
--lang <LANG>Override locale (e.g. de, fr, zh-CN)
--no-colorDisable colour (the NO_COLOR env var works too)
--helpPrint help information
--versionPrint version information

The language is auto-detected from:

  1. --lang CLI flag
  2. CHECKAI_LANG environment variable
  3. System locale
  4. Fallback: English

Engine options ​

Every command that runs a search — play, watch, analyze, eval, bench — accepts the same engine option group:

FlagDescriptionDefault
--threads <N>Lazy SMP search threads; 0 = one per CPU core1
--hash <MB>Transposition table sizeper command
--nodes <N>Node budget per searchunlimited
--multipv <N>Report the best N lines (1–16)1
--book <FILE>Polyglot opening book (.bin)none
--book-bestAlways play the most popular book move instead of samplingoff
--tablebase <D>Syzygy tablebase directorynone

See The Search Engine for what these actually do.

checkai serve ​

Start the REST API server with WebSocket support, Swagger UI and the embedded web UI.

bash
checkai serve [OPTIONS]
OptionDefaultDescription
-p, --port <PORT>8080Port to listen on
--host <HOST>0.0.0.0Host address to bind to
--data-dir <DIR>dataDirectory for game storage
--book-path <PATH>—Path to Polyglot opening book (.bin)
--tablebase-path <PATH>—Path to Syzygy tablebase directory
--analysis-depth <DEPTH>30Minimum search depth for game analysis (≥ 30)
--tt-size-mb <SIZE>64Transposition table size in MB
--analysis-max-jobs <N>256Maximum number of analysis jobs kept in memory
--analysis-max-concurrent-jobs <N>4Maximum analysis jobs to run in parallel
--analysis-completed-ttl-secs <SECS>3600Time-to-live for completed analysis jobs
--analysis-position-max-threads <N>4Search threads one live position analysis may use
--analysis-position-max-movetime-ms <MS>10000Longest time budget for one live position analysis
--analysis-max-concurrent-positions <N>4Live position analyses allowed to run at the same time
bash
checkai serve                                          # default
checkai serve --port 3000 --lang de                    # custom port, German
checkai serve --book-path book.bin --tablebase-path tb/ # with knowledge

checkai play ​

Play in the terminal. By default you take White against the engine at level 5.

bash
checkai play [OPTIONS]
OptionDefaultDescription
--vs <WHO>engineengine or human (two players share the terminal)
--color <SIDE>whitewhite, black or random
--level <1-10>5Engine difficulty
--movetime <MS>ladderOverride thinking time per move
--depth <N>ladderOverride maximum search depth
--time <SPEC>—Time control, e.g. 5+3, 90+30, 30s
--fen <FEN>startposStart from a custom position
--pgn <FILE>—Resume a game from a PGN file
--board <THEME>woodwood, ice, club, mono or ascii
--asciioffASCII piece letters instead of Unicode glyphs
--flipoffRender from Black's perspective
--no-animationoffDisable the move animation
bash
checkai play --level 9                    # a much stronger opponent
checkai play --time 5+3                   # five minutes plus 3s increment
checkai play --color black --board ice    # play Black on a blue board
checkai play --book book.bin --threads 4  # give the engine book and cores
checkai play --pgn game.pgn               # continue a saved game

In-game commands ​

Moves are accepted in coordinate notation (e2e4, e7e8q) or standard algebraic notation (e4, Nf3, exd5, O-O, Qh4#).

CommandAliasDescription
movesmList all legal moves in SAN
boardbRedraw the board
flipFlip the board orientation
historyhistNumbered move history
fenfPrint the current FEN
pgnPrint the game as PGN
jsonjPrint the game state as JSON
hintiAsk the engine for a suggestion
analyzeaDeeper multi-line analysis
evaleStatic evaluation breakdown
bookOpening-book moves for this position
tbEndgame tablebase verdict
undouTake back the last full move
redoReplay a move that was taken back
level NlChange the engine level mid-game
save [file]sSave the game as PGN
load <file>oLoad a game from PGN
newStart a fresh game
resignrResign
drawdClaim a draw when eligible
helphShow the command table
quitqLeave the session

Difficulty levels ​

LevelMax depthMove timeHashSkillFeels like
1260 ms4 MB2absolute beginner
23120 ms8 MB5casual club player
34250 ms16 MB8improving amateur
46500 ms32 MB11solid club player
5101000 ms64 MB14strong club player
6142000 ms64 MB17expert
7full3000 ms128 MBfullmaster
8full5000 ms128 MBfullstrong master
9full7500 ms256 MBfullvery strong
10full10000 ms256 MBfullfull strength

checkai watch ​

Watch two engine instances play each other.

bash
checkai watch [OPTIONS]
OptionDefaultDescription
--level <1-10>—Same level for both sides
--level-white <1-10>5Level for White
--level-black <1-10>5Level for Black
--movetime <MS>ladderThinking time per move
--time <SPEC>—Play the whole game on a clock, e.g. 3+2
--fen <FEN>startposStart from a custom position
--max-moves <N>200Stop after this many full moves
--adjudicate <CP>0End the game once one side is this far ahead
--delay <MS>800Pause between moves
--pgn-out <FILE>—Write the finished game as PGN
--quietoffOnly print the move ticker
--board <THEME>woodBoard colour palette
bash
checkai watch --level-white 9 --level-black 3     # an uneven match
checkai watch --time 1+0 --delay 0                # bullet, no pauses
checkai watch --adjudicate 900 --pgn-out game.pgn # stop early, save the game

checkai analyze ​

Annotate a position, a move list or a whole PGN file.

bash
checkai analyze [OPTIONS]
OptionDescription
--fen <FEN>Position to analyse (or the start position for a game)
--moves <LIST>Space-separated moves, coordinate or SAN
--pgn <FILE>PGN file to import and annotate
--depth <N>Fixed search depth
--movetime <MS>Time budget (per move in game mode)

Plus the shared engine options; --multipv <N> reports the best N lines in position mode.

bash
checkai analyze --fen "<FEN>" --multipv 4     # the four best lines
checkai analyze --pgn game.pgn                # annotate a whole game
checkai analyze --moves "e4 e5 Nf3 Nc6 Bb5"   # annotate a move list

Game analysis reports, per move: the evaluation after it, its centipawn loss, a !/?!/?/?? marker, a quality class and the better alternative when one exists. It closes with per-side accuracy and an evaluation curve.

checkai eval ​

Inspect what the engine thinks about a position: the static evaluation, the material balance, a ranked move list, the search statistics, the opening-book entries and the tablebase verdict.

bash
checkai eval --fen "<FEN>" [--depth N] [--top N]
bash
checkai eval                                  # the starting position
checkai eval --fen "<FEN>" --top 20 --depth 10
checkai eval --fen "<FEN>" --book book.bin    # include book statistics

checkai bench ​

Run the fixed twelve-position benchmark suite.

bash
checkai bench [--depth N | --movetime MS] [--threads N] [--hash MB]

Single-threaded runs print a bench signature — the total node count over the suite. That number is deterministic, so comparing it between builds shows whether a change altered the search. Threaded runs are non-deterministic and should be compared on time instead.

checkai perft ​

Count the leaf nodes of the legal-move tree and compare against the published reference values.

bash
checkai perft [DEPTH] [--fen FEN] [--divide] [--threads N]
bash
checkai perft            # startpos, depths 1-5, verified
checkai perft 6 --threads 0   # depth 6 on every core
checkai perft 4 --divide      # per-root-move subtotals

checkai uci ​

Speak the Universal Chess Interface on stdin/stdout, so CheckAI can be used from any chess GUI or match runner (cutechess-cli, fastchess, Arena, …).

bash
checkai uci

Supported options ​

OptionTypeEffect
HashspinTransposition table size in MB (1–4096)
ThreadsspinLazy SMP search threads (1–64)
MultiPVspinNumber of principal variations (1–16)
Move OverheadspinLatency subtracted from every budget
PondercheckAdvertises pondering support
OwnBookcheckUse the configured opening book
BookFilestringPath to a Polyglot .bin book
SyzygyPathstringPath to a Syzygy tablebase directory
UCI_LimitStrengthcheckEnable artificial strength limiting
UCI_ElospinTarget strength, 800–2850
Skill LevelspinDirect 0–20 skill limit
Clear HashbuttonDrop all learned tables

Supported commands ​

uci, isready, setoption, ucinewgame, position, go, ponderhit, stop, quit, plus the conventional d (print board) and eval (static evaluation) debug commands.

go accepts depth, movetime, nodes, mate, searchmoves, wtime, btime, winc, binc, movestogo, ponder and infinite.

text
$ checkai uci
uci
setoption name Threads value 4
setoption name MultiPV value 3
position startpos moves e2e4 e7e5
go movetime 1000

checkai export ​

Export archived games.

bash
checkai export [--list | --all | --game-id UUID] [--format text|pgn|json] [-o FILE]
bash
checkai export --list                    # list archived games
checkai export --all --format pgn -o games.pgn
checkai export --game-id <UUID> --format json

checkai update ​

Download and install the latest release from GitHub, verifying the published SHA-256 checksum before replacing the running binary.

bash
checkai update

Released under the MIT License.