Getting started
jouet is one static binary with no runtime dependencies. It runs on Linux, macOS (Apple Silicon) and Windows. This page installs it, connects it to your agent, and shows what to look at once it is running.
Early development
How much jouet helps depends on your language, test runner and agent, and your setup may need some configuration, or a fix in jouet, before you see any savings. Commands, flags, exit codes and JSON output may change incompatibly between releases until 1.0. See what to expect.
Install
With mise
mise use -g jouetmise installs jouet from its signed packslip release, checking its signature and digests first.
With cargo
cargo install jouet --lockedTo build the latest unreleased code instead:
cargo install --git https://github.com/jdx/jouet --lockedFrom a release
Each GitHub release has an archive per target, a SHA256SUMS file, and a signed packslip that records how every archive was built:
| Platform | Archive |
|---|---|
| Linux x64 (glibc) | jouet-x86_64-unknown-linux-gnu.tar.gz |
| Linux x64 (musl) | jouet-x86_64-unknown-linux-musl.tar.gz |
| Linux arm64 (glibc) | jouet-aarch64-unknown-linux-gnu.tar.gz |
| Linux arm64 (musl) | jouet-aarch64-unknown-linux-musl.tar.gz |
| macOS (Apple Silicon) | jouet-aarch64-apple-darwin.tar.gz |
| Windows x64 | jouet-x86_64-pc-windows-msvc.zip |
| Windows arm64 | jouet-aarch64-pc-windows-msvc.zip |
The glibc archives need glibc 2.39 or newer (Ubuntu 24.04, Debian 13, Fedora 40). On older distributions, use the musl archive for your architecture: it is static and runs anywhere. mise picks it for you on those hosts.
Unpack the archive and put jouet (jouet.exe on Windows) on your PATH, then check it runs:
jouet --versionConnect your agent
For Claude Code, Codex, Cursor, Gemini CLI or Copilot, jouet setup adds jouet's hooks to the harness's settings file and installs the jouet-init skill:
jouet setup claude # or: codex, cursor, gemini, copilot--dry-run shows the change without writing it, and --uninstall takes jouet's entries out again. Codex skips new hooks until you trust them, so after jouet setup codex, run /hooks in Codex and trust jouet's.
From the next session on:
- The agent starts with a short primer: jouet's commands by family, how to edit and commit with them, the rules that deny and what each suggests instead, and, once jouet has timed a few runs, the slowest checks in this repository.
- Before each shell command, jouet's rules run. A handful of hand-rolled patterns, such as a
sleeploop aroundgh pr checksor a Python heredoc that edits a file, are denied with one line naming the command to use instead. - Test, lint and build runs are timed for
jouet cost. If the agent tries to finish while its last run failed, or after changing files with no run passing since, it is sent back once.
Agent setup and hooks covers each harness, installing for one repository only, and turning each part off.
For another harness, add the snippet that jouet skill --format agents-md prints to its AGENTS.md. It points the agent at jouet agent-help, which always describes the installed version. The agent gets the commands that way, but no primer, rules or stop check.
Initialize your project
Then start a new agent session in the project and ask it to use jouet-init: /jouet-init in Claude Code, $jouet-init in Codex, or in any harness:
Use the jouet-init skill to configure jouet for this project.The agent reads the project's instructions, build and test workflows, existing jouet configuration and timing history, and works out the full and focused check commands. Where the project needs it, it adapts the test configuration, adds a task or routine, or writes a warning rule, and checks what it changed. When nothing needs configuring, it says so. Trusting the repository's rules stays your decision. Initialize a project says what the skill does and doesn't do.
See where your sessions go
jouet audit needs no setup. It reads the Claude Code and Codex transcripts already on your machine and reports where they spent input tokens and time, with the jouet command or rule that addresses each costly category:
jouet audit --since 7dOnce the hooks have run for a while, jouet cost lists how long each check takes on this machine, and jouet stats estimates what jouet saved, against your history from before setup. Self-winding starts proposing rules and mise tasks when the same failure or the same commands keep coming up.
Try an edit
jouet edit replace changes one string, and refuses unless the old text matches exactly once:
jouet edit replace src/main.rs --old 'let x = 1;' --new 'let x = 2;'For several replacements, or several files, hand jouet edit a spec on stdin. It checks every edit before it writes any file, so this changes both files or neither:
jouet edit <<'JOUET_EDIT'
=== src/main.rs
<<<<<<< SEARCH
let x = 1;
=======
let x = 2;
>>>>>>> REPLACE
=== Cargo.toml
<<<<<<< SEARCH
version = "0.1.0"
=======
version = "0.2.0"
>>>>>>> REPLACE
JOUET_EDITok src/main.rs 1 edit +1 -1
ok Cargo.toml 1 edit +1 -1
2 of 2 files writtenIf Cargo.toml had moved on to 0.1.1 since you read it, neither file would change, and the report would show the closest match:
not written src/main.rs 1 edit +1 -1
failed Cargo.toml 1 edit
edit 1: no match
closest at line 3 (94% similar), - spec / + file:
-version = "0.1.0"
+version = "0.1.1"
0 of 2 files writtenjouet edit covers the other spec formats, --check, --revert-on-fail and --expect-hash.
jouet notices when an agent runs it and switches to compact output by itself; see display modes.
Shell completions
With mise use -g jouet and mise activated, there is nothing to do: mise installs jouet from its signed packslip, loads its completions in bash, zsh, fish and PowerShell, and makes man jouet open the active version's page. An install through cargo does not get them.
Otherwise, jouet completion SHELL prints a completion script for bash, zsh, fish or PowerShell. The script asks the jouet on your PATH for each completion, so it needs nothing else installed and keeps up with upgrades without being regenerated.
mkdir -p ~/.local/share/bash-completion/completions
jouet completion bash > ~/.local/share/bash-completion/completions/jouetmkdir -p ~/.zfunc
jouet completion zsh > ~/.zfunc/_jouetmkdir -p ~/.config/fish/completions
jouet completion fish > ~/.config/fish/completions/jouet.fishjouet completion powershell | Out-String | Invoke-ExpressionBash needs bash-completion loaded, or source the file from ~/.bashrc. For zsh, add ~/.zfunc to fpath before compinit in ~/.zshrc:
fpath=(~/.zfunc $fpath)
autoload -Uz compinit
compinitFor PowerShell, put that line in your $PROFILE. Start a new shell afterwards.
Each release also carries the scripts (jouet.bash, jouet.zsh, jouet.fish, jouet.powershell) and a man page, jouet.1, beside the archives.
Next steps
- Agent setup and hooks: what
jouet setupinstalls for each harness, and the settings that turn each part off. - Self-winding and rules: how jouet drafts rules and tasks from what keeps going wrong, and how to write your own.
jouet test --affected,jouet waitandjouet pr status: running only the tests a change reaches, waiting on CI and other conditions, and the state of many pull requests at once.- Shared conventions: display modes, JSON output and the exit codes every command shares.