mise Setup
Configure mise (modern tool version manager) for any project.
Prerequisites
bash
brew install mise # Add to shell: eval "$(mise activate zsh)"
Workflow
- •Detect project type (look for pyproject.toml, package.json, go.mod, etc.)
- •Create
mise.tomlwith appropriate tools - •Run
mise trust && mise install - •Test with
mise doctor
Project Detection
| File | Type | Recommended Tools |
|---|---|---|
pyproject.toml | Python | python, uv, ruff |
package.json | Node | node, bun or pnpm |
go.mod | Go | go, golangci-lint |
Cargo.toml | Rust | rust |
*.sh | Shell | shellcheck, shfmt |
| Any | Universal | typos, taplo |
mise.toml Template
toml
[tools] # Add tools based on project type [env] # Environment variables and venv config [tasks] # Custom tasks (optional)
Project Templates
Python
toml
[tools]
python = "3.13"
uv = "latest"
ruff = "latest"
[env]
_.python.venv = { path = ".venv", create = true }
The _.python.venv setting:
- •Auto-creates
.venvwhen entering the directory - •Activates the venv (sets
VIRTUAL_ENV, prepends toPATH) - •Works with
uvfor fast package management
Node.js
toml
[tools] node = "22" bun = "latest"
Or with pnpm:
toml
[tools] node = "22" pnpm = "latest"
Go
toml
[tools] go = "1.23" golangci-lint = "latest"
Rust
toml
[tools] rust = "stable"
Multi-language
toml
[tools]
# Languages
python = "3.13"
node = "22"
go = "1.23"
# Python env
uv = "latest"
# Linters (for hk pre-commit hooks)
shellcheck = "latest"
shfmt = "latest"
ruff = "latest"
taplo = "latest"
typos = "latest"
[env]
_.python.venv = { path = ".venv", create = true }
Universal Tools
Add to any project for code quality:
toml
[tools] typos = "latest" # Spell checker taplo = "latest" # TOML linter shellcheck = "latest" # Shell linter shfmt = "latest" # Shell formatter
Tasks
Define project-specific commands:
toml
[tasks]
dev = "npm run dev"
test = "pytest"
lint = "ruff check ."
build = "npm run build"
# Task with dependencies
ci = { depends = ["lint", "test"] }
# Task with description
deploy = { run = "./deploy.sh", description = "Deploy to production" }
Run with mise run <task> or mise r <task>.
Environment Variables
toml
[env] DATABASE_URL = "postgres://localhost/dev" DEBUG = "true" # Load from .env file _.file = ".env" # Path modifications _.path = ["./bin", "./scripts"]
Commands
bash
mise install # Install all tools mise trust # Trust the config file mise doctor # Check mise health mise ls # List installed tools mise run <task> # Run a task mise use <tool> # Add tool to config mise upgrade # Upgrade all tools
Tips
- •Pin versions for reproducibility:
python = "3.13.1"not"latest" - •Use
latestfor dev tools that don't affect builds: linters, formatters - •Add
.venv/to.gitignorewhen using Python venv - •Pair with hk-setup for pre-commit hooks using the same linters
Resources
- •mise Documentation
- •Tool Registry - All available tools
- •Configuration Reference