mise-env-directives

Automate environment variable loading, composing, and validation for Mise.toml configurations.

1|1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ray-manaloto/claude-code-marketplace --skill mise-env-directives
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mise-env-directives
Source: https://github.com/ray-manaloto/claude-code-marketplace/tree/main/mise-toolkit/skills/mise-env-directives
Command: npx skills add https://github.com/ray-manaloto/claude-code-marketplace --skill mise-env-directives

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps manage complex environment variable configuration for Mise projects by enabling loading, combining, and validating vars from files, scripts, and plugins.

Core Features & Use Cases

  • Load vars from dotenv/.env, JSON, or YAML files using _.file with config_root resolution.
  • Extend PATH and source scripts using _.path and _.source with support for templates and lazy evaluation via tools.
  • Use plugin-driven env directives and two-pass evaluation to ensure tool-provided vars are available.
  • Define required vars with helpful messages and redact secrets for safe logging.
  • Manage multiple env blocks with [[env]] and leverage templates and shell-style expansion to compose final env state.

Quick Start

Configure your mise.toml with an _.file directive to load environment variables from a file and reference them in your shell.

Frequently Asked Questions about mise-env-directives

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load environment variables from a dotenv file in Mise.toml?

To load environment variables from a dotenv file in Mise, use the `_.file` directive within your `mise.toml` configuration. This automatically reads and applies vars from `.env`, JSON, or YAML files using `config_root` resolution for accurate local project path mapping.

Can I define required environment variables and redact secrets for safe logging in Mise?

Yes, Mise supports defining required environment variables with helpful missing messages and allows you to redact secrets for safe logging. This ensures your CI pipelines and multi-project workspaces validate necessary vars without exposing sensitive configuration data.

What is the best way to extend PATH and source scripts dynamically in Mise?

The best way to extend PATH and source scripts dynamically in Mise is by using the `_.path` and `_.source` directives. These support template rendering and lazy evaluation via tools, ensuring scripts and paths are evaluated only when needed across your multi-project workspaces.

How does Mise handle plugin-driven env directives and tool-provided variables?

Mise handles plugin-driven env directives using a two-pass evaluation mechanism to ensure tool-provided vars are fully available. This process evaluates plugin-based env configurations before composing the final environment state, preventing missing variable errors during script execution.

Can I manage multiple environment blocks and compose final env state in Mise?

Yes, you can manage multiple environment blocks in Mise using the `[[env]]` configuration syntax. This allows you to leverage templates and shell-style expansion to compose the final env state by combining vars loaded from files, scripts, and plugins.

Does Mise environment variable management work for CI pipelines and multi-project workspaces?

Mise environment variable management is explicitly designed to work across local projects, CI pipelines, and multi-project workspaces. It automates loading, composing, and validating vars from files, scripts, and plugins regardless of your deployment environment.