{"record":{"id":"e7cbb74731b57bbd","repo":"jdx/mise","slug":"unknown-setting-e7cbb7","errorCode":null,"errorMessage":"Unknown setting: {}","messagePattern":"Unknown setting: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/settings/set.rs","lineNumber":46,"sourceCode":"        match self.value {\n            Some(value) => set(&self.setting, &value, false, self.local),\n            None => {\n                let (key, value) = self.setting.split_once('=').ok_or_else(|| {\n                    eyre!(\n                        \"Usage: mise settings set <KEY>=<VALUE> or mise settings set <KEY> <VALUE>\"\n                    )\n                })?;\n                set(key, value, false, self.local)\n            }\n        }\n    }\n}\n\npub(super) fn set(mut key: &str, value: &str, add: bool, local: bool) -> Result<()> {\n    let meta = match SETTINGS_META.get(key) {\n        Some(meta) => meta,\n        None => {\n            bail!(\"Unknown setting: {}\", key);\n        }\n    };\n\n    // Writing it would succeed and then be ignored, and `mise settings get` would report the\n    // stored value as if it were live. See https://github.com/jdx/mise/discussions/5791.\n    // `mise settings unset` is deliberately still allowed, so anyone who already has one of\n    // these in a config can remove it.\n    if meta.env_only {\n        bail!(\n            \"{key} cannot be set in a config file: mise reads it before config files load. Use the {} environment variable instead.\",\n            meta.env.unwrap_or(\"matching MISE_*\")\n        );\n    }\n\n    let value = match meta.type_ {\n        SettingsType::Bool => parse_bool(value)?,\n        SettingsType::Integer => parse_i64(value)?,\n        SettingsType::Duration => parse_duration(value)?,","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/cli/settings/set.rs#L28-L64","documentation":"`mise settings set KEY VALUE` (and unset-adjacent paths) look the key up in SETTINGS_META before writing; a key that is not a known setting bails 'Unknown setting: KEY' so misspelled names never silently create dead config entries. The metadata registry is generated from settings.toml, so it exactly matches the settings this mise version understands.","triggerScenarios":"Running `mise settings set invalid_key true`, or a script setting a key that no longer exists / was renamed in the installed mise version.","commonSituations":"Typos in automation; drift between a machine's mise version and the version docs/scripts were written for; stale CI pipelines after a settings rename.","solutions":["Copy the exact key from `mise settings ls` and retry","Align the script with the installed version's settings reference (docs/settings.toml)","Pin or upgrade mise across machines so settings names match your automation"],"exampleFix":"# before\nmise settings set auto_instal true   # Unknown setting: auto_instal\n\n# after\nmise settings ls\nmise settings set auto_install true","handlingStrategy":"type-guard","validationCode":"# fail fast with the valid key list on typos\nmise settings ls 2>/dev/null | awk '{print $1}' | grep -qx \"$key\" \\\n  || { echo \"unknown setting: $key\" >&2; exit 2; }\nmise settings set \"$key\" \"$value\"","typeGuard":"is_known_setting() { mise settings ls 2>/dev/null | awk '{print $1}' | grep -qx \"$1\"; }","tryCatchPattern":"Catch 'Unknown setting' from `mise settings set` and abort automation with the settings list attached; never ignore it — a typo here means your intended setting was NOT applied.","preventionTips":["Validate keys before writing in any automation touching settings","Re-verify setting names after mise major upgrades","Keep settings management in one reviewed script rather than ad-hoc commands"],"tags":["settings","unknown-key","config","cli","mise"],"backgroundTag":"unknown-config-key","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T20:17:18.057Z"}