Mark Pitt
claude-skills
  1. claude-skills
  2. Developer environment
  3. mise
  4. references/commands-reference.md

A file in mise

references/commands-reference.md

Markdown 8.4 KB
commands-reference.mdMarkdown, rendered

Mise Commands Reference

Complete reference for all commonly-used mise commands.

---

Tool Installation & Version Management

mise use

Installs a tool and pins the version in the nearest mise.toml. The most common way to add or change a tool.

# Pin Node.js 22 in the current project's mise.toml
mise use node@22

# Pin multiple tools at once
mise use node@22 python@3.12 go@latest

# Pin globally (writes to ~/.config/mise/config.toml)
mise use --global node@lts

# Pin with a fuzzy version pattern
mise use node@22.x

# Install without modifying config (useful in CI)
mise use --no-config node@22

mise install

Installs all tools defined in mise.toml (and any cascading config files) without modifying the config. Ideal for CI pipelines and initial project setup.

# Install everything declared in mise.toml (including parent configs)
mise install

# Install a specific tool without pinning
mise install node@22

mise exec (mise x)

Runs a command using a specific tool version without modifying any config.

# Run a command with a one-off tool version
mise x node@20 -- npm test
mise x python@3.11 -- pytest

# Shorthand
mise x node@20 -- node --version

mise run

Executes tasks defined in mise.toml. See also references/task-runner.md.

mise run build
mise run test
mise run --list              # list all available tasks
mise run --interleave build  # print stdout/stderr directly (no line buffering)
mise run --jobs 2 build      # limit parallel job count (default: 4)

# Run multiple tasks in sequence
mise run lint ::: test ::: build

mise watch

Watches source files and reruns tasks on change. Requires watchexec (mise use -g watchexec@latest).

mise watch build                        # rerun build on any file change
mise watch serve --restart              # restart dev server on change
mise watch build --exts rs              # watch only .rs files
mise watch build --filter 'src/**'      # glob filter
mise watch build --ignore 'target/**'   # exclude paths
mise watch build ::: test               # watch and rerun multiple tasks

---

Listing and Inspecting Tools

mise ls

Lists all active tools and their version status for the current directory.

mise ls                  # tools in scope for current directory
mise ls --current        # only active (installed and in-use) tools
mise ls --missing        # tools declared but not yet installed
mise ls --outdated       # tools where a newer version is available

Example output:

Tool       Version   Source             Requested
node       22.11.0   ~/project/mise.toml  22
python     3.12.7    ~/project/mise.toml  3.12

mise outdated

Shows tools that have newer versions available.

mise outdated            # all tools
mise outdated node       # specific tool

mise current

Prints the current active version of a tool, useful for quick checks.

mise current             # all tools
mise current node        # specific tool

mise where

Prints the installation path for a tool.

mise where node          # /home/user/.local/share/mise/installs/node/22.11.0

---

Upgrading and Cleanup

mise upgrade

Upgrades tools to the latest version matching the pinned constraint.

mise upgrade             # upgrade all tools
mise upgrade node        # upgrade only node (respects version constraint in mise.toml)
mise upgrade --bump      # upgrade AND rewrite version constraints in mise.toml

mise prune

Removes tool versions that are no longer referenced by any config file.

mise prune               # removes unused versions (interactive confirmation)
mise prune --dry-run     # preview what would be removed
mise prune node          # prune unused node versions only

---

Environment Inspection

mise env

Prints the environment variables mise would set for the current directory. Useful for debugging.

mise env                 # show all env vars as export statements
mise env --json          # JSON output  
mise env NODE_ENV        # show a specific variable

mise doctor

Diagnoses shell integration issues, PATH conflicts, and configuration problems.

mise doctor              # comprehensive environment health check

Common issues reported:

  • Shell not activated (missing eval "$(mise activate zsh)")
  • asdf or nvm shims appearing before mise shims in PATH
  • Missing tool versions
  • Invalid mise.toml syntax

---

Configuration Inspection

mise config

Shows the active configuration hierarchy for the current directory.

mise config              # list all config files in scope
mise config ls           # same as above
mise config get          # dump merged configuration

mise settings

Reads and writes mise settings.

mise settings             # show all settings
mise settings get experimental  # read a setting
mise settings set experimental true  # write a setting

---

Plugin Management

mise plugins

Lists and manages tool backends/plugins.

mise plugins ls          # list installed plugins
mise plugins ls --all    # list all available plugins (from registry)
mise plugins install <name>  # install a plugin
mise plugins update      # update all plugins
mise plugins uninstall <name>

---

Shim Management

Mise can operate in two modes: PATH-based (recommended, via shell activation) and shim-based (for environments where you cannot modify PATH).

mise reshim              # regenerate shims after manual changes
mise shims               # list all shim executables

---

Useful One-liners

# Check which mise.toml is setting a particular tool
mise ls node --json | jq '.[].source'

# List all versions of a tool available to install
mise ls-remote node

# Install mise in CI without shell interaction
curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin sh

# Run a task with a specific environment
MISE_ENV=production mise run deploy

# Print what mise.toml would look like after 'use'
mise use --dry-run node@22

---

Trust Management

mise trust

Config files must be trusted before [env], templates, and path: plugin versions are active. See also references/core-concepts.md.

mise trust              # trust mise.toml in current directory
mise trust --all        # trust all configs in directory tree
mise trust --show       # show trust status of current configs
mise untrust            # revoke trust (prompts before ignoring)

---

Scaffolding and Utilities

mise generate

Scaffolds configuration files for common integrations:

mise generate github-action    # GitHub Actions workflow that installs mise and runs tasks
mise generate devcontainer     # VS Code devcontainer configuration
mise generate git-pre-commit --task lint  # .git/hooks/pre-commit running a mise task
mise generate task-docs        # markdown documentation from task descriptions
mise generate bootstrap        # bootstrap installer script
mise generate config           # generates a mise.toml from current environment

mise fmt

Formats mise.toml in place (normalises whitespace and key ordering):

mise fmt
mise fmt --check    # exit non-zero if formatting needed (useful in CI)

mise shell / mise en

Spawns a subshell (or runs a command) with specific tool versions active, without modifying config:

mise shell node@20 python@3.11  # open subshell with those versions
mise en node@20 -- npm test     # run one command then exit (no subshell)

mise self-update

Updates the mise binary itself:

mise self-update
mise self-update --version 2024.12.1   # pin to a specific release

---

Exit Codes

CodeMeaning
0Success
1General error
2Tool not found or not installed
3Configuration error

---

Environment Variables for Scripting

Mise behaviour can be controlled via environment variables, useful in CI:

VariableEffect
MISE_DATA_DIROverride the data directory (default: ~/.local/share/mise)
MISE_CONFIG_DIROverride the config directory (default: ~/.config/mise)
MISE_VERBOSE=1Enable verbose output
MISE_DEBUG=1Enable debug output
MISE_QUIET=1Suppress non-error output
MISE_YES=1Auto-confirm all prompts
MISE_NOT_FOUND_AUTO_INSTALL=falseDisable auto-install on missing tool