{"record":{"id":"da6f8fbb4ac167ec","repo":"jdx/mise","slug":"mise-oci-no-project-mise-config-found-in-the-curr","errorCode":null,"errorMessage":"mise oci: no project mise config found in the current directory or any parent. Add a `mise.toml` to the project, or pass `--include-global` to use tools and [oci] settings from your global config (note: asdf/vfox plugins remain unsupported).","messagePattern":"mise oci: no project mise config found in the current directory or any parent\\. Add a `mise\\.toml` to the project, or pass `--include-global` to use tools and \\[oci\\] settings from your global config \\(note: asdf/vfox plugins remain unsupported\\)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/oci/common.rs","lineNumber":108,"sourceCode":"}\n\n/// Configs at-or-below the project root.\n///\n/// `cf.project_root().is_some()` is the right scope: it's None for the global\n/// config, the system config, and parent-dir configs that live directly under\n/// $HOME (e.g. `~/mise.toml` someone uses to set their default Node). It's\n/// Some for any project config, including those walked up from CWD into a\n/// monorepo root — which we *do* want included (sub-project + monorepo root\n/// share the toolset of the deployable).\nfn project_config_files(config: &Config) -> Result<ConfigMap> {\n    let project_files: ConfigMap = config\n        .config_files\n        .iter()\n        .filter(|(_, cf)| cf.project_root().is_some())\n        .map(|(p, cf)| (p.clone(), cf.clone()))\n        .collect();\n    if project_files.is_empty() {\n        bail!(\n            \"mise oci: no project mise config found in the current directory or any parent. \\\n             Add a `mise.toml` to the project, or pass `--include-global` to use tools and \\\n             [oci] settings from your global config (note: asdf/vfox plugins remain \\\n             unsupported).\"\n        );\n    }\n    Ok(project_files)\n}\n\nasync fn build_project_toolset(\n    config: &std::sync::Arc<Config>,\n    project_files: ConfigMap,\n) -> Result<crate::toolset::Toolset> {\n    // ConfigScope::LocalOnly belt-and-suspenders: the project-files filter\n    // already drops global/system, but LocalOnly *also* drops MISE_*_VERSION\n    // ad-hoc overrides from the environment, which shouldn't bake into an\n    // image either.\n    ToolsetBuilder::new()","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/cli/oci/common.rs#L90-L126","documentation":"`mise oci` commands build images from your project's toolset, and by default they only trust project-level config (any mise config with a project_root, including one walked up from CWD to a monorepo root). If no such file exists, they bail rather than silently baking your personal global tools into a production image. --include-global opts in; asdf/vfox plugins stay unsupported either way.","triggerScenarios":"Running `mise oci build` (or related oci subcommands) in a directory tree with no mise.toml/mise.local.toml/.tool-versions-with-project-root; running from a subfolder of a non-mise project; containers where only the global config exists.","commonSituations":"First `mise oci` use in a repo not yet using mise; building images from a fresh clone where mise.toml lives in a different repo; wanting global defaults in images without realizing the security implication.","solutions":["Add a mise.toml to the project root declaring the tools the image needs","Or explicitly opt in to global config: run the oci command with `--include-global`","If tools come from asdf/vfox plugins, migrate those tools to a mise-supported backend first — oci will not install plugin-based tools"],"exampleFix":"# before\ncd /src/app && mise oci build\n# after — create mise.toml first\nprintf '[tools]\\nnode = \"22\"\\n' > /src/app/mise.toml\nmise oci build","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nfound=0\nfor f in mise.toml mise.local.toml .mise.toml; do\n  d=$(pwd); while [[ \"$d\" != / ]]; do [[ -f \"$d/$f\" ]] && { found=1; break 2; }; d=$(dirname \"$d\"); done\ndone\n[[ $found -eq 1 ]] || MISE_INCLUDE_GLOBAL=1  # or add a mise.toml before running oci\nmise oci build","typeGuard":null,"tryCatchPattern":"mise oci build 2>err.log || { grep -q 'no project mise config found' err.log && { printf '[tools]\\nnode = \"22\"\\n' > mise.toml; mise oci build; }; }","preventionTips":["Commit a mise.toml declaring image tools at the repo (or monorepo) root","Use --include-global deliberately and only with a curated global config"],"tags":["cli","oci","missing-config","mise"],"backgroundTag":"missing-config-file","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}