|
1 | | -- [Getting Started | mise-en-place](https://mise.jdx.dev/getting-started.html) |
2 | | -- ## #Install |
3 | | - - #brew |
4 | | - - `brew install mise` |
5 | | -- ## `exec` and `run` |
6 | | - - `mise` can be used to install and run [tools](https://mise.jdx.dev/dev-tools/), launch [tasks](https://mise.jdx.dev/tasks/), and manage [environment variables](https://mise.jdx.dev/environments/). |
7 | | - - ``` |
8 | | - $ mise exec python@3 -- python |
9 | | - mise hint use multiple versions simultaneously with mise use python@3.12 python@3.11 |
10 | | - mise hint installing precompiled python from astral-sh/python-build-standalone |
11 | | - if you experience issues with this python (e.g.: running poetry), switch to python-build by running mise settings python.compile=1 |
12 | | - mise python@3.13.2 ✓ installed mise WARN missing: node@18.20.7 |
13 | | - Python 3.13.2 (main, Feb 12 2025, 14:59:08) [Clang 19.1.6 ] on darwin |
14 | | - Type "help", "copyright", "credits" or "license" for more information. |
15 | | - >>> exit() |
16 | | - |
17 | | - $ mise exec node@22 -- node -v |
18 | | - v22.14.0 |
19 | | - ``` |
20 | | - - [`mise x|exec`](https://mise.jdx.dev/cli/exec.html) is a powerful way to load the current `mise` context (tools & environment variables) without modifying your shell session or running ad-hoc commands with mise tools set. Installing [`tools`](https://mise.jdx.dev/dev-tools/) is as simple as running [`mise use|u`](https://mise.jdx.dev/cli/use.html). |
21 | | - - ### set a global default in the mise config |
| 1 | +# [Getting Started | mise-en-place](https://mise.jdx.dev/getting-started.html) |
| 2 | + - ## #Install |
| 3 | + - ### basic steps |
| 4 | + - #### install mise with one of the following |
| 5 | + - shell script |
| 6 | + - `curl https://mise.run | sh` |
| 7 | + - #brew (not recommended) |
| 8 | + - `brew install mise` |
| 9 | + - [[My Note]] [[2025-05-10 Sat]] - I ended up moving away from using brew to instal mise, because [[mise/self-update]] doesn't support brew installation. I may move away from this in the future if using brew to update mise seems like a more systematic way to manage the mise version. |
| 10 | + - #### add `eval "$(~/.local/bin/mise activate zsh)"` to [[zsh/.zshrc]] |
| 11 | + - You may need to run [[mise/doctor]] to verify the setup correctly. |
| 12 | + - if it states that you are out of date, you may need to run [[mise/self-update]] to update. |
| 13 | + - #### configure mise to use latest [[LTS]] version of [[NodeJS]] |
| 14 | + - `mise use --global node@lts` |
| 15 | + - #### run [[mise/install]] and then resource the [[zsh/.zshrc]] to run [[mise/activate]], then test node version |
| 16 | + - ``` |
| 17 | + $> mise install |
| 18 | + gpg: Signature made Wed Apr 23 03:25:11 2025 EDT |
| 19 | + gpg: using RSA key A6023530FC53461FEC91F99C04CD3F2FDE079578 |
| 20 | + gpg: Good signature from "ulises Gascon <ulisesgascongonzalez@gmail.com>" [unknown] |
| 21 | + mise node@22.15.0 ✓ installed |
| 22 | + |
| 23 | + $> node -v |
| 24 | + zsh: command not found: node |
| 25 | + |
| 26 | + $> . ~/.zshrc |
| 27 | + |
| 28 | + $> node -v |
| 29 | + v22.15.0 |
| 30 | + ``` |
| 31 | + - ## `exec` and `run` |
| 32 | + - `mise` can be used to install and run [tools](https://mise.jdx.dev/dev-tools/), launch [tasks](https://mise.jdx.dev/tasks/), and manage [environment variables](https://mise.jdx.dev/environments/). |
22 | 33 | - ``` |
23 | | - $ mise use --global node@22 |
24 | | - mise ~/.config/mise/config.toml tools: node@22.14.0 |
25 | | - mise exec -- node my-script.js |
26 | | - # run my-script.js with node 22... |
| 34 | + $ mise exec python@3 -- python |
| 35 | + mise hint use multiple versions simultaneously with mise use python@3.12 python@3.11 |
| 36 | + mise hint installing precompiled python from astral-sh/python-build-standalone |
| 37 | + if you experience issues with this python (e.g.: running poetry), switch to python-build by running mise settings python.compile=1 |
| 38 | + mise python@3.13.2 ✓ installed mise WARN missing: node@18.20.7 |
| 39 | + Python 3.13.2 (main, Feb 12 2025, 14:59:08) [Clang 19.1.6 ] on darwin |
| 40 | + Type "help", "copyright", "credits" or "license" for more information. |
| 41 | + >>> exit() |
| 42 | + |
| 43 | + $ mise exec node@22 -- node -v |
| 44 | + v22.14.0 |
27 | 45 | ``` |
28 | | - - ### [[mise/run]] |
29 | | - - Another useful command is [`mise r|run`](https://mise.jdx.dev/cli/run.html) which allows you to run a [`mise task`](https://mise.jdx.dev/tasks/) or a script with the `mise` context. |
30 | | - - #Tip |
31 | | - - You can set a shell alias in your shell's rc file like `alias x="mise x --"` to save some keystrokes. |
32 | | -- ## [Activate mise](https://mise.jdx.dev/getting-started.html#activate-mise) |
33 | | - - #Zsh - `echo 'eval "$(mise activate zsh)"' >> ~/.zshrc` |
34 | | - - #note - I got `mise WARN missing: python@3.12.1` the first time, then I did `RUST_BACKTRACE=1 mise exec python@3.12.1 -- python` and it worked thereafter |
35 | | - - |
| 46 | + - [`mise x|exec`](https://mise.jdx.dev/cli/exec.html) is a powerful way to load the current `mise` context (tools & environment variables) without modifying your shell session or running ad-hoc commands with mise tools set. Installing [`tools`](https://mise.jdx.dev/dev-tools/) is as simple as running [`mise use|u`](https://mise.jdx.dev/cli/use.html). |
| 47 | + - ### set a global default in the mise config |
| 48 | + - here we set the global [[NodeJS]] version used by default in [[mise]] to be the latest [[LTS]] version - `mise use --global node@lts` |
| 49 | + - [[My Note]] |
| 50 | + - [[2025-05-10 Sat]] you want need to install [[gnupg]] with [[brew/install/gnupg]] so that it can verify the signature of the downloaded nodejs version |
| 51 | + - ``` |
| 52 | + $ mise use --global node@lts |
| 53 | + mise ~/.config/mise/config.toml tools: node@22.14.0 |
| 54 | + mise exec -- node my-script.js |
| 55 | + # run my-script.js with node 22... |
| 56 | + ``` |
| 57 | + - ### [[mise/run]] |
| 58 | + - Another useful command is [`mise r|run`](https://mise.jdx.dev/cli/run.html) which allows you to run a [`mise task`](https://mise.jdx.dev/tasks/) or a script with the `mise` context. |
| 59 | + - #Tip |
| 60 | + - You can set a shell alias in your shell's rc file like `alias x="mise x --"` to save some keystrokes. |
| 61 | + - ## [Activate mise](https://mise.jdx.dev/getting-started.html#activate-mise) |
| 62 | + - #Zsh - `echo 'eval "$(mise activate zsh)"' >> ~/.zshrc` |
| 63 | + - #note - I got `mise WARN missing: python@3.12.1` the first time, then I did `RUST_BACKTRACE=1 mise exec python@3.12.1 -- python` and it worked thereafter |
| 64 | + - |
0 commit comments