mise/Environment
Properties
- alias
- mise Environments
Environments | mise-en-place
What are two ways to set EnvVars with mise? card
1 - In mise/Config/mise.toml/env
2 - with mise/set
What are two ways to unset EnvVars with mise? card
1 - In mise/Config/mise.toml/env
- toml
[env] NODE_ENV = false # unset a previously set NODE_ENV - My Notes
- It's a bit Astonishing to me that we can unset environment variables with this technique
- See also TOML/Q/Is false a first-class primitive.
2 - with mise/unset
How do I view declared EnvVars? card
with mise/set
mise set # key value source # NODE_ENV development mise.toml- My Notes
- This is also a bit Astonishing to me; I would expect
mise listor something similar
- This is also a bit Astonishing to me; I would expect
What are the 4 ways that EnvVars declared in a mise/Config/mise.toml can be used/expressed in mise? card
1 - in mise/exec with a shell command
2 - when invoking a mise/Tool
2.1 via mise/exec
2.2 - in the shell, after mise/activate
2.3 - when using a mise/Shim'd version of a mise/Tool
- If, instead of using
mise activatein one's zshrc shell, one is using mise shims, whereby tools are symlinks that are configured to point to the executable that's been configured to have the mise environment, then the declared mise environment will be available to that binary - sh
mise set NODE_ENV=production mise use node@26 # using the absolute path for the example ~/.local/share/mise/shims/node --eval 'console.log(process.env.NODE_ENV)'
- If, instead of using
3 - in mise/tasks, including per-task env-vars
- you can modify environment variables just for a particular mise task.
- Here's an example of a mise/Task/TOML version of this, but it's also possible in mise/Task/File
4 - after calling mise/en to activate just mise's declared environment vars