Skip to main content
cli-gamesWiki

Automating Games at CLI-Games

Find the scriptable games, edit their durable Bash workspaces, run starter policies, compare results, and understand what current receipts and server proof mean.

guidesLast updated 2026-08-27

Automating Games at CLI-Games

Selected CLI-Games titles expose an automation tier alongside ordinary play. Each tier supplies a durable workspace, a README, an editable Bash starter, game-specific sensors and actions, and measured output from completed runs.

Automation tiers are optional and unranked. They do not replace ordinary play or enter its leaderboards.

ShiftSum, Tenfold, Radix, P-Squash and Blockfall have no separate scripting tier. Each of these is one game, and scripts drive that same game from the terminal: script shows the scripting reference, nano live-helper.sh edits the starter in the game's home directory, and ./live-helper.sh & runs it beside your own play.

Find the scriptable games

On the website, open the Automate catalog view.

Inside the terminal, run:

games automate

The games automate command listing games with public scripting and policy workspaces The terminal command and web catalog expose the same shipped automation registry.

Both surfaces read the shipped game definitions. A game appears there only when its current public definition names an automation workspace.

Games with a separate automation tier, such as Minesweeper and Solitaire, open it with:

GAME --script

Termiclanker and Mandate are exceptions: automation is the game rather than an optional side mode, so start them with termiclanker and mandate. So are the live-workspace games above: start the game itself.

Workspaces covered in this guide

GameLaunchWorkspaceStarterAccessEvidence / server proof
ShiftSumshiftsum~/shiftsumlive-helper.shOpenLocal practice only
Tenfoldtenfold~/tenfoldlive-helper.shOpenLocal practice only
Radixradix~/radixlive-helper.shOpenLocal practice only
Solitairesolitaire --script~/solitairepolicy.shOpenFive-fixture Reveal Policy Pack
Minesweeperminesweeper --script~/minesweepersweep.shOpenNot currently available
P-Squashp-squash~/p-squashlive-helper.shOpenLocal practice only
Blockfallblockfall~/blockfalllive-helper.shOpenLocal practice only
Lamplightlamplight~/lamplighthelper.shOpenLocal practice only
Paydirtpaydirt~/paydirthelper.shOpenLocal practice only
Stencilstencil, then Open or Daily~/stencilhelper.shOpenDaily results played with a helper are unranked
Fuseboxfusebox, then Solo rounds~/fuseboxhelper.shOpenSolo play only
Mustermuster, then Solo battles~/musterhelper.shOpenSolo play only
Knockaboutknockabout, then Solo rounds~/knockabouthelper.shOpenSolo play only
Sidepocketsidepocket, then Solo frames~/sidepockethelper.shOpenSolo play only
Cratercrater, then Solo duels~/craterhelper.shOpenSolo play only
Termiclankertermiclanker~/klnkfactory/field-kit.shOpenUses its own factory/base evidence systems
Mandatemandate~/mandatedoctrine/level-1.shOpenLevel 11 local replay verification and after-action record

P-Squash and Blockfall need no key to script. A registered player earns the shebang key after successfully running any saved executable from their home workspace. Completing and running Minesweeper's supplied sweep.sh is one direct route. The open scripting tiers remain available for guest practice, but awarding a persistent key requires an account.

This table is a maintained guide, not the registry. The web catalog and games automate command remain the current authority as scripting labs are added or changed.

Use a workspace

Open a listed game, then begin with the files it supplies:

pwd
ls
cat README.txt
nano STARTER.sh
chmod +x STARTER.sh
./STARTER.sh

A Minesweeper scripting workspace showing its persistent path, README.txt, and supplied sweep.sh starter A scripting tier starts with files you can inspect, edit, and run in place.

Use the starter filename from the table. vim and vi are also available.

The workspace preparation step creates missing supplied files but preserves files the player has already edited. In a separate scripting tier an executable run resets the selected game fixture or board; it does not replace the script on disk. In the live-workspace games a helper plays the board you are on and resets nothing.

Read that game's README.txt before treating the general pattern here as an API contract. Sensors, actions, coordinates, exit statuses, reset behavior, fixture selection, limits, and success conditions belong to the game.

What should I script?

Start by replacing one weak or unfinished decision in the supplied file. The starter is intentionally close enough to running that the first useful change can remain small.

WorkspaceFirst useful question
Minesweeper Sweep ScriptCan the starter name all four corners using LAST_ROW and LAST_COL rather than one board size?
ShiftSum live helperCan observe lanes and observe target choose which row to select and which way to shift it?
Tenfold live helperCan the grid shape and the placements legal lists beat placing each piece wherever it first fits?
Radix live helperCan the script read observe tubes and choose which tube to lift and where to pour it?
Solitaire Reveal PolicyCan visible legal moves reduce work across both draw-one and draw-three fixtures?
P-Squash live helperCan observe player and observe daemons replace a fixed directional preference?
Blockfall live helperCan observe board and observe active choose when to shift, turn and drop each piece?
Termiclanker Factory WorkbenchCan small robot actions become reusable functions and policies across later systems?
Mandate Doctrine WorkbenchCan a durable policy act on delayed reports while preserving room for a manual countermand?

