Template for creating mise environment plugins.
Environment plugins allow you to set environment variables and PATH entries dynamically based on configuration.
- Click "Use this template" to create your own plugin repository
- Update
metadata.luawith your plugin information - Implement
hooks/mise_env.luato set environment variables - Optionally implement
hooks/mise_path.luato add PATH entries
├── metadata.lua # Plugin metadata (name, version, etc.)
├── hooks/
│ ├── mise_env.lua # Environment variables hook (required)
│ └── mise_path.lua # PATH entries hook (optional)
├── .luarc.json # Lua language server configuration
├── hk.pkl # hk linter configuration
├── mise.toml # mise configuration for development
└── .github/workflows/
└── ci.yml # GitHub Actions CI
Returns a list of environment variables to set:
function PLUGIN:MiseEnv(ctx)
return {
{ key = "MY_VAR", value = "my_value" }
}
endReturns a list of paths to prepend to PATH:
function PLUGIN:MisePath(ctx)
return { "/path/to/bin" }
end# Install development tools
mise install
# Run linter
mise run lint
# Fix linting issues
mise run lint-fix