tinyhumansai/openhuman · error

either --content or --file is required. Run `openhuman tree-

Error message

either --content or --file is required. Run `openhuman tree-summarizer ingest --help`.

What it means

A usage guard in the tree-summarizer ingest subcommand: neither `--content` nor `--file` was supplied, so there is no text to ingest. The subcommand requires exactly one of these to provide the raw content, and the error message points the user at `--help` for the correct invocation.

Source

Thrown at src/openhuman/memory/tree/tree_runtime/cli.rs:143

    let namespace = &rest[0];

    let content = if let Some(ref path) = opts.file {
        if path == "-" {
            use std::io::Read;
            let mut buf = String::new();
            std::io::stdin()
                .read_to_string(&mut buf)
                .map_err(|e| anyhow::anyhow!("failed to read stdin: {e}"))?;
            buf
        } else {
            std::fs::read_to_string(path)
                .map_err(|e| anyhow::anyhow!("failed to read '{}': {e}", path))?
        }
    } else if let Some(ref text) = opts.content {
        text.clone()
    } else {
        return Err(anyhow::anyhow!(
            "either --content or --file is required. Run `openhuman tree-summarizer ingest --help`."
        ));
    };

    if content.trim().is_empty() {
        return Err(anyhow::anyhow!("content is empty"));
    }

    init_logging(opts.verbose);

    let rt = build_runtime()?;
    rt.block_on(async {
        let config = load_config().await?;
        let outcome = crate::openhuman::memory::tree::tree_runtime::rpc::tree_summarizer_ingest(
            &config, namespace, &content, None, None,
        )
        .await
        .map_err(anyhow::Error::msg)?;

View on GitHub (pinned to 7491200858)

Solutions

  1. Pass inline text: `openhuman tree-summarizer ingest my-ns --content "some text"`
  2. Or read from a file: `openhuman tree-summarizer ingest my-ns --file ./notes.txt`
  3. Or from stdin: `cat notes.txt | openhuman tree-summarizer ingest my-ns --file -`
  4. Run `openhuman tree-summarizer ingest --help` to see all options
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/tree/tree_runtime/cli.rs:143 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/3be27dc0e946ecf5. Report an issue: GitHub.