Run the supplied file once before optimizing it. That establishes the current behavior and shows whether the next edit improved the same case or merely changed it.

Read sensors and exit status

Automation sensors generally provide machine-readable text, conventional exit status, or both. That allows normal shell composition:

if exact; then
  commit
fi

choice=$(legal | head -n 1)
[ -n "$choice" ] || exit 1

The exact commands above illustrate the pattern; they are not universal game commands. Use the current workspace README, or script in a live-workspace game, for accepted arguments.

Common shell tools include variables, tests, loops, functions, pipelines, redirection, and supported text tools such as grep, cut, sed, awk, head, tail, wc, and jq. A bounded game host may still reject unsupported Linux behavior. Treat its errors and README as the authority for that runtime.

Compare a completed run

Completed automation runs report game-specific metrics plus shared measures such as source bytes and semantic operations. Applicable workspaces compare a clear with saved account bests and render a histogram. The live-workspace games (ShiftSum, Tenfold, Radix, P-Squash and Blockfall) do not compare or export runs.

A completed Minesweeper run with its outcome, source bytes, semantic operations, moves, and comparison histogram The result makes both the outcome and the cost of the script visible.

The metric direction is printed with the result. Do not assume that every number is a score or that higher is always better. For example, a packing policy may prefer a smaller final footprint while another game measures moves, shifts, ticks, hops, or released loads.

These comparisons are practice feedback. They are not a global leaderboard.

Export a GIF or local receipt

After a completed run, use the commands named by the workspace:

gif
receipt

gif exports a replay-backed visual trace with a small source window so the result can be understood outside the live terminal.

An animated Minesweeper source trace replaying the scripted corner reveals and the mine that ended the run The exported GIF pairs the changing board with the source line responsible for each action.

receipt exports JSON identifying the game, mode, ruleset, engine, scenario, script digest, timing, outcome, operations, metrics, and replay digest. It is portable inspection evidence, but its evidence block deliberately says:

verification: local
competitiveEligible: false
scope: practice

The terminal summarizes the same boundary as “Locally observed · unranked · not server verified.”

Request server proof

Solitaire currently exposes a prove command after a completed policy-lab fixture:

prove

Proof requires a registered account. The server receives the submitted policy source, checks it against the pinned pack identity, and replays it twice across five fixed fixtures under bounded limits. A successful request stores the proof receipt and returns a public share path. The source itself is processed transiently and is not retained.

A successful server proof, captured from a policy lab, showing the verified five-fixture pack, proof ID, player, and public share path Server proof means the pinned pack was replayed reproducibly; it is not an automation rank.

The receipt records the player, source digest and byte count, pack and engine identity, limits, per-fixture outcomes and metrics, and the exact-match replay result.

Server proof demonstrates that the submitted source completed that versioned pack reproducibly. It does not currently assign a public automation rank.

How ranking works

It does not currently apply to automation tiers.

  • Standard game runs keep their existing manual ranking rules.
  • Script-mode results set competitive eligibility to false.
  • Local histograms compare practice measurements and account bests.
  • Local receipts are inspectable but not server authority.
  • One server proof pack, Solitaire's, issues stronger shareable evidence.
  • There is no global proof-pack leaderboard yet.

This separation prevents an automated run from changing the meaning of an ordinary manual score while leaving room for a future competition designed specifically around versioned policies.

Minesweeper coordinate example

Minesweeper keeps the same row-column grammar in direct and scripted play:

r ROW COL
f ROW COL

Its starter exports ROWS, COLS, LAST_ROW, and LAST_COL. The first reveal is guaranteed safe because mines are placed afterward. Other hidden cells have the same mine probability; a corner has fewer neighboring cells but is not itself safer.

The supplied file begins with:

r 0 0

# TODO: reveal the top-right corner with LAST_COL
# TODO: reveal the bottom-left corner with LAST_ROW
# TODO: reveal the bottom-right corner with LAST_ROW and LAST_COL

The supplied Minesweeper sweep.sh starter open in nano with one working command and three corner stubs Replace the three stubs with commands that use the supplied boundary variables.

Complete the three commands, remove the TODO markers, make the file executable, and run it. That is a starter exercise in packaging repeated coordinates, not a claim that four corners solve or optimize the game.

Troubleshoot a script

  • The file will not run: inspect it with ls -l, add execute permission with chmod +x FILE, and invoke it as ./FILE.
  • The editor opened the wrong path: return to the supplied workspace and use the starter filename shown by README.txt.
  • A policy loops forever: add a status condition, inspect exit codes, and remember that automation hosts impose an operation bound.
  • A command works in another game: sensors and actions are scoped to the active game; check this workspace's README.
  • A run changed but the histogram did not improve: confirm the run reached the same completion condition and read the printed metric direction.
  • prove is absent: only Solitaire's fixed policy pack currently offers server proof.
  • prove asks for registration: local practice remains available, but durable public server proof must be attributable to an account.

See also

Keep the keyboard reference nearby

The terminal workspace cheat sheet covers script paths, foreground/background jobs, editor keys, window names and minimizing. Type wiki terminal-workspace-cheat-sheet to open it in a new tab without leaving your game. Ctrl+B, then ? shows the window keys in place.