@jdxcode/mise 2025.3.10 → 2025.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,30 +20,27 @@
|
|
|
20
20
|
- Like [direnv](https://github.com/direnv/direnv) it manages [environment variables](https://mise.jdx.dev/environments/) for different project directories.
|
|
21
21
|
- Like [make](https://www.gnu.org/software/make/manual/make.html) it manages [tasks](https://mise.jdx.dev/tasks/) used to build and test projects.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Demo
|
|
24
24
|
|
|
25
|
-
The following shows
|
|
26
|
-
of [node](https://nodejs.org).
|
|
25
|
+
The following demo shows how to install and use `mise` to manage multiple versions of `node` on the same system.
|
|
27
26
|
Note that calling `which node` gives us a real path to node, not a shim.
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
It also shows that you can use `mise` to install and many other tools such as `jq`, `terraform`, or `go`.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
[](https://mise.jdx.dev/demo.html)
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
See [demo transcript](https://mise.jdx.dev/demo.html).
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
2025.3.10 macos-arm64 (a1b2d3e 2025-03-26)
|
|
39
|
-
```
|
|
34
|
+
## Quickstart
|
|
35
|
+
|
|
36
|
+
### Install mise
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
See [Getting started](https://mise.jdx.dev/getting-started.html) for more options.
|
|
42
39
|
|
|
43
40
|
```sh-session
|
|
44
|
-
$ curl https://mise.run |
|
|
41
|
+
$ curl https://mise.run | sh
|
|
45
42
|
$ ~/.local/bin/mise --version
|
|
46
|
-
|
|
43
|
+
2025.4.0 macos-arm64 (a1b2d3e 2025-04-01)
|
|
47
44
|
```
|
|
48
45
|
|
|
49
46
|
Hook mise into your shell (pick the right one for your shell):
|
|
@@ -57,14 +54,103 @@ echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish
|
|
|
57
54
|
echo '~/.local/bin/mise activate mise activate pwsh | Out-String | Invoke-Expression' >> ~/.config/powershell/Microsoft.PowerShell_profile.ps1
|
|
58
55
|
```
|
|
59
56
|
|
|
60
|
-
|
|
57
|
+
### Execute commands with specific tools
|
|
61
58
|
|
|
62
59
|
```sh-session
|
|
63
|
-
$ mise
|
|
60
|
+
$ mise exec node@22 -- node -v
|
|
61
|
+
mise node@22.x.x ✓ installed
|
|
62
|
+
v22.x.x
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Install tools
|
|
66
|
+
|
|
67
|
+
```sh-session
|
|
68
|
+
$ mise use --global node@22 go@1
|
|
64
69
|
$ node -v
|
|
65
|
-
|
|
70
|
+
v22.x.x
|
|
71
|
+
$ go version
|
|
72
|
+
go version go1.x.x macos/arm64
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
See [dev tools](https://mise.jdx.dev/dev-tools/) for more examples.
|
|
76
|
+
|
|
77
|
+
### Manage environment variables
|
|
78
|
+
|
|
79
|
+
```toml
|
|
80
|
+
# mise.toml
|
|
81
|
+
[env]
|
|
82
|
+
SOME_VAR = "foo"
|
|
66
83
|
```
|
|
67
84
|
|
|
85
|
+
```sh-session
|
|
86
|
+
$ mise set SOME_VAR=bar
|
|
87
|
+
$ echo $SOME_VAR
|
|
88
|
+
bar
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Note that `mise` can also [load `.env` files](https://mise.jdx.dev/environments/#env-directives).
|
|
92
|
+
|
|
93
|
+
### Run tasks
|
|
94
|
+
|
|
95
|
+
```toml
|
|
96
|
+
# mise.toml
|
|
97
|
+
[tasks.build]
|
|
98
|
+
description = "build the project"
|
|
99
|
+
run = "echo building..."
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```sh-session
|
|
103
|
+
$ mise run build
|
|
104
|
+
building...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
See [tasks](https://mise.jdx.dev/tasks/) for more information.
|
|
108
|
+
|
|
109
|
+
### Example mise project
|
|
110
|
+
|
|
111
|
+
Here is a combined example to give you an idea of how you can use mise to manage your a project's tools, environment, and tasks.
|
|
112
|
+
|
|
113
|
+
```toml
|
|
114
|
+
# mise.toml
|
|
115
|
+
[tools]
|
|
116
|
+
terraform = "1"
|
|
117
|
+
aws-cli = "2"
|
|
118
|
+
|
|
119
|
+
[env]
|
|
120
|
+
TF_WORKSPACE = "development"
|
|
121
|
+
AWS_REGION = "us-west-2"
|
|
122
|
+
AWS_PROFILE = "dev"
|
|
123
|
+
|
|
124
|
+
[tasks.plan]
|
|
125
|
+
description = "Run terraform plan with configured workspace"
|
|
126
|
+
run = """
|
|
127
|
+
terraform init
|
|
128
|
+
terraform workspace select $TF_WORKSPACE
|
|
129
|
+
terraform plan
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
[tasks.validate]
|
|
133
|
+
description = "Validate AWS credentials and terraform config"
|
|
134
|
+
run = """
|
|
135
|
+
aws sts get-caller-identity
|
|
136
|
+
terraform validate
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
[tasks.deploy]
|
|
140
|
+
description = "Deploy infrastructure after validation"
|
|
141
|
+
depends = ["validate", "plan"]
|
|
142
|
+
run = "terraform apply -auto-approve"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Run it with:
|
|
146
|
+
|
|
147
|
+
```sh-session
|
|
148
|
+
mise install # install tools specified in mise.toml
|
|
149
|
+
mise run deploy
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Find more examples in the [mise cookbook](https://mise.jdx.dev/mise-cookbook/).
|
|
153
|
+
|
|
68
154
|
## Full Documentation
|
|
69
155
|
|
|
70
156
|
See [mise.jdx.dev](https://mise.jdx.dev)
|