@stationhold/cli
v0.4.0
Published
The `stationhold` command. It adds [Stationhold](https://stationhold.com) extensions and exercise kits to the repository you are in, in the format of the coding agent you use, then checks and diagnoses them.
Readme
@stationhold/cli
The stationhold command. It adds Stationhold extensions
and exercise kits to the repository you are in, in the format of the coding agent you
use, then checks and diagnoses them.
Run
npx @stationhold/cli@latest add verify --harness=claude-codeThis is a dry run: the command shows what it would write and writes nothing. Add
--write to write the files. --harness=<id> picks the coding agent; --all targets
every one.
To keep the command at hand:
npm install --global @stationhold/cli
stationhold --helpRequires Node.js 22 or later.
Commands
| Command | What it does |
|---|---|
| stationhold add <id> | Adds an extension, or an exercise from a local catalog |
| stationhold catalog | Lists the extensions the site serves, with their version and SHA-256 |
| stationhold init | Detects the coding agents in the repository and adds the exercise kits of a local catalog |
| stationhold verify [<exerciseId>] | Runs the checks of an installed exercise |
| stationhold doctor | Compares what is installed with the local catalog, offline |
| stationhold cost | Reads your local agent transcripts and prints what they consumed, in tokens |
| stationhold config [lang [fr\|en]] | Shows or sets the language of the messages |
Version 0.3.0 renamed catalogue to catalog and cout to cost. The old names
run nothing: they print the new command to type.
stationhold --help gives every option.
Some exercises need a value only you know, such as the commit a task started from.
Give it with --input <key>=<value>, once per input: init and add write it into
the kit files, and verify puts it in the check commands. When an input has no value,
verify does not run the command. It names the missing input, counts the check as
not verified, and exits with a non-zero code.
Proof code
Since 0.4.0, stationhold verify also checks the answers written in the header of
your deliverable (format, bounds, the relations between them), then ends with a proof
code, one block per exercise:
stationhold-preuve 1
exercice m01-regime-3-taches
version 1.1.0
outil cursor
source cli 0.4.0
date 2026-10-22T09:41:07Z
livrable sha256:…
critere v1 OK
critere v2 MANUEL
reponse taches OK
relation r1 OK
finIt holds the verdicts and the checksum of the deliverable, nothing else: no code, no
excerpt, no path. Paste it on the exercise page. The CLI sends nothing; you decide
what to paste. Without --yes, the commands do not run and their checks read
MANUEL. The stationhold/verifications/*.sh script of a kit prints the same block
with source sh and no answer lines: it does not check the answers.
verify exits with a non-zero code when a check fails or is not verified, or when an
answer or a relation is missing or refused. A check to assess by hand never makes it
fail.
Since 0.4.0, the verify --report file also carries the date, the source and the
verdicts of the answers and relations. Its empreinteLivrable is the checksum of the
normalised deliverable, as in the proof code, so it differs from 0.3.0 for a file with
Windows line endings. Its versionManifeste is the version of the manifest the checks
were judged against: the catalog's when there is one, the kit's otherwise.
Version 0.3.0 sets aside, as unreadable, a manifest that declares typed answers
(label, pattern, choice, relations). Run npx @stationhold/cli@latest to get
the current version.
Language
The messages are in English or French. The first stationhold init or
stationhold add you run in a terminal asks which one you want and saves the answer
in ~/.config/stationhold/config.json ($XDG_CONFIG_HOME when it is set, %APPDATA%
on Windows), for every repository on the machine. stationhold config lang <fr|en>
changes it. --lang=<fr|en> sets the language of one command and saves nothing. With
no setting, the CLI follows the system language (LC_ALL, LC_MESSAGES, LANG, then
the machine's regional settings), and otherwise uses English.
A kit holds the same text in every language. It tells your coding agent to answer in
the language you write to it in, and the exercises and extensions stay in French. Only
the lines written for you follow your language: the next steps after an install, and
the summary of stationhold/verifications/*.sh.
What it will not do
- Write in your repository without
--write, or overwrite your files: in a file that is yours, it only edits between its own markers. - Write outside the current repository, except its settings file, and only when you choose your language.
- Run downloaded code. An extension missing from your machine is downloaded from the
site over HTTPS, checked against the SHA-256 of the site's index, validated, and
written to
stationhold/extensions/as a readable file. Exercises are never downloaded. - Run a check command it has not shown you:
verifyruns nothing without--yes. Its filter refuses commands it recognises as dangerous, but it is not a sandbox: read the commands of a kit you did not write. - Send anything from your repository.
verify --reportwrites its report locally, and the proof code thatverifyprints goes nowhere unless you paste it.
License
MIT © 2026 Yeppao. See LICENSE.
