jdx/mise · error

is not managed by [dotfiles]

Error message

{} is not managed by [dotfiles]

What it means

`mise dotfiles edit <target>` only edits targets that map to a [dotfiles] configuration entry. When the target resolves to no managed entry and the user has not opted into interactive add (`--yes` used without a match, or non-interactive context), run_inner bails telling the user the target is not managed.

Solutions

  1. Add the file to [dotfiles] in mise.toml first (`mise dotfiles add <path>`)
  2. Run `mise dotfiles edit <target>` without --yes so the interactive 'add it?' prompt can offer to manage it
  3. Verify the exact absolute or ~/ path matches an existing [dotfiles] entry via `mise dotfiles ls`

Example fix

// before
mise dotfiles edit --yes ~/.zshrc   // not managed -> bail
// after
mise dotfiles add ~/.zshrc
mise dotfiles edit ~/.zshrc
Defensive patterns

Strategy: validation

Validate before calling

mise dotfiles ls | grep -F "$target" || echo 'not managed; run mise dotfiles add'

Try / catch

match Err(msg) if msg.contains("is not managed by [dotfiles]") => run `mise dotfiles add <target>` then retry edit

Prevention

When it happens

Trigger: Running `mise dotfiles edit --yes /path/to/file` (or any non-prompted invocation) where source_for_target / the managed-entry lookup finds no [dotfiles] entry matching the given absolute or ~/ path.

Common situations: Typo in the path; file exists but was never added to [dotfiles]; using a relative path or an alias that does not match a configured entry; running with --yes expecting auto-add but the tool refuses to auto-add unmanaged targets in that mode.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/a89b90f4a2592a49. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/dotfiles/edit.rs:80

        }

        if let Some(path) = source_for_target(&config, &target, &self.target)? {
            open_or_create(&path)?;
            crate::cli::editor::open_in_editor(&path)?;
            if self.apply {
                apply_target(&self.target, self.prompt_secrets).await?;
            }
            return Ok(());
        }

        if !self.yes && console::user_attended_stderr() {
            let ok = prompt::confirm(format!("dotfiles: add {}?", self.target))?.is_yes();
            if !ok {
                info!("dotfiles: skipped");
                return Ok(());
            }
        } else if !self.yes {
            bail!("{} is not managed by [dotfiles]", self.target);
        }

        DotfilesAdd {
            targets: vec![self.target.clone()],
            changed: false,
            mode: self.mode.clone(),
            source: self.source.clone(),
            global: true,
            local: false,
            path: None,
            dry_run: false,
            no_apply: true,
            force: false,
            yes: true,
            prompt_secrets: self.prompt_secrets,
        }
        .run()
        .await?;

View on GitHub (pinned to 533346cc37)