Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,18 @@ You can also have environment specific config files like `.mise.production.toml`

### `[tools]` - Dev tools

See [Tools](/dev-tools/).
See [Tools](/dev-tools/). In addition to specifying versions, each tool entry can include options such as:

- `os`: Restrict installation to certain operating systems
- `install_env`: Environment vars used during install
- `postinstall`: Command to run after installation completes for that specific tool

Examples:

```toml
[tools]
node = { version = "22", postinstall = "corepack enable" }
```

### `[env]` - Arbitrary Environment Variables

Expand Down
15 changes: 15 additions & 0 deletions docs/dev-tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,21 @@ port = 6379

Internally, nested options are flattened to dot notation (e.g., `platforms.macos-x64.url`, `database.host`, `cache.redis.port`) for backend access.

### Tool postinstall commands

Run a command immediately after a tool finishes installing by adding a `postinstall` field to that tool's configuration. This is separate from `[hooks].postinstall` and applies only to when a specific tool is installed.

```toml
[tools]
node = { version = "22", postinstall = "corepack enable" }
```

Behavior:
- The command runs once the install completes successfully for that tool/version.
- The tool's bin path is on PATH during the command, so you can invoke the installed tool directly.
- Environment variables include `MISE_TOOL_INSTALL_PATH` pointing to the tool's install directory.
- If the install fails, the `postinstall` command is not run.

## OS-Specific Tools

You can restrict tools to specific operating systems using the `os` field:
Expand Down
Loading