mise/Tool/Explanation/When to Declare Tools
Properties
- tags
- mise, Diataxis/Explanation
When to Declare mise/Tools
Overview
[tools]pins a versioned binary and gives you a mise/Shim; tasks merely use whatever is already onPATH.- Mise can be used to install and run tools, launch tasks, and manage environment variables. Choosing where a command lives decides whether it is upgraded by
miseor by the command's own update mechanism.
Context
- New users often add every CLI to
[tools], then wonder whynpx prettierorpipx some-appdiscovers a newer version thanprettier --versionrun directly. - The clash is most visible with Node CLIs such as Claude Code: a shimmed
claudefroze at0.2.115whilenpx @anthropic-ai/claude-codeupdated to1.0.11.
- New users often add every CLI to
Key Principles
- Pin runtimes & long-lived CLIs. Anything you expect teammates or CI to call directly (
python,terraform,aws_okta_keyman) belongs in[tools]. See Dev Tools Overview. - On-demand wrappers stay in tasks. Commands that bootstrap themselves each run (
npx,go run,cargo install --locked) should be invoked inside therun = "..."line. See Tasks Guide. - One source of truth. A given binary should be provided either by a shim or by its own downloader—never both.
- Pin runtimes & long-lived CLIs. Anything you expect teammates or CI to call directly (
Mechanism
- Shims & activation. When a tool lives in
[tools],miseinstalls it and places a shim earlier inPATH. Runningprettieroraws_okta_keymannow hits that shim. See How it works. exec/run. Tasks inherit the full "mise context" (all shims & env-vars) viamise runormise exec.- Examples:
- Shims & activation. When a tool lives in
Examples
Misconceptions
- "
npxwill respect my[tools]pin." Not true;npxdownloads a fresh copy into its own cache, bypassing shims. See npx and mise. - "
pipx:entries auto-update on every run." They install once; updates come frommise upor version bumps. - "Tasks require the tool in
[tools]. Tasks can run any shell command;[tools]is only needed if that command expects the shim.
- "
Related
- Dev Tools overview – how shims, plugins, and backends work
- Tasks guide – writing
run = "..."blocks withmise runcontext - Configuration reference – complete
mise.tomlschema