jdx/mise · error
unknown dotfile key {key:?} for {target} in {}
Error message
unknown dotfile key {key:?} for {target} in {} What it means
Once a dotfile entry parses, every key inside its table is checked against a fixed allowlist: `source`, `content`, `mode`, `exclude`, `manifest`, `autosave`, `encrypt`, `variants`, `enabled`. Any other key is a configuration typo that would otherwise be silently ignored, so validation fails with the offending key and target named.
Source
Thrown at src/system/files.rs:573
continue;
}
bail!("invalid dotfile declaration {target} in {}", path.display());
};
if let Some(table) = value.as_table() {
for key in table.keys() {
if !matches!(
key.as_str(),
"source"
| "content"
| "mode"
| "exclude"
| "manifest"
| "autosave"
| "encrypt"
| "variants"
| "enabled"
) {
bail!(
"unknown dotfile key {key:?} for {target} in {}",
path.display()
);
}
}
}
if resolve_target_arg(&target).is_relative() {
bail!("dotfile target must be absolute or start with ~/: {target}");
}
if let FileTomlEntry::Table {
source,
content,
mode,
manifest,
exclude,
..
} = entry
{View on GitHub (pinned to afd2eddd3a)
Solutions
- Rename the flagged key to one of the allowed keys: source, content, mode, exclude, manifest, autosave, encrypt, variants, enabled.
- If the key was meant to configure a different mise feature, move it out of the `[dotfiles.<target>]` table into the correct section.
- Remove the key entirely if it was speculative; unknown keys are intentionally rejected rather than ignored.
Example fix
// before [dotfiles."~/.gitconfig"] source = "gitconfig" permissuns = "644" // after [dotfiles."~/.gitconfig"] source = "gitconfig" mode = "644"
Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = new Set(['source','content','mode','exclude','manifest','autosave','encrypt','variants','enabled']);
function assertAllowedKeys(entry, target) {
for (const key of Object.keys(entry))
if (!ALLOWED.has(key)) throw new Error(`unknown dotfile key '${key}' for ${target}`);
} Try / catch
try {
applyDotfiles();
} catch (e) {
if (/unknown dotfile key/.test(e.message)) {
const key = e.message.match(/key '(.*?)'/)?.[1];
console.error(`Remove or rename key '${key}' in the dotfiles table`);
} else throw e;
} Prevention
- Memorize/reference the nine allowed dotfile keys before adding new ones
- Use editor TOML schema validation with an enum of allowed keys
- Grep your configs for the flagged key across all mise config files after any failure
When it happens
Trigger: Placing any non-allowlisted key inside a `[dotfiles."~/target"]` table in a mise config file parsed by `validate_incoming_files`, e.g. `ownership = true`, `src = "..."`, or `chmod = "755"`.
Common situations: Misspelling a real key (`soure`, `encrypte`), copying keys from other tools' dotfile managers, or inventing keys expecting them to be honored.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- invalid dotfile declaration {target} in {}
- dotfile {target}: inline content does not support mode, excl
- tracked file {target} cannot declare source, content, manife
- dotfile {target} cannot declare both source and content
- invalid manifest {manifest:?} for dotfile {target}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/3997ba6af8f3d25f.
Report an issue: GitHub.