tinyhumansai/openhuman · error

unknown ingest arg

Error message

unknown ingest arg: {other}

What it means

CLI argument parsing in the `openhuman memory ingest` subcommand: an unrecognized option was passed (accepted: <file|->, -n/--namespace, -k/--key, -t/--title, -v/--verbose, -h/--help). The offending token is in `{other}`; usage is printed by --help. Nothing was ingested.

Solutions

  1. Check the flag spelling against `openhuman memory ingest --help`
  2. Pass the file path positionally, e.g. `openhuman memory ingest notes.md`
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/memory_cli.rs:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/d4643bf48efdd1b9. Report an issue: GitHub.

Appendix: source

Thrown at src/core/memory_cli.rs:121

            "-v" | "--verbose" => {
                verbose = true;
                i += 1;
            }
            "-h" | "--help" => {
                println!("Usage: openhuman memory ingest <file|-> [options]");
                println!();
                println!("  <file>               Path to file to ingest (use '-' for stdin)");
                println!("  -n, --namespace <ns>  Target namespace (default: 'cli')");
                println!("  -k, --key <key>       Document key for dedup (default: filename)");
                println!("  -t, --title <title>   Document title (default: filename)");
                println!("  -v, --verbose         Enable debug logging");
                return Ok(());
            }
            other if file_path.is_none() && (!other.starts_with('-') || other == "-") => {
                file_path = Some(other.to_string());
                i += 1;
            }
            other => return Err(anyhow::anyhow!("unknown ingest arg: {other}")),
        }
    }

    let file_path = file_path.ok_or_else(|| {
        anyhow::anyhow!("missing file argument. Use a file path or '-' for stdin.")
    })?;

    crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);

    let content = read_input(&file_path)?;
    let doc_key = key.unwrap_or_else(|| file_path.clone());
    let doc_title = title.unwrap_or_else(|| {
        if file_path == "-" {
            "stdin-input".to_string()
        } else {
            PathBuf::from(&file_path)
                .file_name()
                .map(|n| n.to_string_lossy().to_string())

View on GitHub (pinned to 7491200858)