Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ paranoid = false # see MISE_PARANOID
disable_default_registry = false # disable the default registry, see `MISE_DISABLE_DEFAULT_REGISTRY`
disable_tools = ['node'] # disable specific tools, generally used to turn off core tools

env_file = '.env' # load env vars from a dotenv file, see `MISE_ENV_FILE`

experimental = true # enable experimental features

# configure messages displayed when entering directories with config files
Expand All @@ -360,6 +358,9 @@ status = {
show_tools = false,
}

[env]
_.file = '.env'

# "_" is a special key for information you'd like to put into mise.toml that mise will never parse
[_]
foo = "bar"
Expand Down Expand Up @@ -526,6 +527,8 @@ This is the path which is used as `{{config_root}}` for the global config file.

### `MISE_ENV_FILE`

Deprecated. Use `env._.file` in `mise.toml` or `~/.config/mise/config.toml` instead.

Set to a filename to read from env from a dotenv file. e.g.: `MISE_ENV_FILE=.env`.
Uses [dotenvy](https://crates.io/crates/dotenvy) under the hood.

Expand Down
4 changes: 2 additions & 2 deletions docs/environments/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ _.file = [
]
```

You can set [`MISE_ENV_FILE=.env`](/configuration#mise-env-file) to automatically load dotenv files in any
directory.
The legacy [`MISE_ENV_FILE=.env`](/configuration#mise-env-file) setting can also load dotenv
files automatically, but it is deprecated. Use `env._.file` in a config file instead.

See [secrets](/environments/secrets/) for ways to read encrypted files with `env._.file`.

Expand Down
3 changes: 2 additions & 1 deletion schema/mise.json
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,8 @@
},
"env_file": {
"description": "Path to a file containing environment variables to automatically load.",
"type": "string"
"type": "string",
"deprecated": true
},
"env_shell_expand": {
"description": "Enable shell-style variable expansion in env values (e.g., $FOO, ${BAR:-default})",
Expand Down
3 changes: 3 additions & 0 deletions settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ env = "MISE_ENV_CACHE_TTL"
type = "Duration"

[env_file]
deprecated = "Use env._.file instead."
deprecated_remove_at = "2027.4.0"
deprecated_warn_at = "2026.4.17"
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
description = "Path to a file containing environment variables to automatically load."
env = "MISE_ENV_FILE"
optional = true
Expand Down
Loading