Skip to content

jdx/mise-env-plugin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mise-env-plugin-template

Template for creating mise environment plugins.

Environment plugins allow you to set environment variables and PATH entries dynamically based on configuration.

Getting Started

  1. Click "Use this template" to create your own plugin repository
  2. Update metadata.lua with your plugin information
  3. Implement hooks/mise_env.lua to set environment variables
  4. Optionally implement hooks/mise_path.lua to add PATH entries

Plugin Structure

├── 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

Hooks

mise_env.lua

Returns a list of environment variables to set:

function PLUGIN:MiseEnv(ctx)
    return {
        { key = "MY_VAR", value = "my_value" }
    }
end

mise_path.lua

Returns a list of paths to prepend to PATH:

function PLUGIN:MisePath(ctx)
    return { "/path/to/bin" }
end

Development

# Install development tools
mise install

# Run linter
mise run lint

# Fix linting issues
mise run lint-fix

Documentation

About

Template for creating mise environment plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors