-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs: add Windows default paths and mise.toml examples alongside CLI commands #8926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a5bd463
ada148d
0659ee3
ed15f04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -474,7 +477,9 @@ mise can also be configured via environment variables. The following options are | |
|
|
||
| ### `MISE_DATA_DIR` | ||
|
|
||
| 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 | ||
|
|
@@ -484,6 +489,7 @@ across machines. | |
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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. | ||
|
|
@@ -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. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The note refers to
Suggested change
|
||||||
|
|
||||||
| 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`: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_HOMEwith Windows-style%LOCALAPPDATA%on the same line can be confusing.