{"record":{"id":"594e9f864a098b0e","repo":"atuinsh/atuin","slug":"script-not-found","errorCode":null,"errorMessage":"script '{}' not found","messagePattern":"script '(.+?)' not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin/src/command/client/scripts.rs","lineNumber":435,"sourceCode":"                println!(\"tags: []\");\n            } else {\n                println!(\"tags:\");\n                for tag in &script.tags {\n                    println!(\"  - {tag}\");\n                }\n            }\n\n            println!(\"shebang: {}\", script.shebang);\n\n            println!(\"script: |\");\n            // Indent the script content for proper YAML multiline format\n            for line in script.script.lines() {\n                println!(\"  {line}\");\n            }\n\n            Ok(())\n        } else {\n            bail!(\"script '{}' not found\", get.name);\n        }\n    }\n\n    #[allow(clippy::cognitive_complexity)]\n    async fn handle_edit(\n        _settings: &Settings,\n        edit: Edit,\n        script_store: ScriptStore,\n        script_db: atuin_scripts::database::Database,\n    ) -> Result<()> {\n        debug!(\"editing script {:?}\", edit);\n        // Find the existing script\n        let existing_script = script_db.get_by_name(&edit.name).await?;\n        debug!(\"existing script {:?}\", existing_script);\n\n        if let Some(mut script) = existing_script {\n            // Update the script with new values if provided\n            if let Some(description) = edit.description {","sourceCodeStart":417,"sourceCodeEnd":453,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin/src/command/client/scripts.rs#L417-L453","documentation":"`atuin scripts get <name>` fetches the script by name to print its metadata and body; if the lookup returns `None`, it bails with \"script '{}' not found\". This is a read-only query failure, not a data-loss condition.","triggerScenarios":"`atuin scripts get NAME` where no script with that exact name exists in the local script database.","commonSituations":"Typo or wrong case in the name, script exists only on another host and hasn't synced, or the scripts DB is stale before a rebuild.","solutions":["Run `atuin scripts list` to list exact names and fix the spelling.","Trigger a sync/rebuild of the script store so remote scripts appear locally.","If the script was deleted, re-create it."],"exampleFix":"// before\natuin scripts get Deploy-Prod\n// after\natuin scripts list\natuin scripts get deploy-prod","handlingStrategy":"validation","validationCode":"# shell\natuin scripts list | grep -qx \"$name\" || { echo \"no such script: $name\" >&2; exit 1; }\natuin scripts get \"$name\"","typeGuard":null,"tryCatchPattern":"if ! atuin scripts get \"$name\"; then\n  atuin scripts list | grep -i \"${name:0:4}\" || true\nfi","preventionTips":["List scripts first; copy names exactly (watch case).","Sync after creating scripts on other machines."],"tags":["cli","not-found","scripts"],"backgroundTag":"record-not-found","analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}