jdx/mise · error
No mise.toml file found
Error message
No mise.toml file found
What it means
mise config set without --file calls top_toml_config(); when no TOML config exists in the loaded set (project chain or global) there is nowhere to write, and the command bails 'No mise.toml file found' (src/cli/config/set.rs:74) rather than silently inventing a location.
Source
Thrown at src/cli/config/set.rs:74
eyre::eyre!(
"Usage: mise config set <KEY>=<VALUE> or mise config set <KEY> <VALUE>"
)
})?;
(k.to_string(), v.to_string())
}
};
// Only an explicitly named target goes through the shared resolver — the default is a
// different rule (the top TOML config of the loaded set, not the nearest writable one).
let file = match self.file {
Some(path) => Some(resolve_target_config_path(ConfigPathOptions {
path: Some(path),
prefer_toml: true,
..Default::default()
})?),
None => top_toml_config(),
};
let Some(file) = file else {
bail!("No mise.toml file found");
};
if !file.exists() {
bail!("config file not found: {}", display_path(&file));
}
let mut config: toml_edit::DocumentMut = std::fs::read_to_string(&file)?.parse()?;
let mut container = config.as_item_mut();
let parts = full_key.split('.').collect::<Vec<&str>>();
let last_key = parts.last().unwrap();
for (idx, part) in parts.iter().take(parts.len() - 1).enumerate() {
container = container
.as_table_like_mut()
.ok_or_else(|| {
eyre::eyre!(
"cannot set '{full_key}': '{}' is already set to a non-table value",
parts[..idx].join(".")
)
})?
.entry(part)View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Create mise.toml first: touch mise.toml (or run 'mise use <tool>' once)
- Or write to a specific file: mise config set --file path/to/mise.toml <key> <value>
- Or target the global config explicitly: --file ~/.config/mise/config.toml
Example fix
# before mise config set env.FOO bar # Error: No mise.toml file found # after touch mise.toml mise config set env.FOO bar
Defensive patterns
Strategy: validation
Validate before calling
# bash: ensure a writable target exists before setting [ -f mise.toml ] || touch mise.toml mise config set "$KEY" "$VALUE"
Prevention
- Bootstrap repos with a mise.toml scaffold
- For global settings, target the file explicitly: --file ~/.config/mise/config.toml
When it happens
Trigger: 'mise config set <key> <value>' in a directory tree with no mise.toml; only .tool-versions present; global config never created.
Common situations: First-time use on asdf-era projects; bootstrap scripts that set config values before any config file exists; containers and fresh clones.
Related errors
- No mise.toml file found
- no remote targets configured; pass --host [user@]host or add
- config file not found: {}
- config file not found: {}
- No config file found in current directory
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/a29bc57cff2b8d3c.
Report an issue: GitHub.