Skip to content

Commit 037fa76

Browse files
committed
docs
1 parent 695e0ef commit 037fa76

22 files changed

+173
-55
lines changed

.mise.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
tasks.build.run = "bun run docs:build"
1+
tasks.dev = "bun run docs:dev"
2+
tasks.build = "bun run docs:build"
23

34
[tasks."commit-and-push"]
45
depends = ["build"]

.vitepress/config.ts

+15-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ export default defineConfig({
77
lastUpdated: true,
88
themeConfig: {
99
// https://vitepress.dev/reference/default-theme-config
10+
outline: 'deep',
1011
nav: [
11-
{ text: 'Dev Tools', link: '/dev-tools' },
12+
{ text: 'Dev Tools', link: '/dev-tools/' },
1213
{ text: 'Environments', link: '/environments' },
1314
{ text: 'Tasks', link: '/tasks/' },
1415
],
@@ -18,6 +19,7 @@ export default defineConfig({
1819
{ text: 'Getting Started', link: '/getting-started' },
1920
{ text: 'Demo', link: '/demo' },
2021
{ text: 'Configuration', link: '/configuration' },
22+
{ text: 'Plugins', link: '/plugins' },
2123
{ text: 'IDE Integration', link: '/ide-integration' },
2224
{ text: 'Continuous Integration', link: '/continuous-integration' },
2325
{ text: 'Coming from rtx', link: '/rtx' },
@@ -27,12 +29,19 @@ export default defineConfig({
2729
{ text: 'How I Use mise', link: '/how-i-use-mise' },
2830
{
2931
text: 'Dev Tools',
30-
link: '/dev-tools',
32+
link: '/dev-tools/',
3133
items: [
32-
{ text: 'Plugins', link: '/plugins' },
33-
{ text: 'Shims', link: '/shims' },
34-
{ text: 'Aliases', link: '/aliases' },
35-
{ text: 'Comparison to asdf', link: '/comparison-to-asdf' },
34+
{ text: 'Shims', link: '/dev-tools/shims' },
35+
{ text: 'Aliases', link: '/dev-tools/aliases' },
36+
{ text: 'Comparison to asdf', link: '/dev-tools/comparison-to-asdf' },
37+
{
38+
text: 'Backends',
39+
items: [
40+
{ text: 'asdf', link: '/dev-tools/backends/asdf' },
41+
{ text: 'cargo', link: '/dev-tools/backends/cargo' },
42+
{ text: 'npm', link: '/dev-tools/backends/npm' },
43+
]
44+
}
3645
],
3746
},
3847
{

about.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Its functionality is grouped into 3 categories described below.
1313

1414
`mise` installs and manages dev tools/runtimes like node, python, or terraform both
1515
simplifying installing these tools and allowing you to specify which version of these
16-
tools to use in different projects. `mise` supports [hundreds](/plugins) of dev tools.
16+
tools to use in different projects. `mise` supports [hundreds](/plugins.md) of dev tools.
1717

1818
`mise` manages environment variables letting you specify configuration like
1919
`AWS_ACCESS_KEY_ID` that may differ between projects. It can also be used to

cli/index.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<!-- MISE:COMMANDS -->
2-
32
# Commands
43

54
## `mise activate [OPTIONS] [SHELL_TYPE]`

configuration.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
outline: 'deep'
3-
---
41

52
# Configuration
63

@@ -101,7 +98,7 @@ but doesn't require a separate file.
10198
### `[aliases]` - Tool version aliases
10299

103100
The following makes `mise install node@my_custom_node` install node-20.x
104-
this can also be specified in a [plugin](/aliases).
101+
this can also be specified in a [plugin](/dev-tools/aliases.md).
105102
note adding an alias will also add a symlink, in this case:
106103

107104
~/.local/share/mise/installs/node/20 -> ./20.x.x

continuous-integration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ script: |
2020
mise x npm -- test
2121
```
2222

23-
Alternatively, you can add the [shims](/shims) directory to your `PATH`, if the CI provider allows it.
23+
Alternatively, you can add the [shims](/dev-tools/shims.md) directory to your `PATH`, if the CI provider allows it.
2424

2525
## GitHub Actions
2626

@@ -70,4 +70,4 @@ Remember to run your tools using `mise x` from your scripts:
7070

7171
```bash
7272
mise x swiftlint -- {args}
73-
```
73+
```

aliases.md dev-tools/aliases.md

File renamed without changes.

dev-tools/backends/asdf.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# asdf Backend
2+
3+
asdf is the original backend for mise. It's the default if no backend is specified,
4+
e.g.: `mise use -g riprep` will use asdf but `mise use -g cargo-riprip` will use
5+
the [cargo](./cargo) backend.
6+
7+
There are [hundreds of plugins](https://github.com/mise-plugins/registry) available in the
8+
[mise registry](https://github.com/mise-plugins) and you can also install plugins from git
9+
repos or local directories.
10+
11+
::: warning
12+
Take care using plugins as well as anything else you get from the internet. CLIs are
13+
unfortunately capable of doing a lot of damage to your system if a bad actor manages to
14+
get into your sytem through a plugin or other tool.
15+
:::
16+
17+
## Writing asdf plugins for mise
18+
19+
See the asdf documentation for more information on [writing plugins](https://asdf-vm.com/plugins/create.html).
20+
21+
_TODO: document special features only available in mise._

dev-tools/backends/cargo.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Cargo Backend <Badge type="warning" text="experimental" />
2+
3+
You may install packages directly from [Cargo Crates](https://crates.io/) even if there
4+
isn't an asdf plugin for it.
5+
6+
The code for this is inside of the mise repository at [`./src/forge/cargo.rs`](https://github.com/jdx/mise/blob/main/src/forge/cargo.rs).
7+
8+
## Dependencies
9+
10+
This relies on having `cargo` installed. You can either install it on your
11+
system via [rustup](https://rustup.rs/):
12+
13+
```sh
14+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
15+
```
16+
17+
Or you can install it via mise:
18+
19+
```sh
20+
mise use -g rust
21+
```
22+
23+
## Usage
24+
25+
The following installs the latest version of [eza](https://crates.io/crates/eza) and
26+
sets it as the active version on PATH:
27+
28+
```sh
29+
$ mise use -g cargo-eza
30+
$ eza --version
31+
eza - A modern, maintained replacement for ls
32+
v0.17.1 [+git]
33+
https://github.com/eza-community/eza
34+
```
35+
36+
The version will be set in `~/.config/mise/config.toml` with the following format:
37+
38+
```toml
39+
[tools]
40+
prettier = "latest"
41+
```
42+
43+
## Configuration
44+
45+
Set these with `mise settings set [VARIABLE] [VALUE]` or by setting the environment variable listed.
46+
47+
### `cargo_binstall`
48+
49+
* Type: `bool`
50+
* Env: `MISE_CARGO_BINSTALL`
51+
* Default: `true`
52+
53+
If true, mise will use `cargo binstall` instead of `cargo install` if
54+
[`cargo-binstall`](https://crates.io/crates/cargo-binstall) is installed and on PATH.
55+
This makes installing CLIs with cargo _much_ faster by downloading precompiled binaries.
56+
57+
You can install it with mise:
58+
59+
```sh
60+
mise use -g cargo-binstall
61+
```

dev-tools/backends/npm.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# NPM Backend <Badge type="warning" text="experimental" />
2+
3+
You may install packages directly from [npmjs.org](https://npmjs.org/) even if there
4+
isn't an asdf plugin for it.
5+
6+
The code for this is inside of the mise repository at [`./src/forge/npm.rs`](https://github.com/jdx/mise/blob/main/src/forge/npm.rs).
7+
8+
## Dependencies
9+
10+
This relies on having `npm` installed. You can install it with or without mise.
11+
Here is how to install `npm` with mise:
12+
13+
```sh
14+
mise use -g node
15+
```
16+
17+
## Usage
18+
19+
The following installs the latest version of [prettier](https://www.npmjs.com/package/prettier)
20+
and sets it as the active version on PATH:
21+
22+
```sh
23+
$ mise use -g npm-prettier
24+
$ prettier --version
25+
3.1.0
26+
```
27+
28+
The version will be set in `~/.config/mise/config.toml` with the following format:
29+
30+
```toml
31+
[tools]
32+
prettier = "latest"
33+
```

comparison-to-asdf.md dev-tools/comparison-to-asdf.md

+10
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,13 @@ where it's not possible—or at least very challenging—for us to definitively
9292
used and so we default to mise-style. While there aren't many of these, asdf-compatibility is done
9393
as a "best-effort" in order to make transitioning from asdf feel familiar for those users who can
9494
rely on their muscle memory. Ensuring asdf-syntax works with everything is not a design goal.
95+
96+
## Extra backends <Badge type="warning" text="experimental" />
97+
98+
mise has support for backends other than asdf plugins. For example you can install CLIs
99+
directly from cargo and npm:
100+
101+
```sh
102+
$ mise use -g cargo-ripgrep@14
103+
$ mise use -g npm-prettier@3
104+
```

dev-tools.md dev-tools/index.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
---
3-
41
# Dev Tools
52

63
_Like [asdf](https://asdf-vm.com) (or [nvm](https://github.com/nvm-sh/nvm) or [pyenv](https://github.com/pyenv/pyenv) but for any language) it manages dev tools like node, python, cmake, terraform, and [hundreds more](/plugins)._
@@ -16,11 +13,11 @@ directory. Other projects on your machine can use a different set of versions.
1613

1714
mise is inspired by [asdf](https://asdf-vm.com) and uses asdf's vast [plugin ecosystem](https://github.com/rtx-plugins/registry)
1815
under the hood. However, it is _much_ faster than asdf and has a more friendly user experience.
19-
For more on how mise compares to asdf, [see below](/comparison-to-asdf).
16+
For more on how mise compares to asdf, [see below](./comparison-to-asdf).
2017

2118
mise can be configured in many ways. The most typical is by `.mise.toml`, but it's also compatible
2219
with asdf `.tool-versions` files. It can also use idiomatic version files like `.node-version` and
23-
`.ruby-version`. See [Configuration](./configuration) for more.
20+
`.ruby-version`. See [Configuration](/configuration) for more.
2421

2522
* Like [direnv](https://github.com/direnv/direnv) it manages [environment variables](/configuration#env---arbitrary-environment-variables) for different project directories.
2623
* Like [make](https://www.gnu.org/software/make/manual/make.html) it manages [tasks](/tasks/) used to build and test projects.
@@ -50,6 +47,19 @@ You should note that mise does not directly install these tools.
5047
Instead, it leverages plugins to install runtimes.
5148
See [plugins](/plugins) below.
5249

50+
## Backends
51+
52+
In addition to asdf plugins, you can also directly install CLIs with some package managers.
53+
54+
* [asdf](/dev-tools/backends/asdf)
55+
* [Cargo](/dev-tools/backends/cargo) <Badge type="warning" text="experimental" />
56+
* [NPM](/dev-tools/backends/npm) <Badge type="warning" text="experimental" />
57+
58+
::: tip
59+
If you'd like to contribute a new backend to mise, they're not difficult to write.
60+
See [`./src/forge/`](https://github.com/jdx/mise/tree/main/src/forge) for examples.
61+
:::
62+
5363
## Common commands
5464

5565
Here are some of the most important commands when it comes to working with dev tools.

shims.md dev-tools/shims.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
---
3-
41
# Shims
52

63
While the PATH design of mise works great in most cases, there are some situations where shims are

directories.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
outline: 'deep'
3-
---
4-
51
# Directory Structure
62

73
The following are the directories that mise uses.

direnv.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
---
3-
41
# direnv
52

63
[direnv](https://direnv.net) and mise both manage environment variables based on directory. Because they both analyze
@@ -51,7 +48,7 @@ export MISE_PYTHON_VERSION=3.11
5148
Of course if you use `mise activate`, then these steps won't have been necessary and you can use mise
5249
as if direnv was not used.
5350

54-
If you continue to struggle, you can also try using the [shims method](./shims).
51+
If you continue to struggle, you can also try using the [shims method](dev-tools/shims.md).
5552

5653
### Do you need direnv?
5754

environments.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
outline: 'deep'
3-
---
4-
51
# Environments
62

73
Use mise to specify environment variables used for different projects. Create a `.mise.toml` file

faq.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ situations where it needs to run without the directory changing, for example if
5151
Because it runs on prompt display, if you attempt to use `mise activate` in a
5252
non-interactive session (like a bash script), it will never call `mise hook-env` and in effect will
5353
never modify PATH because it never displays a prompt. For this type of setup, you can either call
54-
`mise hook-env` manually every time you wish to update PATH, or use [shims](/shims) instead (preferred).
54+
`mise hook-env` manually every time you wish to update PATH, or use [shims](/dev-tools/shims.md) instead (preferred).
5555
Or if you only need to use mise for certain commands, just prefix the commands with
5656
[`mise x --`](./cli/#mise-exec-options-tool-version-command).
5757
For example, `mise x -- npm test` or `mise x -- ./my_script.sh`.
@@ -86,7 +86,7 @@ You can also set `MISE_LOG_FILE_LEVEL=debug MISE_LOG_FILE=/path/to/logfile` to w
8686

8787
If something is happening with the activate hook, you can try disabling it and calling `eval "$(mise hook-env)"` manually.
8888
It can also be helpful to use `mise env` which will just output environment variables that would be set.
89-
Also consider using [shims](/shims) which can be more compatible.
89+
Also consider using [shims](/dev-tools/shims.md) which can be more compatible.
9090

9191
If runtime installation isn't working right, try using the `--raw` flag which will install things in
9292
series and connect stdin/stdout/stderr directly to the terminal. If a plugin is trying to interact

getting-started.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
outline: 'deep'
3-
---
4-
51
# Getting Started
62

73
Using mise typically involves 3 steps:
@@ -31,7 +27,7 @@ mise 2024.x.x
3127

3228
### 2. Activate mise <Badge type="tip" text="optional" />
3329

34-
`mise activate` is one way to setup mise but alternatively you can use [shims](./shims), [direnv](./direnv), or skip
30+
`mise activate` is one way to setup mise but alternatively you can use [shims](dev-tools/shims.md), [direnv](./direnv), or skip
3531
this step entirely. If you skip it, then tools like `npm` and `node` will not be in PATH. You'll need to prefix
3632
commands with `mise exec` or run tasks with `mise run` in order to use tools managed with mise.
3733

index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ hero:
2323
link: https://discord.gg/UBa7pJUN7Z
2424

2525
features:
26-
- title: <a href="/dev-tools.html">Dev Tools</a>
26+
- title: <a href="/dev-tools/">Dev Tools</a>
2727
details: mise is a polyglot tool version manager. It replaces tools like <a href="https://asdf-vm.com">asdf</a>, nvm, pyenv, rbenv, etc.
2828
- title: <a href="/environments.html">Environments</a>
2929
details: mise allows you to switch sets of env vars in different project directories. It can replace <a href="https://github.com/direnv/direnv">direnv</a>.

lang/python.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
outline: 'deep'
3-
---
4-
51
# Python
62

73
The following are instructions for using the python mise core plugin. The core plugin will be used so long as no plugin is manually

plugins.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ time. They can be easily overridden by installing a plugin with the same name, e
1414

1515
You can see the core plugins with `mise plugin ls --core`.
1616

17-
- [Bun](./lang/bun)
18-
- [Deno](./lang/deno)
19-
- [Go](./lang/go)
20-
- [Java](./lang/java)
21-
- [NodeJS](./lang/node)
22-
- [Python](./lang/python)
23-
- [Ruby](./lang/ruby)
17+
- [Bun](/lang/bun)
18+
- [Deno](/lang/deno)
19+
- [Go](/lang/go)
20+
- [Java](/lang/java)
21+
- [NodeJS](/lang/node)
22+
- [Python](/lang/python)
23+
- [Ruby](/lang/ruby)
2424

2525
## Plugin Authors
2626

team.md

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const board = [
3737
}
3838
]
3939
</script>
40-
4140
# Team
4241

4342
Jeff Dickey is the primary developer behind mise. He does the bulk

0 commit comments

Comments
 (0)