Skip to content

Setting Up ​

This walkthrough takes a fresh clone of the repository to a built store, the point every match starts from, and Matching a Game carries on from there with a game of your own. Each step below names the command it runs, and each output it quotes is written by mise run docs:render.

The Install Steps ​

Scotch runs from a clone of its repository, with mise installing the tools .mise/config.toml pins, the Python interpreter and uv among them. After installing mise, the commands below clone the repository, print the help of the scotch command, and report anything the clone still needs:

bash
git clone --filter=blob:none https://github.com/Jybbs/scotch.git
mise trust scotch
mise -C scotch install
cd scotch
scotch --help
mise doctor project

Each line does what the list below sets out, written from the package's own metadata by mise run docs:render:

  1. git clone --filter=blob:none https://github.com/Jybbs/scotch.git clones the repository, leaving out every earlier layout of the game store the history keeps, which git downloads only where a checkout reaches it
  2. mise trust scotch marks the clone's .mise/config.toml trusted, so mise loads it rather than prompting, skipping the file, or failing with an untrusted-config error
  3. mise -C scotch install installs each tool .mise/config.toml pins, the Python interpreter, uv, and the Rust toolchain among them
  4. cd scotch enters the clone, where mise puts uv and the wrapper at .mise/bin/scotch on the path
  5. scotch --help builds .venv from uv.lock on the wrapper's first run, compiling the crate under rust/, then prints the command's help
  6. mise doctor project runs each check .mise/config.toml declares and prints the step that clears any that fails

Checking the Clone ​

mise doctor project runs each check the [doctor.checks] tables of .mise/config.toml declare, printing PASS or FAIL beside the check's name and condition, and beneath a failing check the step that clears it, then exits with status 1 where any check fails, as mise's project diagnostics set out. The site-packages and tests-link checks fail until mise run site:install installs the site's packages, which only a contributor to the site needs. The table below is written from those tables by mise run docs:render.

CheckPasses WherePrints Where It Fails
bun-lockdocs/bun.lock matches docs/package.jsonmise relock
cargo-lockrust/Cargo.lock matches rust/Cargo.tomlmise relock
mise-lock.mise/mise.lock matches .mise/config.tomlmise relock
script-locksEach task script's lockfile matches the script's inline metadatamise relock
site-packagesdocs/node_modules existsmise run site:install
tests-linktests/node_modules links to docs/node_modulesmise run site:install
uv-lockuv.lock matches pyproject.tomlmise relock
venv.venv exists and runs on the Python interpreter mise pinsmise x -- uv venv --clear .venv && mise x -- uv sync

Building the Store ​

A fresh clone holds no games, so two tasks build the store under .cache/data, which git leaves untracked. mise run data:fetch runs scotch fetch games, downloading each file src/scotch/sources/sources.toml declares, and mise run data:index runs scotch index games, reading every game of those files into the index a match reads. The downloads take 1.1 GB on disk and the index 459.9 MB, each measured under the data directory by mise run docs:render, and The Store sets out what each task writes there.

A Step That Stops ​

Each command stops with a message on stderr and a nonzero exit where the clone or the store is not ready for it, such as scotch index games before any file is fetched or scotch match game before the index is built. The Commands sets out every message each command exits on and the step that clears it, under scotch fetch games, scotch index games, and scotch match game.

With the index built, Matching a Game matches a game of your own against it.

Built from22ebd11
CodeJybbs/scotch
GamesPGN Mentor
Crateshakmaty, GPL
FacesSIL OFL 1.1
PiecesCburnett, BSD

Scotch 0.2.0, under the GPL-3.0-or-later.