Configure and operate Mise for deterministic developer environments. Use when installing runtime/tool versions, defining reusable tasks, managing layered environment variables, migrating from asdf/nvm/pyenv, or debugging mise.toml behavior in CI and local shells. Keywords: mise, mise.toml, tool versions, tasks, env, asdf migration, setup automation, dev environment.
Overall
score
99%
Does it follow best practices?
Validation for skill structure
Mise uses a hierarchical configuration system where more specific configurations override more general ones.
mise.local.toml)mise.toml)~/.config/mise/config.toml)/etc/mise/config.toml)# /etc/mise/config.toml (system-wide)
[env]
EDITOR = "vi"
LOG_LEVEL = "info"
# ~/.config/mise/config.toml (user global)
[env]
EDITOR = "code" # Overrides system
GIT_EDITOR = "code --wait"
# ~/projects/myapp/mise.toml (project)
[env]
LOG_LEVEL = "debug" # Overrides global
API_URL = "https://api.example.com"
# ~/projects/myapp/mise.local.toml (local)
[env]
API_URL = "http://localhost:3000" # Overrides project
DEBUG = "true"Result:
EDITOR = "code" (from global, overrides system)GIT_EDITOR = "code --wait" (from global)LOG_LEVEL = "debug" (from project, overrides global)API_URL = "http://localhost:3000" (from local, overrides project)DEBUG = "true" (from local)Location: ~/.config/mise/config.toml
# Global settings for all projects
[env]
EDITOR = "code"
BROWSER = "firefox"
GIT_EDITOR = "code --wait"
LANG = "en_US.UTF-8"
# Global PATH additions
[env]
_.path = ["$HOME/.local/bin", "$HOME/bin"]Use for:
Location: /etc/mise/config.toml
# System-wide settings (requires root)
[env]
CORPORATE_PROXY = "http://proxy.company.com:8080"
COMPANY_REGISTRY = "https://registry.company.com"Use for:
Location: <project>/mise.toml
# Committed to version control
[tools]
node = "20"
python = "3.11"
[env]
NODE_ENV = "development"
API_URL = "https://api.example.com"
DATABASE_URL = "postgresql://localhost/myapp_dev"
[env]
_.file = [".env", ".env.local"]Use for:
Location: <project>/mise.local.toml
# Git-ignored, developer-specific
[env]
DATABASE_URL = "postgresql://localhost/myapp_johndoe"
DEBUG = "true"
LOG_LEVEL = "trace"Use for:
Mise searches up the directory tree for configuration files:
/home/user/projects/myapp/services/api/
├── mise.toml (api service config)
└── src/
└── (working directory)
/home/user/projects/myapp/
└── mise.toml (root project config)
/home/user/
└── .config/mise/config.toml (global config)Working in /home/user/projects/myapp/services/api/src/:
/home/user/.config/mise/config.toml (global)/home/user/projects/myapp/mise.toml (root project)/home/user/projects/myapp/services/api/mise.toml (service)# mise.toml
[env]
NODE_ENV = "development"
_.file = ".env.{{ env.NODE_ENV }}"# .env.development
API_URL=http://localhost:3000
DATABASE_URL=postgresql://localhost/myapp_dev
DEBUG=true
# .env.staging
API_URL=https://staging-api.example.com
DATABASE_URL=postgresql://staging-db/myapp
DEBUG=false
# .env.production
API_URL=https://api.example.com
DATABASE_URL=postgresql://prod-db/myapp
DEBUG=false# Development (default)
cd project
echo $API_URL # http://localhost:3000
# Staging
NODE_ENV=staging mise env
# or
echo 'NODE_ENV = "staging"' > mise.local.toml
# Production
NODE_ENV=production mise exec -- node app.jsmyapp/
├── mise.toml # Root config
├── packages/
│ ├── api/
│ │ └── mise.toml # API-specific config
│ ├── web/
│ │ └── mise.toml # Web-specific config
│ └── shared/
│ └── mise.toml # Shared config# myapp/mise.toml
[tools]
node = "20"
[env]
PROJECT_ROOT = "{{ config_root }}"
NODE_ENV = "development"# myapp/packages/api/mise.toml
[env]
API_PORT = "3000"
DATABASE_URL = "postgresql://localhost/myapp_api"
LOG_LEVEL = "debug"
# Inherits NODE_ENV and PROJECT_ROOT from root# myapp/packages/web/mise.toml
[env]
WEB_PORT = "8080"
API_URL = "http://localhost:3000"
# Inherits NODE_ENV and PROJECT_ROOT from root# mise.toml (committed)
[tools]
node = "20"
[env]
NODE_ENV = "development"
API_URL = "http://localhost:3000"
# Load secret files
[env]
_.file = [".env", ".env.local", ".env.secrets"]# .env (committed)
NODE_ENV=development
PORT=3000
# .env.local (git-ignored)
DATABASE_URL=postgresql://localhost/myapp_johndoe
# .env.secrets (git-ignored)
API_SECRET=super-secret-key
JWT_SECRET=another-secret# Ignore local overrides
mise.local.toml
.env.local
.env.secrets
*.secret# mise.toml (committed)
[env]
DATABASE_HOST = "localhost"
DATABASE_PORT = "5432"
DATABASE_NAME = "myapp_dev"
# DATABASE_PASSWORD loaded from .env.secrets# .env.secrets (git-ignored)
DATABASE_PASSWORD=secret123[env]
# Use different paths based on OS
JAVA_HOME = "{{ if eq .os 'darwin' }}/Library/Java/Home{{ else }}/usr/lib/jvm/default{{ end }}"[tools]
python = "3.11"
[env]
# Only set if Python is installed
PYTHON_PATH = "{{ config_root }}/.venv"
_.path = ["{{ config_root }}/.venv/bin"]# Show final merged environment
mise env
# Show configuration sources
mise config ls
# Show configuration for specific directory
mise env -C /path/to/project# Check which files are loaded
mise doctor
# Validate configuration syntax
mise config validate
# Show configuration as JSON
mise config show --json~/.config/mise/config.tomlmise.toml (committed)mise.local.toml (ignored).env.example to document required variables# ~/.config/mise/config.toml (personal preferences)
[env]
EDITOR = "code"
# project/mise.toml (team settings)
[env]
NODE_ENV = "development"
API_URL = "https://api.example.com"
# project/mise.local.toml (your overrides)
[env]
API_URL = "http://localhost:3000"
DEBUG = "true"# mise.toml
[env]
ENV = "development"
_.file = ".env.{{ env.ENV }}"
# Override environment
# mise.local.toml
[env]
ENV = "staging" # Now loads .env.staging# mise.toml - DON'T DO THIS
[env]
API_SECRET = "secret-key-123"# mise.toml
[env]
_.file = ".env.secrets"
# .env.secrets (git-ignored)
API_SECRET=secret-key-123# Don't repeat in every mise.toml
[env]
EDITOR = "code"
BROWSER = "firefox"# ~/.config/mise/config.toml
[env]
EDITOR = "code"
BROWSER = "firefox"[env]
DATABASE_URL = "postgresql://localhost/myapp_dev"[env]
_.file = ".env.{{ env.NODE_ENV }}"