@stamhoofd/cli
v2.160.0
Published
Readme
Stamhoofd CLI
stam is the development CLI for this repository. It manages local setup, shared services, app processes, development configuration, database helpers, SSO helpers, tests, and cleanup.
Quick Start
source .development/install-node.sh
pnpm install
pnpm run build:shared
pnpm stam setup
pnpm stam dev allThe bootstrap script installs the Node version from .nvmrc and prepares the pnpm version pinned in the root package.json through Corepack. If only pnpm needs repair, run corepack enable followed by corepack install, or run stam setup pnpm when the CLI alias is already available.
The installed stam shortcut executes the Node launcher directly. After building,
the launcher runs the CLI in the same process, so Ctrl+C waits for command cleanup
before returning to the shell. Reinstall older copied shortcuts with
pnpm stam setup shortcut to use this launcher behavior.
Run pnpm stam setup shortcut to install shared/cli/bin/stam as /usr/local/bin/stam and standalone Bash/Zsh completion files using sudo. This removes the need to type pnpm or run commands in the project root. Setup also removes the legacy stam function blocks from .zshrc and .bashrc; restart your terminal or run unset -f stam if the old function is still loaded. Afterwards, stam setup performs the normal setup checks.
Setup lists the binary shortcut under Optional, with its installation command
when missing, non-executable, or different from this checkout's current shortcut or completions.
Run stam setup shortcut to replace an outdated copy. Optional checks do not block
development readiness or appear in recommended fixes.
Shortcut installation creates /usr/local/bin only when missing and ensures the
platform completion directories exist before installing files.
When the private DevOps checkout is present, a DevOps section follows Optional.
It checks OpenTofu, Scaleway CLI, 1Password CLI and TFLint and shows installation
guidance. These checks are also optional and never authenticate or provision cloud
resources. DevOps owns the definitions in devops/cli/setup-checks.ts.
Open the dashboard URL printed by the CLI, or run pnpm stam status to see active services, instances, URLs, and credentials.
Run pnpm stam --help or pnpm stam <topic> --help for command help.
stam setup offers available repairs for failed required checks and rechecks them
after confirmation. This includes reapplying Linux DNS configuration when resolution
fails, repairing mismatched macOS resolver contents (with overwrite confirmation),
and restarting shared services when macOS CoreDNS or Caddy container ports are unhealthy.
Each repair runs at most once per invocation; unresolved checks retain their guidance.
Setup check failures must declare a remediation: a registered action, or manual
instructions with a reason automation is unavailable. The action registry in
src/workflows/setup-machine.ts owns each repair's displayed command, label, and
execution so a runnable command cannot accidentally be omitted from recommendations.
The CLI build clears its own compiled output before compiling so commands removed or renamed between revisions cannot remain discoverable by oclif.
For CLI Users
Documentation images
pnpm stam docs image build <tag> builds the docs Node server image locally for
linux/amd64. pnpm stam docs image publish <tag> pushes that existing image to
STAM_DOCS_REGISTRY, using supplied credentials or an existing runtime login.
Both commands prefer Podman and fall back to Docker when Podman is not installed;
set STAMHOOFD_CONTAINER_RUNTIME=podman or docker to select one explicitly.
Use the same runtime for building and publishing (and any external login). Neither needs the private DevOps
checkout. See the docs image guide. Publication does not deploy.
Use --latest to push the requested tag first and then point latest to the same
local image, or --no-latest to publish only the requested tag. If omitted, the CLI
asks "Point the 'latest' tag to this image as well?" with a default of No, before
reading credentials. Noninteractive publication requires one of these flags.
Both pushes share the same authentication scope; a failed version push leaves
latest untouched. An explicitly requested latest tag is pushed only once.
--environment <name> resolves publishing configuration through the optional
DevOps provider when STAM_DOCS_REGISTRY is unset. Explicit registry configuration
bypasses that provider entirely. The provider prompts for an environment in a
terminal; noninteractive use requires the flag. Custom environment names are accepted.
STAM_DOCS_REGISTRY_USERNAME and STAM_DOCS_REGISTRY_PASSWORD must be supplied
together as nonempty values. When the registry is unset, this pair overrides the
provider's credentials while retaining its selected destination; provider lookup
still requires its infrastructure access. Without the provider, set the registry too.
Supplied credentials use password stdin and invocation-owned authentication files
(directory mode 0700, initial file mode 0600), removed after success, failure or
handled cancellation. Podman uses an explicit authfile without persistent Docker
auth fallback; Docker uses an isolated config without credential helpers. Existing
runtime auth is not modified, and there is no logout. With an explicit registry and
no credential variables, the existing external-login path remains available.
The isolated Docker config preserves the selected daemon context and its TLS
connection material, plus Docker connection environment overrides; only registry
auth is replaced. Connection files are removed with the temporary config.
The installed Docker CLI resolves the effective connection, including
DOCKER_CONTEXT and DOCKER_HOST precedence; the publisher does not impose its own.
When the optional DevOps checkout is present, pnpm stam test devops runs its tests
through the standard test command; it is also included in stam test unit.
Shell completion
stam setup shortcut installs standalone completions alongside the launcher:
| Platform | Bash | Zsh |
| -------- | --------------------------------------------- | ------------------------------------------------- |
| Linux | /usr/share/bash-completion/completions/stam | /usr/share/zsh/site-functions/_stam |
| macOS | $(brew --prefix)/etc/bash_completion.d/stam | $(brew --prefix)/share/zsh/site-functions/_stam |
The installed files do not depend on a user's cache or checkout path. Re-run setup
after command/flag changes; stam setup detects missing or outdated files.
--dry-run previews the destinations. Bash needs bash-completion enabled, and Zsh
needs its usual compinit initialization. On macOS, setup displays
Homebrew shell-completion guidance: load
Homebrew's Bash completion integration, or run brew shellenv before Zsh's
compinit. Setup does not edit these shell preferences.
For manual installation, export stam completion bash --standalone or
stam completion zsh --standalone into the shell's completion search directory.
Fish is not supported.
The completion wrapper and upstream autocomplete helpers are hidden from help
listings and generated suggestions; direct invocation and their --help remain available.
Alternatively, keep completion in your own shell configuration:
Install the stam shortcut first (pnpm stam setup shortcut). Generate an activation
file once, from inside the checkout, for your shell:
mkdir -p ~/.config/stam
stam completion bash > ~/.config/stam/completion.bash
# Add this line to ~/.bashrc (or the startup file used by your login shell)
source ~/.config/stam/completion.bashmkdir -p ~/.config/stam
stam completion zsh > ~/.config/stam/completion.zsh
# Add this line to ~/.zshrc
source ~/.config/stam/completion.zshCommand and flag suggestions use @oclif/plugin-autocomplete with space-separated
topics. A small shell bridge adds live values for
stam docs image publish <tag> --environment <TAB> (Bash may need two Tabs).
The equals form, --environment=<TAB>, is supported too.
Suggestions come only from the active checkout's local operator configuration;
completion does not prompt, read credentials or query infrastructure. An absent
optional provider gives no environment suggestions. Explicit custom names remain
valid and do not have to appear in the list. The launcher prepares the CLI and
optional compiled provider before each request, including from nested directories.
Generated command/flag scripts live in oclif's user-private cache directory
($XDG_CACHE_HOME/@stamhoofd/cli/autocomplete on Linux, defaulting to
~/.cache/@stamhoofd/cli/autocomplete). Environment names are requested at Tab time,
not embedded in generated scripts or persisted in a value cache. Regenerate the
activation file from the checkout after changing commands or flags, then source it
again; live environment values need no regeneration. Sourcing the saved file works
from any directory and does not run generation at shell startup. Dynamic
environment completion supports Bash and Zsh, not Fish or PowerShell. Use
stam completion, rather than the plugin's plain stam autocomplete setup, to
include the live environment bridge. Live environment requests require stam on
PATH and a working directory inside the checkout so its wrapper can locate the repository.
Commands
Command telemetry
BaseCommand owns the telemetry scope around oclif's execution lifecycle, including
command cleanup. All main CLI commands extend this base, including release and
translation commands. Common quiet/verbose flags are inherited. It parses once
before resolving verbosity and reuses that result when the command requests its
typed arguments. Help flags and invalid arguments do not
start a telemetry SDK. Nested commands reuse the invocation's terminal, SDK and
cancellation signal. Command code should not call withCliTelemetry itself.
Normal mode shows descriptive operations; --verbose adds command child spans,
command diagnostics and subprocess output. Machine-readable command results remain
on stdout, diagnostics on stderr. Verbose subprocess progress shows the full quoted,
redacted command in dim text, nested under its enclosing operation. Explicit
descriptive labels retain normal styling. NO_COLOR disables styling, and
label: false suppresses subprocess progress (used by quiet probes).
Use exec for checked subprocesses and execResult when nonzero exit codes are
part of the command's protocol. Both use the invocation signal, process-library
limits and redacted errors. env is a complete environment; the transitional
run adapter retains ambient-environment merging and { status, stdout, stderr }
for existing callers. Native stdio suspends progress while the child owns the
terminal; inherited stdin retains streamed diagnostics. Credential capture must
use a sanitizer, not native stdio.
Use execSudo(args, options?) for short privileged setup operations. It shows
? sudo … above the password prompt, then replaces the interaction with ✓ sudo …
on success. Failures retain their output. Sudo uses -S to route its prompt through
stderr while reading inherited terminal stdin with echo disabled; the CLI never
reads the password. Command labels and output retain credential redaction.
Without interactive stdin it uses native stdio. DNS, port-redirect and shortcut
installation share this helper; general interactive subprocesses retain exec.
DNS and port-redirect setup preview their sudo commands once before confirmation,
then pass label: false to execSudo. In this mode sudo owns native terminal IO
with live rendering suspended, and the enclosing task produces one completion line.
Failures identify the command. Port redirects are checked before completion; sudo
probes stay in the caller's terminal session so they can reuse cached credentials.
Installing DNS configuration does not imply that CoreDNS is running.
Prompts go through runtime/prompts (exported as prompts for DevOps), which
suspends live regions and passes the invocation's abort signal to Inquirer.
step now creates a labelled span instead of an independent spinner. Tables and
development status views share regions on the same terminal coordinator. Their
logs are diagnostics; direct command results and static result tables remain stdout.
Development applications and the statistics syncer use the instrumented process
runner with continuous output and POSIX process-group cancellation. Ctrl+C stops
them with SIGTERM and escalates after two seconds. Development applications omit
the process spinner and Stam log gutters, retaining application prefixes and the
URL/status line. Session teardown and test
container cleanup use withCliCleanup, so an already-cancelled operation does not
skip cleanup subprocesses; another interrupt can cancel cleanup. Detached browser
launchers remain best-effort and are deliberately not tied to the command lifetime.
The development orchestrator in packages/node/dev-tools/src/concurrently.ts keeps application prefixes
and all stdout/stderr, including shutdown errors. During cancellation it suppresses
expected signal/success exit notices and repeated SIGTERM announcements. Nonzero
exit codes and unexpected signals remain visible with short process names;
--verbose retains full orchestration diagnostics. The wrapper lives outside
the CLI's dist so shared CLI rebuilds cannot remove it before the apps start.
Development logs and status
Development lifecycle transport and typed producer adapters live in
packages/node/dev-tools. The CLI bootstrap prepares this independent package;
the docs target prepares its observability dependencies too. Its output survives CLI rebuilds.
openDevEventChannel owns a private temporary
Unix socket per session. Emitters use STAM_DEV_SOCKET, STAM_DEV_SESSION and
STAM_DEV_TRACEPARENT; supervised children can share STAM_DEV_PROCESS_ID and
STAM_DEV_GENERATION. These are runtime metadata, never build inputs.
Events are versioned NDJSON with app, process identity, monotonic generation and
sequence; build events also carry a cycle ID. Frames and emitter queues are bounded.
An unavailable receiver never prevents an app from running. Ordinary logs continue
on stdout/stderr. Call emitter close() to drain final events before exiting.
The CLI correlates build and startup spans using the explicit parent trace context.
Build cycles and server availability are independent: a failed rebuild keeps a
previously ready server orange; failure before readiness is red. New cycles clear
build failures only after success. Old process generations and completed cycles
cannot overwrite newer state. Structured readiness takes precedence over log
parsing and listener availability; listener loss remains a fallback failure check.
Shutdown ends unfinished spans with dev.outcome=cancelled rather than ERROR.
Span durations use producer monotonic timestamps, so synchronous compilation delaying
socket delivery cannot collapse a long build to zero seconds. Backend inspector
ports are allocated by buildPorts with the instance offset, starting at 5858
(API), 5859 (stats) and 5860 (renderer). They participate in availability checks
and session reservations. The supervisor receives them through STAM_DEV_*_INSPECT_PORT.
VS Code attaches using its Node process picker, so it also works with shifted ports.
The shared-build entry point wraps each normal pnpm run build:shared invocation and
reports its result even when every Turbo task is cached. The ready marker is only
written after success; failed builds keep the watcher alive for the next edit.
The watch-typescript entry point uses TypeScript's solution-builder watch callbacks to
report backend compilation cycles, preserving compiler diagnostics and runtime
tsconfig semantics. Backend watch commands preserve asset preparation before compilation.
Turbo passes STAM_DEV_* through shared builds without including their values in cache keys.
The supervise entry point gives each app incarnation an identity and reports its exit even
when the app crashes before it can emit readiness. Backend boot calls
the shared ApplicationLifecycle.ready after initialization (and HTTP listening where applicable);
API seeds/background jobs remain asynchronous. Vite reports listener availability,
not a fictitious whole-app compilation: modules still transform on demand. Nuxt
reports its explicit build hooks and is ready after the app bundle, Nitro compilation
and listener are ready. Nitro rebuild failures/recovery use its structured hooks too.
These independently compiled adapters remain usable while Turbo rebuilds the CLI itself.
Restart the development session after editing tooling code.
stam dev all keeps application logs above one compact footer:
dashboard api docs webshop renderer statsOnly apps selected by the target appear. Labels use short application names and are dimmed; links are underlined OSC-8 hyperlinks. Link destinations follow the selected environment and workspace. Colors indicate:
- Blue: starting or restarting.
- Green: the app reported readiness (listener checks are a fallback for uninstrumented processes).
- Orange: a warning/error was observed in the last 30 seconds, or shared services are unavailable.
- Red: a reported crash/process failure, or two consecutive missed listener checks after running.
Listener checks run once a second and are availability checks, not full application health checks. Structured build/readiness events drive instrumented apps. Warnings are recognized from explicit warning/error markers, not merely because a tool uses stderr. Statistics has no listener: its status follows boot and supervisor events. The CLI owns its command SDK; application executables own their runtime SDK. The supervisor preloads a diagnostics-channel adapter that sends lifecycle events without introducing a CLI dependency into application code. Unrecognized logs still pass through unchanged.
Output is attributed to shared, apps or docs; app logs use short names
assigned by stam. Shared-build output is spooled to a private temporary
file and replayed to stderr on failure. Successful builds (including their warnings)
show only the lifecycle summary; cancellation discards the spool. --verbose
streams all output, including cached shared-build logs. Setup, service
preparation and route configuration have descriptive spans; their command spans
are visible only with --verbose and remain available in exported traces in either
mode. A failed supervised command stops sibling processes so the session cannot
silently remain half-running.
STAM_DEV_VERBOSE propagates --verbose to owned scripts. The TypeScript watcher
suppresses routine watch-status text at the source, but always reports diagnostics.
Application/tool output is never discarded based on matching its rendered text.
Shared builds consume Turbo's documented --json output: only Turbo-owned
info records are omitted, while task stdout/stderr, Turbo warnings/errors and
unknown records are forwarded. Turbo strips ANSI styling in this mode; verbose
sessions retain native tool output. pnpm uses PNPM_CONFIG_LOGLEVEL=warn and
Consola uses CONSOLA_LEVEL=1, preserving warnings and errors. Backend environment
loading disables @stamhoofd/node-logging debug output before migrations and boot; verbose
and unmanaged processes retain it. Routine startup/cron messages use debug at source.
Nuxt components that override Consola's level or write directly also retain their
banners; neither is suppressed through rendered-text matching.
Supervised Node processes publish debugger discovery through HTTP only in normal
mode, suppressing the inspector banner while retaining debugger access and errors.
Backend listener/startup messages use debug; lifecycle summaries report readiness.
The footer clears on shutdown. Redirected output has plain labels without cursor updates or OSC hyperlinks; identical status lines are not repeatedly printed.
stam devops infra uses the same runtime. Setup, apply, sync,
bootstrap and validation show labelled OpenTelemetry
operations and timings by default, grouped by environment and vault. Interactive
stderr gets live progress; redirected output gets plain start/completion lines.
--verbose adds command invocations and subprocess output. Credential JSON is
shown with values redacted. --quiet suppresses normal progress and diagnostics.
Setup shows the operator plan before asking for approval in normal mode.
Trace/span IDs remain in telemetry. Failures include command, exit code and
redacted stderr; empty or truncated stderr is marked.
The CLI only wires the SDK, verbosity and grouping. Reusable rendering and process
instrumentation live in @stamhoofd/node-opentelemetry-terminal and
@stamhoofd/node-opentelemetry-process. The optional DevOps bootstrap depends on their
builds through the CLI and its explicit process-library task dependency.
The command creates an OpenTelemetry trace and allows up to two seconds for exporter
shutdown on success and failure. Telemetry failures produce a separate warning and
preserve the command result; terminal cleanup happens before exporter shutdown.
Remote export is opt-in: set OTEL_EXPORTER_OTLP_ENDPOINT or
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT for OTLP/HTTP JSON, and optionally
OTEL_EXPORTER_OTLP_HEADERS. Without an endpoint, traces remain local and operation
diagnostics still work. Legacy DevOps deployment commands retain their existing logger.
One @stamhoofd/node-terminal coordinator owns progress for each invocation.
withCliPrompt suspends progress during confirmation/account selection, retaining
updates and buffering coordinated diagnostics (up to 64 KiB). infra tf suspends
progress around native OpenTofu stdio so interactive input and machine-readable
stdout retain their original behavior; its native output is not verbosity-filtered
or redacted. Credential reads always use captured, sanitized output.
SIGINT/SIGTERM abort active instrumented subprocesses, with a two-second grace period before SIGKILL. Noninteractive subprocesses use a POSIX process group. Captured output is limited to 16 MiB of characters and diagnostic output to 1 MiB; overflowing capture fails rather than returning successful partial JSON. Failure summaries repeat stderr only when it was not fully presented (including quiet mode). The CLI uses an always-on local sampler; remote export remains opt-in.
| Area | Command | Purpose |
| ------------ | -------------------------------------- | ------------------------------------------------------------------------------ |
| Build | pnpm stam build | Build shared packages and all app packages for the selected environment. |
| Setup | pnpm stam setup | Check the machine, offer fixes, and recheck for newly revealed issues. |
| Setup | pnpm stam setup node | Install the Node.js version from .nvmrc using fnm or nvm. |
| Setup | pnpm stam setup pnpm | Repair the pinned pnpm runtime through Corepack. |
| Setup | pnpm stam setup vcs | Validate and repair Git and existing JJ repositories. |
| Setup | pnpm stam setup dns | Configure local .stamhoofd DNS. |
| Setup | pnpm stam setup privileged-ports | Configure Linux privileged port redirects with iptables. |
| Setup | pnpm stam setup caddy | Install Caddy with Homebrew on macOS. |
| Setup | pnpm stam setup cert | Trust the local Caddy HTTPS authority. |
| Development | pnpm stam dev all | Start shared services and the full app stack. |
| Development | pnpm stam dev backend | Start backend apps for the current instance. |
| Development | pnpm stam dev frontend | Start frontend apps only. |
| Development | pnpm stam dev instance | Start this workspace instance using shared services. |
| Services | pnpm stam services up | Start shared Docker services. |
| Services | pnpm stam services status | Show shared service status. |
| Services | pnpm stam services logs | Tail shared service logs. |
| Services | pnpm stam services restart | Restart shared services with interactive progress output. |
| Services | pnpm stam services down | Stop shared services. |
| Services | pnpm stam services stop | Alias for pnpm stam services down. |
| Status | pnpm stam status | Show shared services, active instances, URLs, and credentials. |
| Config | pnpm stam config explain | Explain resolved instance config. |
| Config | pnpm stam config print | Print resolved domains and backend environment values as JSON. |
| Database | pnpm stam db shell | Open a MySQL shell for the current local database. |
| Database | pnpm stam db migrate | Build shared packages and run migrations. |
| SSO | pnpm stam sso config | Print local SSO client, user, and issuer settings. |
| SSO | pnpm stam sso start <redirect-uri> | Start Keycloak and import the local realm. |
| SSO | pnpm stam sso logs | Tail Keycloak logs. |
| SSO | pnpm stam sso stop | Stop the local Keycloak container. |
| Report | pnpm stam platform-report start | Migrate the statistics database, start Metabase with the report, and sync. |
| Report | pnpm stam platform-report dashboards | Rewrite the report's questions and dashboards in Metabase. |
| Report | pnpm stam platform-report config | Print the Metabase URL, login, and data source settings. |
| Report | pnpm stam platform-report logs | Tail Metabase logs. |
| Report | pnpm stam platform-report stop | Stop the local Metabase container. |
| Tests | pnpm stam test unit | Run unit tests with isolated MySQL. |
| Tests | pnpm stam test coverage | Run package coverage with isolated MySQL. |
| Tests | pnpm stam test e2e | Run Playwright tests. |
| Tests | pnpm stam test all --ci | Run unit and E2E tests in CI mode. |
| Checks | pnpm stam check lint | Run each package's owning linter across the monorepo. |
| Checks | pnpm stam check typecheck | Run TypeScript checks across the monorepo. |
| Checks | pnpm stam check all | Run build, lint, typecheck, unit tests, and E2E tests. |
| Release | pnpm stam release bump-structures | Replace ...NextVersion by the next structures version and bump Version.ts. |
| Release | pnpm stam release version | Give every public package the next version, then commit, tag and push it. |
| Release | pnpm stam release npm | Follow (or start) the Release workflow run that publishes a tag to npm. |
| Release | pnpm stam release trust | Configure npm trusted publishing for the public packages. |
| Translations | pnpm stam translate | Show translation help; never modify files without a subcommand. |
| Translations | pnpm stam translate auto | Replace keys, clean up translations, and machine-translate. |
| Translations | pnpm stam translate manual keys | Replace translation keys. |
| Translations | pnpm stam translate manual cleanup | Merge duplicates and remove unused keys. |
| Translations | pnpm stam translate manual machine | Machine-translate missing translations. |
| Translations | pnpm stam translate manual source | Wrap untranslated source text in translation calls. |
| Translations | pnpm stam translate manual review | Review machine translations identical to the original. |
| Translations | pnpm stam translate maintenance | Show specialist cache, key, and repair tools. |
| Cleanup | pnpm stam clean build | Remove build artifacts. |
| Cleanup | pnpm stam clean db | Drop the selected local MySQL database after confirmation. |
| Cleanup | pnpm stam clean sso | Stop the local SSO server. |
| Cleanup | pnpm stam clean metabase | Stop Metabase and drop its application database after confirmation. |
| Cleanup | pnpm stam clean services | Stop shared services. |
| Cleanup | pnpm stam clean all | Clean build artifacts and stop shared services. |
The setup privileged-ports and setup caddy actions accept --dry-run to preview
commands and --yes to skip confirmation, matching the interactive setup repairs.
Structures releases require a clean Git/JJ checkout on main, synchronized with
origin/main after fetching. In JJ, use an empty working commit directly above
main. The shared inspectCheckout and assertReleaseTag exports also support
DevOps release-tag validation; tag validation does not require a particular branch.
Releases
pnpm ship releases a new version:
stam release bump-structuresreplaces...NextVersionand commits the structures version.stam release versionasks for patch, minor or major, writes that version to the rootpackage.jsonand to every public workspace package, commits it asv<version>, tags it and pushes the branch and the tag atomically. It needs a clean Git checkout of the branch you release (onlymaingoes toorigin) that is not behind the remote, and a version that neitheroriginnorprivatehas tagged yet. Releasing from JJ is not supported yet.stam release npmfollows the Release workflow that the tag started, and fails when it fails.stam release publishcreates the GitHub release and announces it in Slack.
The Release workflow (.github/workflows/release.yml) builds the packages and runs pnpm -r publish with npm trusted publishing, so nobody needs an npm token or one-time password, and npm adds provenance. Only the public repository publishes, and only from the npm GitHub environment. The tag is public before the workflow builds it; when the build fails, fix it and release a patch version. pnpm ship:fix starts the workflow again for the current version (versions already on npm are skipped) and publishes the release notes again. pnpm ship:private versions and tags on the private remote; that tag is published once it reaches origin.
All public packages share the root version; private packages keep their own. A test checks that every public package has the root version and a repository field. To add a public package, give it a repository field, publish it once by hand (npm only accepts a trusted publisher for a package that exists), then run pnpm stam release trust <name>.
Setting up publishing once:
- In the GitHub repository settings, create the
npmenvironment and limit its deployment branches and tags tov*tags. Optionally require a reviewer, or limit who can createv*tags with a tag ruleset: anyone who can push such a tag can publish. - Publish the packages that are not on npm yet once by hand, after
npm login.pnpm stam release trust --dry-runlists them with the command to run. - Run
pnpm stam release trust(npm 11.15 or later, logged in with 2FA) to let the Release workflow publish every package. - Optionally set every package to "Require two-factor authentication and disallow tokens" on npmjs.com; trusted publishing keeps working.
Translations
During development, write Dutch $t('Opslaan') strings and commit them unchanged. Do not manually edit shared/locales/src/nl.json. Before releasing, a maintainer runs pnpm stam translate auto, reviews the generated changes, and commits them separately.
The automatic flow runs keys → cleanup → machine. Use --locale fr --locale en to select languages, --provider openai to choose a provider, or --no-machine to prepare keys without AI requests. Each stage is also available under translate manual.
The CLI shows spinners for key registration, locale builds, duplicate merging, unused-key removal, and machine translation. Long scans report file/key counts; machine translation reports the namespace, locale, and completed batches. Unused-key cleanup scans sources once for all languages, then cleans translation files; its overall percentage counts completed source and translation files across both phases. Completed steps show concise summaries, and noninteractive terminals receive plain step output. Manual key registration prints the next cleanup command; auto and manual cleanup already remove unused keys and do not ask you to run cleanup again. AI response bodies stay out of terminal output; prompt/result logs remain under .development/i18n-uuid.
auto first asks whether to include AI machine translation. Declining runs only keys and cleanup without looking up credentials. When using 1Password, unlock the DevOps Development vault before continuing. The command validates the selected locales and provider credentials before changing translation files, explains the flow and potential AI costs, and asks for confirmation. Use --yes for noninteractive execution with machine translation, or --yes --no-machine for keys and cleanup only. It shows stage progress, stops on failures without rolling back partial changes, and prints the current working-copy diff summary (including any pre-existing edits).
Providers are openai, gemini, mistral-large, and mistral-small. The CLI resolves the selected provider's key from the environment (OPENAI_API_KEY, GEMINI_API_KEY, or MISTRAL_API_KEY), then .development/i18n-uuid/.env, then 1Password. The 1Password references are op://DevOps Development/OpenAI/Token, op://DevOps Development/Gemini/Token, and op://DevOps Development/Mistral/Token; authenticate the op CLI to use them. Both Mistral providers share the same key. Claude is not implemented by this translation library. Help, maintenance, --no-machine, and --fake need no credentials and do not query 1Password.
Translation imports do not load environment files or open logs. The CLI resolves credentials when a machine translation is requested and passes them to the library. Machine translation writes prompts.log and errors.log under .development/i18n-uuid, regardless of the shell's working directory.
Bare translate now shows help. Update scripts that previously ran the pipeline to use translate auto. The old translate keys, compress, and machine commands remain available as hidden compatibility commands.
Source migration and review are optional, not part of auto:
pnpm stam translate manual source --changes --dry-run
pnpm stam translate manual source --changes --prompt --fix
pnpm stam translate manual review --dry-run
pnpm stam translate manual reviewSource migration only wraps text in $t(...); it does not generate keys or call an AI provider. --commits HEAD~1 --commits HEAD selects a Git comparison and implies --changes. Source previews do not write source files or processing caches and do not prompt. Review only flags nonempty translations identical to their original Dutch text. Accepting an entry writes it to the human-maintained translations; rejecting deletes its machine entry; deferring leaves it unchanged. Review previews do not prompt or write files.
translate maintenance shows help for cache clearing, UUID compression, invalid-entry filtering, duplicate machine-translation repair, and legacy comparison generation. These are not additional release steps. Prefer manual review over bulk maintenance filter-invalid when unchanged wording may be legitimate. The comparison tool writes JSON files to .development/i18n-uuid/output; its provider labels currently repeat the same machine translation and do not represent independent provider results.
The translation library no longer has a separate command runner or package scripts for these operations. Use the Stamhoofd CLI; pnpm stam builds the library and CLI through Turbo before running a command. Both translate manual and translate maintenance show help without modifying files when no subcommand is supplied.
Version Control
pnpm stam setup includes repository checks as optional items: missing private repository configuration does not block setup or trigger automatic repairs. Run pnpm stam setup vcs separately to configure version control, or add --dry-run to preview repairs and --yes to approve them.
Setup validates fetch and push URLs for public origin (stamhoofd/stamhoofd) and private private (stamhoofd/stamhoofd-private). It creates the local private branch if missing, configures its upstream as private/private, and sets branch.private.pushRemote=private, branch.main.pushRemote=origin, and push.default=current. It never switches checkout, resets existing branches, or pushes.
Existing JJ repositories also fetch both remotes by default, push to origin by default, and track private@private and main@origin without cross-remote tracking. Git-only checkouts are not initialized as JJ repositories. JJ does not use Git's per-branch push destinations; push explicitly:
jj git push --bookmark main
jj git push --remote private --bookmark privateJJ automatically tracks fetched and newly created bookmarks matching glob:private* on the private remote. This includes private and names such as private-andreasbackx/example; JJ's * matches slashes. Origin's existing automatic tracking patterns are preserved but exclude private*. Existing feature bookmark tracking is not migrated.
Setup and workspace resolution share VCS detection: when JJ is available and recognizes the repository (or .jj exists), JJ is preferred. Otherwise Git is used. Setup reports only which VCS is used; missing JJ is not a blocker, even if .jj exists. Repository checks report any problems with the selected VCS.
These defaults are not an access-control boundary. Explicit remote/refspec arguments can override them; the public repository must reject private-prefixed branch creation and updates server-side. A GitHub ruleset can include both private* and private*/**/* to cover names with and without slashes.
Development Configuration
Compiled packages use the standard build:types task to check production source and produce declarations in dist-types with separate .cache/types.tsbuildinfo metadata. Source-only packages have no script: Turbo traverses their ^build:types prerequisites without bundling them. Runtime builds depend on their own declarations and use .cache/build.tsbuildinfo, emitting JavaScript and assets into dist without declarations. Runtime export paths are unchanged; types exports and published file lists include dist-types. TypeScript project references, including those in external tooling, must target tsconfig.types.json rather than runtime configs. API declaration generation also includes its exported test helpers in a separate test-globals configuration; its explicit E2E preparation emits test JavaScript using tsconfig.test.build.json and separate metadata. Locale JSON generation remains part of the runtime build, not declaration preparation.
Turbo owns cross-package build ordering. Runtime compiler projects consume generated declarations through package exports, without recursively rebuilding declaration projects. This also keeps the translation tooling's TypeScript 5.9 metadata separate from the main repository's TypeScript 6 compiler.
All builds use ^build over the acyclic workspace dependency graph. Internal build-time peers are mirrored in devDependencies while retaining their published peerDependencies; global type declarations are also declared as build-time dependencies. Turbo does not include peer dependencies alone in ^build. Source-only frontend packages have no build script: Turbo traverses them as transit nodes to build their prerequisites without bundling them separately. Package-specific task entries replace the default task configuration, so cached entries must keep their own dependsOn and outputs. The API build is cached, including compiled output, copied assets, and build metadata. Other application builds, Playwright builds, tests and migrations are uncached; development tasks are persistent and uncached.
Shared builds in stam build, tests, migrations, and development sessions call the root build:shared Turbo graph. The development watcher ignores runtime and declaration outputs, and marks the shared build ready only after success; failed compilations can recover on the next edit. App startup waits for that ready marker. Use stam dev instead of the removed build:shared:watch script. stam clean build removes runtime/declaration outputs and TypeScript metadata without deleting other package caches or the local Turbo cache; use pnpm run clear:shared && pnpm run build:shared --force for a fresh compilation.
Development sessions launch the API, renderer, statistics syncer, web app, and webshop directly through @stamhoofd/node-dev-tools and the framework executables. stam owns app selection and passes its environment, including allocated debugger ports and Stripe values, to each process. Backend compiler/runtime watchers run together; a failed watcher stops its siblings. Use stam dev instead of application dev/dev:* scripts. The docs target prepares its small observability dependency graph and starts Nuxt without waiting for the full shared build.
Application command construction lives in src/runtime/dev-commands.ts and src/workflows/start-dev.ts. Tool executables, shared watch directories, and frontend environment files resolve from CliContext.rootDir; only application-local inputs and outputs depend on the application's working directory. @stamhoofd/node-dev-tools owns lifecycle transport and executable adapters, whose TSDoc documents environment and shutdown contracts.
pnpm stam build uses those same five executable app owners after the shared build. Dashboard and registration are source packages bundled by web-app. The root backend build explicitly selects API, renderer, backup, redirecter, and statistics syncer. Database migrations invoke the API and statistics-syncer owners serially.
Task orchestration uses pnpm, Turbo, and stam. Releases use stam release and the Release workflow (see Releases).
The root and stam check lint and typecheck commands use Turbo to select all package scripts. Both checks prepare build:types, never runtime builds or frontend bundles. Declaration generation validates all compiled production packages, including packages without a separate typecheck script. Backend/shared typecheck scripts then validate tests without emitting or repeating a full production check. Frontend scripts check source directly, following source-only dependencies without bundling them. Each package owns its standard scripts; no package-specific declaration task registry is required.
Use stam check typecheck mobile or stam check lint mobile for a package in @stamhoofd; fully scoped names work too. Repeat --filter <selector> for native Turbo selectors, including other scopes, unscoped packages, paths, or dependency selections. Filtering changes only the selected checks, not their declaration prerequisites or cache keys. For example, stam check lint --filter './backend/shared/*' checks backend libraries and stam check typecheck --filter i18n-uuid checks the translation tooling's production declarations.
Use stam check lint --fix to automatically fix lint problems, optionally with a package target or --filter. Fix mode forwards --fix to the package's linter and disables Turbo caching so source edits are always applied. stam check all --fix enables this for its lint step. stam check format --fix applies formatting with Oxfmt and ESLint. Typechecking has no automatic-fix mode.
Source files have exclusive tool ownership by package: ESLint, or Oxfmt/Oxlint. The package allowlist and migration instructions are documented in the shared Oxlint guide. Unlisted packages retain ESLint; formatting does not transfer Vue files to Oxfmt. The mobile Capacitor input and generated native-dependency record are excluded from formatting because byte-level hashes participate in native refresh validation.
Formatting runs only ESLint layout rules, with TypeScript project services and worker
threads disabled. It retains each file's normal formatting settings, including Vue
template rules, without running semantic, security, or import-graph checks. Both
check and fix mode fail on remaining formatting warnings or syntax errors. Run
stam check lint separately for correctness checks. The isolated content-based cache
in .cache/eslint-format is invalidated by configuration and local plugin changes;
it is not shared with type-aware linting. indent-binary-ops is disabled because it
conflicts with indent on TypeScript unions.
Typecheck scripts use incremental compilation with package-local .cache/typecheck.tsbuildinfo metadata. Turbo caches this separately from declaration and runtime metadata, so cache misses after edits can reuse previous compiler work without writing JavaScript or declarations. Cache hits restore missing metadata without starting the compiler. Compiler contexts remain separate for production, tests, and each frontend package; test globals are not merged into application checking.
The scriptless check-inputs task propagates transitive source fingerprints without running dependency checks. Checks also prepare declarations and fingerprint components and its dependencies because shared Vue ambient declarations import them implicitly. Shared TypeScript configurations and ambient declarations are global cache inputs. Lint uses type-aware rules, so it tracks dependency source and declarations too. It additionally fingerprints eslint-plugin-stamhoofd, oxlint-plugin-stamhoofd, and their dependencies; inherited root, frontend, and backend ESLint configurations are global cache inputs. The root Oxlint configuration is a lint-task input, so changing it does not invalidate declaration or runtime builds. Semantic linting does not use a per-file cache because changes to imported types can affect unchanged files. Only successful checks are cached; failures always run again. A failure in any package fails the root command. Direct package scripts bypass Turbo's prerequisites and check cache.
Lint scripts include --quiet themselves, keeping the existing repo-wide errors-only behavior consistent with direct package scripts. The root lint command uses Turbo's --continue=always so every package runs even after another task fails; the command still exits nonzero if any task fails. Lint fingerprints NODE_ENV because it controls environment-sensitive rules. Without --fix, the root command does not forward arguments through Turbo, so lint and typechecking share declaration cache keys. To include warnings when debugging a package, run pnpm --filter <package> exec eslint . directly.
shared/cli owns local development configuration. Backend and frontend development builds load domains, ports, database settings, storage settings, and app environment values from @stamhoofd/cli.
The main config contract lives in src/config/development-config.ts. Keep local-development settings there first, then consume the resolved config from commands, workflows, Caddy, SSO, Stripe, status output, or app bootstrapping.
Inspect the current config with:
pnpm stam config explain
pnpm stam config print
pnpm stam config print --env keeoInstances And Ports
The CLI infers an instance from the workspace, selected environment, and optional overrides.
Useful flags:
--env <name>selects the development environment. The default isstamhoofd.--name <name>overrides the inferred instance name.--verboseprints extra diagnostics and commands.
Useful environment variables:
STAMHOOFD_WORKSPACE_NAMEoverrides the workspace name.STAMHOOFD_PRIMARY_INSTANCE=1forces primary-instance behavior.STAMHOOFD_INSTANCE_PREFIXoverrides the domain prefix.STAMHOOFD_PORT_OFFSEToverrides the deterministic port offset.STAMHOOFD_DOMAINoverrides the shared local domain, defaulting tostamhoofd.MYSQL_PORToverrides the local MySQL host port, defaulting to3307.STAMHOOFD_E2E_MYSQL_PORTruns the e2e tests against a MySQL that is already running on127.0.0.1instead of starting a container for them (see Tests).STAMHOOFD_E2E_MYSQL_USERandSTAMHOOFD_E2E_MYSQL_PASSWORDoverride the credentials of that MySQL, defaulting toroot/root.STAMHOOFD_MYSQL_INNODB_BUFFER_POOL_SIZEtunes the MySQL container InnoDB buffer pool size (e.g.512M,1G), defaulting to4G.STAMHOOFD_MYSQL_INNODB_BUFFER_POOL_INSTANCEStunes the MySQL container InnoDB buffer pool instances defaulting to4.STAMHOOFD_MYSQL_SORT_BUFFER_SIZEtunes the MySQL container sort buffer size (e.g.8M), defaulting to2M.METABASE_PORToverrides the local Metabase host port, defaulting to3030.METABASE_ADMIN_EMAILandMETABASE_ADMIN_PASSWORDoverride the Metabase admin account the CLI signs in with, for an instance that was set up by hand (see Local Metabase).PUBLIC_IP: Publish DNS records to your computers public IP address, and make Caddy listen on 0.0.0.0 instead of localhost. Useful for testing on local devices. E.g.PUBLIC_IP=192.168.1.7 stam services restartPUBLIC_IP=192.168.1.7 stam dev all
The primary stamhoofd instance uses base ports. With Git, the primary instance is the first worktree in git worktree list --porcelain. With jj, it is the default workspace, falling back to the first workspace when default is absent. Shared service configuration and route manifests live in that primary workspace. Other worktrees and workspaces get deterministic offsets based on the workspace name so multiple workspaces can run on the same machine without changing databases when branches change.
When needing a heavy duty MySQL instance to test migrations, you can restart MySQL using:
STAMHOOFD_MYSQL_INNODB_BUFFER_POOL_INSTANCES=10 \
STAMHOOFD_MYSQL_SORT_BUFFER_SIZE=64M \
STAMHOOFD_MYSQL_INNODB_BUFFER_POOL_SIZE=16G \
stam services restartShared Services
Shared services run as Docker containers:
- MySQL:
stamhoofd-mysql - MailDev:
stamhoofd-maildev - RustFS:
stamhoofd-rustfs - CoreDNS:
stamhoofd-coredns - Caddy:
stamhoofd-caddy
Metabase (stamhoofd-metabase) is not part of that baseline: it is a JVM service that costs a lot of
memory and start-up time, so it runs on demand through stam platform-report start (see Local
platform report).
The setup is intentionally different where Docker behaves differently:
- Linux runs Caddy on unprivileged ports
8080/8443and usessudo iptablesredirects from80/443. - Linux configures split DNS through
systemd-resolved, pointing.stamhoofdto CoreDNS on127.0.0.1:1053. - macOS uses Docker Desktop bridge networking for Caddy, publishes
80/443directly, and proxies back to host app ports throughhost.docker.internal. - macOS configures
/etc/resolver/stamhoofdwithnameserver 127.0.0.1, so only thestamhoofdresolver domain and its subdomains use local CoreDNS on port53. - MySQL listens on host port
3307by default and still uses container port3306.
Start and inspect them with:
pnpm stam services up
pnpm stam services status
pnpm stam services logsStop them with:
pnpm stam services downLocal SSO
Use pnpm stam sso config to print the issuer, client credentials, test user, and example command.
Start Keycloak with the redirect URI copied from the app:
pnpm stam sso start "https://<organization-id>.api.stamhoofd/openid/callback"The command imports a local realm with the printed client and test user.
pnpm stam test e2e starts a second Keycloak from the same SsoService, on its own container, port (6400) and host (playwright-sso.stamhoofd), with a realm that allows the /openid/callback of every Playwright worker. It is started and stopped by the Playwright global setup, so it never restarts the server you started for manual testing. Like the other e2e services it binds a fixed port, so only one e2e run can be up at a time.
Local platform report
The ledenstatistieken read off a platform statistics database that a syncer keeps in step with the administration, and are drawn by a local Metabase that only costs memory while you use it. One command brings up all three:
pnpm stam platform-report startIt starts the shared services if needed, reloads Caddy, migrates the statistics database of the
environment, starts Metabase and waits until it answers /api/health (the first start migrates its
application database and takes a few minutes), registers the statistics database as a data source,
writes the report, and then runs the syncer until you stop it with Ctrl+C. No wizard, no manual data
source, no separate migrate step.
Metabase keeps running after Ctrl+C, so the dashboards stay readable while nothing syncs. Stop it
with stam platform-report stop.
The syncer is the same service stam dev backend runs, so there is no need for this command while a
development session is up: in development it syncs on every cron tick.
While working on the report itself, rewrite its questions and dashboards without restarting anything:
pnpm stam platform-report dashboards --env keeoPlatform statistics per environment
Each environment reports on its own platform statistics database, so a dashboard built against
Keeo never reads Ravot numbers. stam platform-report start creates and migrates that database, and
registers it as a data source named after the environment:
| Command | MySQL database |
| ---------------------------------------- | ------------------------ |
| stam platform-report start | statistics-development |
| stam platform-report start --env keeo | statistics-keeo |
| stam platform-report start --env ravot | statistics-ravot |
| stam platform-report start --env jambo | statistics-jamboree |
The names come from databases.platformStatistics in src/config/development-config.ts, which
follows the same rules as the main development database: environments keep their historical label
(stamhoofd → development, jambo → jamboree), and a secondary instance suffixes its own name so
worktrees never share data.
The tables in that database belong to backend/app/statistics-syncer, which keeps a migration
history of its own. stam platform-report start runs those migrations before it registers the data
source, because Metabase caches the schema it found and only refreshes on its own schedule: a
database registered while it was still empty keeps showing no tables. Every run asks Metabase to
re-read the schema, and warns when the database has no tables. stam db migrate runs the same
migrations along with the ones of the main database.
Every run also tidies up the instance: it drops Metabase's demo database (new containers never create
one) and hides the migrations table of the data source it configured, which is schema history
rather than something to report on. The tables listed in metabaseHiddenTables are the ones hidden.
One Metabase serves every environment, and shows one report: Ledenstatistieken, holding the
platform that was written last. Starting --env keeo points the questions in that collection at
keeo's data source, so there is never a second report to pick the wrong platform from, and nothing
carries an environment in its name. Switching back is the same command with another --env.
The data sources stay registered, all of them, one per environment. An already registered data
source is left untouched, so edits made in the UI survive. Print the settings of an environment with
stam platform-report config --env keeo.
Login
The CLI completes the setup wizard itself and owns the admin account, so it can keep configuring the
instance later. stam platform-report config prints the credentials.
If you set Metabase up by hand with your own account, the CLI cannot sign in. Either point it at your
account with METABASE_ADMIN_EMAIL and METABASE_ADMIN_PASSWORD, or start over with
stam clean metabase.
Storage
Metabase keeps its own questions, dashboards and users in an application database, which gets its
own stamhoofd-metabase database on the shared MySQL container rather than the embedded H2 database
Metabase defaults to. H2 is unsupported for anything but a throwaway trial and cannot be migrated in
place later, so local and server setups both use a real database.
Reset Metabase (drops all local questions and dashboards, keeps the statistics data) with:
pnpm stam clean metabaseMETABASE_PORT overrides the host port, which defaults to 3030.
Tests
Build, lint, typecheck and test commands show descriptive operations and timings by
default. Subprocess output is retained privately and replayed only on failure;
successful warnings/debug logs and cached Turbo task logs stay hidden. --verbose
streams commands and diagnostics immediately. --quiet hides normal progress but
still shows failure diagnostics. Interactive Playwright UI mode remains streamed.
Test reporters send versioned NDJSON snapshots over a private, per-run Unix socket, separate from stdout/stderr. Local terminals show live completed-test counts; totals are shown only when known. Vitest discovers tests while running, so its live count has no denominator. Final summaries include passed, failed, skipped, todo, flaky and pending counts when nonzero. Retries never count as additional tests. Missing events fall back to operation name and elapsed time; exit status, not telemetry, determines success. No tool console output is parsed for progress.
Noninteractive output shows operation start/completion lines without repeated
counter updates. CI jobs invoking Turbo directly use its failure-only task output
and show Turbo's task summary. Vitest suppresses passing-test console logs even
when a different test fails. Existing JSON timing reports, coverage files and
Playwright blob reports/traces remain available. Successful coverage console
tables, like other subprocess output, require --verbose.
pnpm stam test errors and pnpm stam test encoding run the common library suites without MySQL.
Networking uses pnpm stam test common-networking; networking selects the frontend service.
pnpm stam test database runs the database library with managed MySQL and its fixture migrations.
pnpm stam test node-logging runs the Node logging library without MySQL; logging still selects the Stamhoofd wrapper.
pnpm stam test navigation runs both the navigation node tests and Chromium browser tests.
The integrated libraries are standalone, published packages under packages/common,
packages/node, and packages/browser.
pnpm stam test runs build:shared first and only starts a MySQL container when a selected package needs one. That container runs off a data volume that persists between runs (so the data dir + migrations are reused, mapped DB_PORT), and it is shut down after the run. Both the container and volume are namespaced per worktree so runs don't collide:
CLI-managed test MySQL disables binary logging and uses innodb_flush_log_at_trx_commit=2 to avoid syncing every fixture write to disk. Transactions, redo recovery, constraints, and collations are unchanged, but a host failure can lose recent test writes. Test data is rebuildable; use --clear if necessary. Shared development MySQL and servers selected with --local-db keep their own durability settings.
pnpm stam test unit # every unit package (excludes Playwright)
pnpm stam test coverage # package coverage with the same isolated MySQL lifecycle
pnpm stam test api # one package (api, models, vies, sql, statistics-syncer, filters, structures, renderer, redirecter, queues, utility, sgv, object-differ, eslint, vite-config, metabase, i18n-uuid, cli, components, networking, sgv-frontend)
pnpm stam test api --coverage # collect coverage for one package
pnpm stam test unit SomeFile # filter by filename across all packages
pnpm stam test structures bundle-discounts # package + filename filter
pnpm stam test structures -t 'partial test name' # package + test-name filter (passed to vitest -t)
pnpm stam test api --skip-build # skip the automatic build:shared step
pnpm stam test api --shard 1/2 # one API shard, on a separate machine/worktree
pnpm stam test api --json-report /reports/api.json # keep console output and write per-file timings
pnpm stam test api --clear # reset the test database (drop its volume) before running
pnpm stam test components ImageComponent # frontend browser tests (vitest browser mode)
pnpm stam test platform # browser/native platform metadata
pnpm stam test session # session infrastructure
pnpm stam test notifications # shared toast service
pnpm stam test application # login and session coordinationcomponents, networking, and sgv-frontend run in vitest browser mode and need a Playwright Chromium (pnpm exec playwright install chromium); they are part of stam test unit too.
Use stam test unit and stam test coverage directly. Coverage runs serially and is uncached.
Test commands do not run a separate typecheck step. Use stam check typecheck to check types, including test files; stam check all includes that check. The automatic shared build still checks the production code it compiles.
Unit --shard <index>/<total> splits test files while preserving each package's worker limit. Run shards on separate machines or worktrees: shards in the same worktree share the test database. --json-report <path> requires a single package and resolves relative paths from that package.
CI runs the API across two machines, uploads these reports for timing comparisons, and runs the other backend apps once. The CLI owns MySQL and uses the workflow's pinned CI_MYSQL_IMAGE. The aggregate Backend App Tests check fails if either shard fails. The separate Typecheck
