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
24 changes: 15 additions & 9 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,21 @@ $ mise set NODE_ENV=production # writes to mise.toml

:::

Here is what a `mise.toml` looks like:
Here is what a typical `mise.toml` looks like:

```toml
[tools]
node = '24'
python = '3.12'

[env]
NODE_ENV = 'production'
NODE_ENV = 'development'

[tools]
terraform = '1.0.0'
erlang = '24.0'
[tasks.dev]
run = 'npm run dev'

[tasks.build]
run = 'echo "running build tasks"'
[tasks.test]
run = 'pytest'
```

`mise.toml` files are hierarchical. The configuration in a file in the current directory will
Expand Down Expand Up @@ -474,7 +477,9 @@ mise can also be configured via environment variables. The following options are

### `MISE_DATA_DIR`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For Windows-specific defaults, it is more consistent and platform-appropriate to use Windows environment variable syntax (%VARIABLE%) and backslashes for paths. Mixing Unix-style $XDG_DATA_HOME with Windows-style %LOCALAPPDATA% on the same line can be confusing.

Suggested change
Default (Windows): %LOCALAPPDATA%\mise or %XDG_DATA_HOME%\mise

Default: `~/.local/share/mise` or `$XDG_DATA_HOME/mise`
Default (Linux): `~/.local/share/mise` or `$XDG_DATA_HOME/mise`
Default (macOS): `~/.local/share/mise` or `$XDG_DATA_HOME/mise`
Default (Windows): `%LOCALAPPDATA%\mise` or `$XDG_DATA_HOME/mise`

This is the directory where mise stores plugins and tool installs. These are not supposed to be
shared
Expand All @@ -484,6 +489,7 @@ across machines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the MISE_DATA_DIR section, the Windows default for MISE_CACHE_DIR should use consistent Windows syntax for environment variables and path separators.

Suggested change
Default (Windows): %TEMP%\mise or %XDG_CACHE_HOME%\mise

Default (Linux): `~/.cache/mise` or `$XDG_CACHE_HOME/mise`
Default (macOS): `~/Library/Caches/mise` or `$XDG_CACHE_HOME/mise`
Default (Windows): `%TEMP%\mise` or `$XDG_CACHE_HOME/mise`

This is the directory where mise stores internal cache. This is not supposed to be shared
across machines. It may be deleted at any time mise is not running.
Expand All @@ -504,7 +510,7 @@ This is the directory where mise stores system-wide configuration.

### `MISE_GLOBAL_CONFIG_FILE`

Default: `$MISE_CONFIG_DIR/config.toml` (Usually ~/.config/mise/config.toml)
Default: `$MISE_CONFIG_DIR/config.toml` (Usually `~/.config/mise/config.toml`)

This is the path to the config file.

Expand Down
16 changes: 12 additions & 4 deletions docs/dev-tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To know which tool version to use, mise will typically look for a `mise.toml` fi

```toml [mise.toml]
[tools]
node = '22'
node = '24'
python = '3'
ruby = 'latest'
```
Expand Down Expand Up @@ -275,14 +275,22 @@ mise ~/my-project/mise.toml tools: node@24.x.x # mise.toml created/updated

`mise use node@24` will install the latest version of node-24 and create/update the
`mise.toml`
config file in the local directory. Anytime you're in that directory, that version of `node` will be
used.
config file in the local directory. The resulting file looks like this:

