{"record":{"id":"f5f2c720f8cdb4ea","repo":"tinyhumansai/openhuman","slug":"missing-file-argument-use-a-file-path-or-for","errorCode":null,"errorMessage":"missing file argument. Use a file path or '-' for stdin.","messagePattern":"missing file argument\\. Use a file path or '-' for stdin\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/memory_cli.rs","lineNumber":126,"sourceCode":"                println!(\"Usage: openhuman memory ingest <file|-> [options]\");\n                println!();\n                println!(\"  <file>               Path to file to ingest (use '-' for stdin)\");\n                println!(\"  -n, --namespace <ns>  Target namespace (default: 'cli')\");\n                println!(\"  -k, --key <key>       Document key for dedup (default: filename)\");\n                println!(\"  -t, --title <title>   Document title (default: filename)\");\n                println!(\"  -v, --verbose         Enable debug logging\");\n                return Ok(());\n            }\n            other if file_path.is_none() && (!other.starts_with('-') || other == \"-\") => {\n                file_path = Some(other.to_string());\n                i += 1;\n            }\n            other => return Err(anyhow::anyhow!(\"unknown ingest arg: {other}\")),\n        }\n    }\n\n    let file_path = file_path.ok_or_else(|| {\n        anyhow::anyhow!(\"missing file argument. Use a file path or '-' for stdin.\")\n    })?;\n\n    crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);\n\n    let content = read_input(&file_path)?;\n    let doc_key = key.unwrap_or_else(|| file_path.clone());\n    let doc_title = title.unwrap_or_else(|| {\n        if file_path == \"-\" {\n            \"stdin-input\".to_string()\n        } else {\n            PathBuf::from(&file_path)\n                .file_name()\n                .map(|n| n.to_string_lossy().to_string())\n                .unwrap_or_else(|| file_path.clone())\n        }\n    });\n\n    eprintln!(","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/memory_cli.rs#L108-L144","documentation":"CLI argument validation in `openhuman memory ingest`: no input file argument was provided. The command requires a file path or `-` for stdin (defaults like namespace=cli and key/title=filename only fill options, not the input). Re-run with e.g. `openhuman memory ingest notes.md -n cli`.","triggerScenarios":"Thrown at src/core/memory_cli.rs:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a file path positionally, e.g. `openhuman memory ingest ./doc.md`","Use `-` to pipe content from stdin: `cat doc.md | openhuman memory ingest -`"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}