atuinsh/atuin · error

script not found

Error message

script not found

What it means

`atuin script run` throws this when the named script cannot be resolved before execution. After loading the script from the database the handler executes it only if the lookup succeeded; otherwise it bails with a generic 'script not found' message. It is a user-facing not-found guard, not an internal failure.

Solutions

  1. Run `atuin script list` to see available script names and check spelling
  2. Sync records (`atuin sync`) then `atuin store rebuild` if scripts exist elsewhere
  3. Create the script with `atuin script new <name>` if it genuinely does not exist

Example fix

// before
atuin script run deplo
// after
atuin script list          # find exact name
atuin script run deploy
Defensive patterns

Strategy: validation

Validate before calling

let names = script_db.list().await?;
if !names.iter().any(|s| s.script.name == target) {
    eprintln!("unknown script: {target}");
    return Ok(());
}

Prevention

When it happens

Trigger: Running `atuin script run <name>` where no script with that name exists in the local script database, or the lookup by name returned None.

Common situations: Typos in the script name, running on a machine before `atuin script sync`/store rebuild pulled the scripts down, or the script was deleted from another synced machine.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/639fdf07e1f5d265. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin/src/command/client/scripts.rs:354

                    let value = input.trim().to_string();
                    variable_values.insert(var, serde_json::Value::String(value));
                }
            }

            let final_script = if variable_values.is_empty() {
                // No variables to template, just use the original script
                script.script.clone()
            } else {
                // If we have variables, we need to template the script
                debug!("Templating script with variables: {:?}", variable_values);
                template_script(&script, &variable_values)?
            };

            // Execute the script (either templated or original)
            Self::execute_script(final_script, script.shebang.clone()).await?;
        } else {
            bail!("script not found");
        }
        Ok(())
    }

    async fn handle_list(
        _settings: &Settings,
        _list: List,
        script_db: atuin_scripts::database::Database,
    ) -> Result<()> {
        let scripts = script_db.list().await?;

        if scripts.is_empty() {
            println!("No scripts found");
        } else {
            println!("Available scripts:");
            for script in scripts {
                if script.tags.is_empty() {
                    println!("- {} ", script.name);

View on GitHub (pinned to 900007c480)