`mise use -g node@24` will do the same but update the [global config](/configuration.html#global-config-config-mise-config-toml) (~/.config/mise/config.toml) so
```toml [mise.toml]
[tools]
node = "24"
```

Anytime you're in that directory, that version of `node` will be used.

`mise use -g node@24` will do the same but update the [global config](/configuration.html#global-config-config-mise-config-toml) (`~/.config/mise/config.toml`) so
unless there is a config file in the local directory hierarchy, node-24 will be the default version
for
the user.

You can also edit `mise.toml` directly instead of using `mise use` — the effect is the same. Run `mise install` after editing to install any new tools.

### [`mise install`](/cli/install)

`mise install` will install but not activate tools—meaning it will download/build/compile the tool
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-tools/shims.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ls -l ~/.local/share/mise/shims/node
# [...] ~/.local/share/mise/shims/node -> ~/.local/bin/mise
```

By default, the shim directory is located at `~/.local/share/mise/shims`. When installing a tool (for example, `node`), `mise` will add some entries for every binary provided by this tool in the `shims` directory (for example, `~/.local/share/mise/shims/node`).
By default, the shim directory is located at `~/.local/share/mise/shims` (on Windows: `%LOCALAPPDATA%\mise\shims`). When installing a tool (for example, `node`), `mise` will add some entries for every binary provided by this tool in the `shims` directory (for example, `~/.local/share/mise/shims/node`).

```sh
mise use -g node@20
Expand Down
39 changes: 39 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,47 @@ mise use --global github:BurntSushi/ripgrep
rg --version
```

Each `mise use` command above updates your config file. For example, after running all three globally, your `~/.config/mise/config.toml` would contain:

```toml [~/.config/mise/config.toml]
[tools]
"npm:@anthropic-ai/claude-code" = "latest"
"pipx:black" = "latest"
"github:BurntSushi/ripgrep" = "latest"
```

You can also edit `mise.toml` directly instead of using `mise use` — the effect is the same. Run `mise install` after editing to install the tools.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The note refers to mise.toml, but the example immediately preceding it shows the global configuration file ~/.config/mise/config.toml. To avoid confusion, it's better to use a more generic term like "configuration file" or explicitly mention both.

Suggested change
You can also edit `mise.toml` directly instead of using `mise use` — the effect is the same. Run `mise install` after editing to install the tools.
You can also edit the configuration file directly instead of using mise use — the effect is the same. Run mise install after editing to install the tools.


See [Backends](/dev-tools/backends/) for more ecosystems and details.

## Trusting config files {#trust}

When you or a teammate adds a `mise.toml` to a project, mise will prompt you to trust it before it runs any env directives or hooks:

```
mise ~/my-project/mise.toml is not trusted. Trust it? [y/n]
```

This is a security measure — config files can execute arbitrary code via `[env]` directives, hooks, and tasks. To trust a file, run:

```sh
mise trust
```

This only needs to be done once per file. See [`mise trust`](/cli/trust) for more details.

To disable trust prompts entirely, trust the root path:

```sh
mise settings trusted_config_paths=["/"]
```

Or set the environment variable `MISE_TRUSTED_CONFIG_PATHS=/`.

::: tip
`mise use` automatically trusts the file it creates, so you'll only see this prompt when pulling a config someone else wrote or when editing `mise.toml` by hand.
:::

## 5. Setting environment variables {#environment-variables}

Define environment variables in `mise.toml` — they'll be loaded whenever mise is activated or when using `mise exec`:
Expand Down
2 changes: 1 addition & 1 deletion docs/mise-cookbook/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ This example uses `pnpm` as the package manager. This will skip installing depen

```toml [mise.toml]
[tools]
node = '22'
node = '24'

[hooks]
# Enabling corepack will install the `pnpm` package manager specified in your package.json
Expand Down
2 changes: 1 addition & 1 deletion schema/mise.json
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@
},
"trusted_config_paths": {
"default": [],
"description": "This is a list of config paths that mise will automatically mark as trusted.",
"description": "This is a list of config paths that mise will automatically mark as trusted. Any config files under these paths will be trusted without prompting. Set to `[\"/\"]` to trust all config files, effectively disabling the trust mechanism.",
"type": "array",
"items": {
"type": "string"
Expand Down
4 changes: 3 additions & 1 deletion settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,9 @@ type = "Bool"

[trusted_config_paths]
default = []
description = "This is a list of config paths that mise will automatically mark as trusted."
description = """This is a list of config paths that mise will automatically mark as \
trusted. Any config files under these paths will be trusted without prompting. \
Set to `["/"]` to trust all config files, effectively disabling the trust mechanism."""
env = "MISE_TRUSTED_CONFIG_PATHS"
parse_env = "list_by_colon"
rust_type = "BTreeSet<PathBuf>"
Expand Down
Loading