Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 4 additions & 6 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,12 @@ trusted_config_paths = [
'~/work/my-trusted-projects',
]

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

[settings.status]
show_env = false
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 @@ -499,9 +498,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`.
Set to a filename to read env from a dotenv file. e.g.: `MISE_ENV_FILE=.env`.
This searches for and loads all matching files in the current directory and parent directories.
Uses [dotenvy](https://crates.io/crates/dotenvy) under the hood.

### `MISE_${PLUGIN}_VERSION`
Expand Down
6 changes: 4 additions & 2 deletions docs/environments/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,10 @@ _.file = [
]
```

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.
To automatically load dotenv files from the current directory and parent directories, set
[`MISE_ENV_FILE=.env`](/configuration#mise-env-file) or `env_file = ".env"` under `[settings]`
in `~/.config/mise/config.toml`. This is different from `env._.file`, which resolves paths
relative to the config file that declares it.

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

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

[env_file]
deprecated = "Use env._.file instead."
deprecated_remove_at = "2027.11.0"
deprecated_warn_at = "2026.11.0"
description = "Path to a file containing environment variables to automatically load."
env = "MISE_ENV_FILE"
optional = true
Expand Down Expand Up @@ -1733,7 +1730,7 @@ env = "MISE_PRERELEASES"
type = "Bool"

[profile]
deprecated = "Use env._.file instead."
deprecated = "Use MISE_ENV instead."
description = "Profile to use for mise.${MISE_PROFILE}.toml files."
env = "MISE_PROFILE"
hide = true
Expand Down
Loading