Choose a model and effort for your coding task. Learn from the result.
Harness model defaults refresh from a daily catalog, without a CLI release.
spatz ranks the model and effort pairs that you can use for a coding task.
It learns from task results to help choose cheaper pairs that succeed.
You or your coding agent run the task with the recommended pair.
Different tasks need different models and effort levels.
spatz combines task classification with results from your previous tasks.
Use your available models. Start with harness defaults or set your own candidates.
Learn from results. Record outcomes through hooks or spatz report.
Compare performance. Use spatz stats to see results per task type or routing scope.
Connect to coding agents. Hooks support Claude Code and Codex CLI. Other agents can use the CLI directly.
Keep learning data local. spatz stores results in ~/.spatz/spatz.db. It does not store task text.
Quickstart
1. Install
Install the stable CLI with Node.js 18 or newer:
npm install -g @spatz/cli
spatz --version
The npm package includes the Bun runtime. Keep optional dependencies enabled.
Linux needs glibc. spatz does not support Alpine Linux.
For Windows, see Platform support.
For installation without Node.js, use a release archive.
For the unstable nightly version, use npm install -g @spatz/cli@nightly. To test a release candidate, use npm install -g @spatz/cli@next.
2. Ask for a recommendation
From Claude Code or Codex, pass the task:
spatz "Fix the off-by-one error in src/list.ts"
spatz uses a preset for the detected harness.
Override it with --models, SPATZ_MODELS, or models in configuration files.
Use --family claude or --family gpt to filter candidates for a review.
The output includes a suggestion_id and a ranked list of pairs.
Add --json for machine-readable output.
spatz works without an API key.
Without Jev or learned results, it recommends the most expensive candidate.
Jev is the TypeSafe AI model that classifies the task and estimates candidate suitability.
To enable Jev, set your TypeSafe AI key:
export TYPESAFE_AI_API_KEY="<your-key>"
When you enable Jev, spatz sends task text and candidate details to TypeSafe AI.
Read Privacy before using sensitive task text.
3. Run the task and report the result
Run the task with the chosen model and effort in your coding agent.
Then report the pair you actually used:
Replace <suggestion_id> with the ID from the recommendation.
Results can be pass, partial, or fail.
An explicit report overrides hook signals for its selected attempt.
A changed verdict creates a retry. Use --correct to fix a mistaken report.
Use --attempt <id> --confirm to report on an existing attempt without creating a retry.
Use spatz suggest "Retry the task" --retry-of <suggestion_id> to link a new suggestion to the same recovery chain.
See report flags for explicit attempt selection.
For experiments, add --dry-run to the recommendation command.
These suggestions never count toward learning or statistics.
How it works
A local filter checks the task text for known secret patterns.
Jev classifies the task. Without Jev, spatz uses local keyword rules.
spatz ranks your candidates using classification and learned success estimates.
You or your agent choose a pair and run the task.
Hooks or spatz report record the outcome for future recommendations.