jdx/mise · error
No config file found in current directory
Error message
No config file found in current directory
What it means
`mise fmt` without --all looks for TOML config files in the current directory (mise.toml, settings, etc.); none were found, and stdin was not piped, so there is nothing to format and the command bails rather than being a no-op.
Solutions
- cd to the directory containing your mise.toml and run `mise fmt` there
- Create a mise.toml in the current directory if one is intended
- Use `mise fmt --all` to format all known TOML config files regardless of cwd
Example fix
// before cd ~/project/src && mise fmt # no config here // after cd ~/project && mise fmt // or: mise fmt --all
Defensive patterns
Strategy: validation
Validate before calling
test -f mise.toml || test -f .mise.toml || echo 'no mise config here'
Prevention
- Run fmt from the project root
- Use --all when formatting config files across the repo
When it happens
Trigger: Running `mise fmt` in a directory without a mise.toml/.mise.toml/mise.config.toml or similar config file, without the --all flag.
Common situations: Running fmt from a subdirectory of a project instead of the root; project genuinely has no mise config; typo'd cwd.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.
Related errors
- cannot export ' ': use a shorthand attribute such as…
- Check command must not be empty
- collection updates require scalar or array values
- config file not found
- config file not found
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/89dcc7c5390a918b.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/fmt.rs:64
let mut toml = String::new();
io::stdin().read_to_string(&mut toml)?;
let toml = sort(toml)?;
let toml = format(toml)?;
let mut stdout = io::stdout();
write!(stdout, "{toml}")?;
return Ok(());
}
let cwd = dirs::CWD.clone().unwrap_or_default();
let configs = if self.all {
ALL_TOML_CONFIG_FILES.clone()
} else {
config::config_files_in_dir(&cwd)
};
if configs.is_empty() {
bail!("No config file found in current directory");
}
let mut errors = Vec::new();
for p in configs {
if !p
.file_name()
.is_some_and(|f| f.to_string_lossy().ends_with("toml"))
{
continue;
}
let source = file::read_to_string(&p)?;
let toml = source.clone();
let toml = sort(toml)?;
let toml = format(toml)?;
if self.check {
if source != toml {
errors.push(p.display().to_string());
}
continue;View on GitHub (pinned to 533346cc37)