@capotej/pi-mise
Automatically activates mise when a mise.toml, .mise.toml, or .tool-versions file is found in the project
Package details
Install @capotej/pi-mise from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@capotej/pi-mise- Package
@capotej/pi-mise- Version
1.2.0- Published
- Jul 30, 2026
- Downloads
- 185/mo · 32/wk
- Author
- capotej
- License
- MIT
- Types
- extension, skill
- Size
- 23.5 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
],
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@capotej/pi-mise
Auto-activates mise for pi coding sessions.
When this pi package is installed and a mise.toml, .mise.toml, or .tool-versions file is detected in the project root, it automatically:
- Trusts the mise configuration (idempotent, safe)
- Follows
cdinto other repos/subdirs and trusts their configs too, so the activate hook stays quiet on directory changes - Re-trusts after mutation — when the agent edits a config (
write/edit) or runsmise use, trust is re-applied before the next command, because mise revokes trust on change - Prepends a stderr-tolerant
mise activateto everybashtool call, ensuring commands run with the correct tool versions and that non-fatal mise output never fails the actual command - Contributes the
miseskill for edge cases (manual install, trust, tasks)
Installation
pi install @capotej/pi-mise
How It Works
- On session start, the extension checks if
miseis available inPATH - It scans the project root for mise config files (
mise.toml,.mise.toml,.tool-versions) - If a config is found, it runs
mise trustso mise won't prompt for trust, and remembers it - Every subsequent
bashtool call is prefixed with a stderr-tolerant activation:
so the LLM's commands run with mise-managed tools oneval "$(mise activate bash 2>/dev/null)" 2>/dev/null || true && <command>PATH. If activation hiccups (e.g. an untrusted config somewhere), the failure is swallowed and the real command still runs - Before each
bashtool call, anycd <target>in the command is parsed and those configs are trusted first (cached, so already-trusted dirs aren't re-checked) - After a config is mutated (
write/editto a config file, ormise use/redirection in a command), the trust cache is invalidated so the next command re-trusts - A notification is shown when mise is activated (or if mise is missing)
If no mise config file is found in the project root, the extension does nothing — zero overhead.
Note: Auto-installing
miseis intentionally not done — this extension runs only where mise is guaranteed present. A missing binary is reported and activation is skipped.
Requirements
misemust be installed and available inPATH- A mise config file (
mise.toml,.mise.toml, or.tool-versions) in the project root
The mise Skill
This package also contributes a mise skill that teaches the LLM how to:
- Use
mise execfor one-off commands - Run mise tasks with
mise run - Install tools with
mise install - Handle trust, activation, and common pitfalls
Note: When the pi-mise extension is active, mise activation is already prepended to every bash command. The skill instructs the LLM not to manually add
eval "$(mise activate bash)"— it's handled automatically.
Development
# Install dependencies
pnpm install
# Build (compile src/ -> dist/ with tsc)
pnpm build
# Test (pure parsers via node:test)
pnpm test
# Lint (CI gate)
pnpm lint
# Auto-fix lint findings
pnpm lint:fix
# Format in place
pnpm format
# Check formatting only (CI gate)
pnpm format:check
Tooling: TypeScript 7 (tsc) for compile, oxfmt for formatting, oxlint for linting. Source lives in src/ and compiles to dist/ (gitignored).
License
MIT © Julio Capote