CtrlK
BlogDocsLog inGet started
Tessl Logo

pantheon-ai/mise-complete

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

Overview
Skills
Evals
Files

env-definition.mdreferences/

Environment Variable Definition

Overview

Mise manages environment variables through the [env] section in mise.toml, providing automatic loading when entering project directories.

Basic Definition

[env]
NODE_ENV = "development"
DEBUG = "true"
API_URL = "http://localhost:3000"
DATABASE_URL = "postgresql://localhost/myapp_dev"

Variable Types

String Values

[env]
APP_NAME = "My Application"
VERSION = "1.0.0"

Numeric Values

[env]
PORT = "3000"
MAX_CONNECTIONS = "100"
TIMEOUT_MS = "30000"

Boolean Values

[env]
ENABLE_CACHE = "true"
DEBUG_MODE = "false"
PRODUCTION = "false"

Multi-line Values

[env]
PRIVATE_KEY = """
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA...
-----END RSA PRIVATE KEY-----
"""

Template Variables

Use template syntax to reference other variables and built-in values:

[env]
PROJECT_ROOT = "{{ config_root }}"
DATA_DIR = "{{ config_root }}/data"
LOG_FILE = "{{ config_root }}/logs/app.log"

Built-in Template Variables

  • {{ config_root }}: Directory containing mise.toml
  • {{ cwd }}: Current working directory

Variable Interpolation

[env]
API_URL = "http://localhost:3000"
WEB_URL = "http://localhost:8080"
CALLBACK_URL = "{{ env.API_URL }}/callback"

PATH Management

Adding to PATH

[env]
_.path = [
  "{{ config_root }}/bin",
  "{{ config_root }}/scripts",
  "{{ config_root }}/node_modules/.bin"
]

PATH Order

Paths are prepended in the order listed:

[env]
_.path = [
  "./bin",           # Highest priority
  "./scripts",
  "$HOME/.local/bin" # Lowest priority
]

Environment File Loading

Loading from .env Files

[env]
_.file = ".env"

Multiple Environment Files

[env]
_.file = [
  ".env",
  ".env.local",
  ".env.{{ env.NODE_ENV }}"
]

Files are loaded in order; later files override earlier ones.

Conditional File Loading

# .env.development
DATABASE_URL=postgresql://localhost/myapp_dev
DEBUG=true

# .env.production
DATABASE_URL=postgresql://prod-server/myapp
DEBUG=false
[env]
NODE_ENV = "development"
_.file = ".env.{{ env.NODE_ENV }}"

Tool-Specific Environments

Python Virtual Environment

[tools]
python = "3.11"

[env]
VIRTUAL_ENV = "{{ config_root }}/.venv"
_.path = ["{{ config_root }}/.venv/bin"]

Node.js Environment

[tools]
node = "20"

[env]
NODE_ENV = "development"
NODE_OPTIONS = "--max-old-space-size=4096"
_.path = ["{{ config_root }}/node_modules/.bin"]

Go Environment

[tools]
go = "1.21"

[env]
GOPATH = "{{ config_root }}/.go"
GOBIN = "{{ config_root }}/.go/bin"
_.path = ["{{ config_root }}/.go/bin"]

Rust Environment

[tools]
rust = "stable"

[env]
CARGO_HOME = "{{ config_root }}/.cargo"
RUSTUP_HOME = "{{ config_root }}/.rustup"
_.path = ["{{ config_root }}/.cargo/bin"]

Environment Scopes

Project-Level (mise.toml)

# mise.toml
[env]
PROJECT_NAME = "my-app"
API_URL = "http://localhost:3000"

Global (~/.config/mise/config.toml)

# ~/.config/mise/config.toml
[env]
EDITOR = "code"
BROWSER = "firefox"

Local Override (mise.local.toml)

# mise.local.toml (git-ignored)
[env]
DATABASE_URL = "postgresql://localhost/myapp_johndoe"
DEBUG = "true"

Priority: mise.local.toml > mise.toml > global config

Sensitive Data Handling

Separate Secret Files

# mise.toml (committed)
[env]
NODE_ENV = "development"
_.file = [".env", ".env.local"]

# .env (committed)
API_URL=http://localhost:3000
PORT=3000

# .env.local (git-ignored)
API_SECRET=super-secret-key
DATABASE_PASSWORD=secret123

.gitignore Configuration

.env.local
mise.local.toml
*.secret

Mise Environment Variables

Built-in Variables

Automatically set by Mise:

  • MISE_CONFIG_ROOT: Directory containing mise.toml
  • MISE_PROJECT_ROOT: Project root directory
  • MISE_DATA_DIR: Mise data directory (~/.local/share/mise)
  • MISE_CACHE_DIR: Mise cache directory
  • MISE_INSTALL_PATH: Installation path for tools

Using Built-in Variables

[env]
APP_ROOT = "{{ env.MISE_PROJECT_ROOT }}"
CACHE_DIR = "{{ env.MISE_CACHE_DIR }}/my-app"

Common Patterns

Database Configuration

[env]
DB_HOST = "localhost"
DB_PORT = "5432"
DB_NAME = "myapp_dev"
DB_USER = "postgres"
DATABASE_URL = "postgresql://{{ env.DB_USER }}@{{ env.DB_HOST }}:{{ env.DB_PORT }}/{{ env.DB_NAME }}"

API Configuration

[env]
API_HOST = "localhost"
API_PORT = "3000"
API_PROTOCOL = "http"
API_URL = "{{ env.API_PROTOCOL }}://{{ env.API_HOST }}:{{ env.API_PORT }}"

Feature Flags

[env]
FEATURE_NEW_UI = "true"
FEATURE_BETA_API = "false"
FEATURE_ANALYTICS = "true"

Best Practices

  1. Separate Public and Private: Commit public config, ignore secrets
  2. Use Descriptive Names: DATABASE_URL not DB_URL
  3. Document Variables: Add comments explaining purpose
  4. Use Templates: Leverage {{ config_root }} for paths
  5. Environment-Specific Files: Use .env.development, .env.production
  6. Version Control: Commit .env.example, ignore .env.local

Anti-Patterns

❌ Don't: Commit Secrets

[env]
API_SECRET = "my-secret-key-123"  # DON'T DO THIS

✅ Do: Use .env.local

# mise.toml
[env]
_.file = [".env", ".env.local"]

# .env.local (git-ignored)
API_SECRET=my-secret-key-123

❌ Don't: Hardcode Paths

[env]
DATA_DIR = "/Users/john/projects/myapp/data"

✅ Do: Use Template Variables

[env]
DATA_DIR = "{{ config_root }}/data"

❌ Don't: Duplicate Global Config

# In every project's mise.toml
[env]
EDITOR = "code"
BROWSER = "firefox"

✅ Do: Use Global Config

# ~/.config/mise/config.toml
[env]
EDITOR = "code"
BROWSER = "firefox"

Install with Tessl CLI

npx tessl i pantheon-ai/mise-complete@0.1.0

references

config-anti-patterns.md

config-best-practices.md

config-management.md

config-structure.md

env-definition.md

env-hierarchies.md

env-loading.md

env-patterns.md

tasks-definition.md

tasks-execution.md

tasks-organization.md

tasks-patterns.md

tools-installation.md

tools-migration.md

tools-plugins.md

tools-versions.md

SKILL.md

tile.json