tinyhumansai/openhuman · error · anyhow::Error
missing value for --host
Error message
missing value for --host
What it means
Sentinel anyhow error from the manual CLI argument parser for `openhuman serve` (or equivalent): the --host flag was the last token in args, so args.get(i + 1) returned None. It is purely a usage error — nothing was started. The parser consumes flag-plus-value pairs with i += 2, so a trailing flag with no value hits this branch.
Solutions
- Append a host value, e.g. `openhuman run --host 127.0.0.1`
- Omit --host to use the default (127.0.0.1 or OPENHUMAN_CORE_HOST)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/cli.rs:384 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/6d9a881c708269b7.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/cli.rs:384
let mut i = 0usize;
// Manual argument parsing loop for specific flags.
while i < args.len() {
match args[i].as_str() {
"--port" => {
let raw = args
.get(i + 1)
.ok_or_else(|| anyhow::anyhow!("missing value for --port"))?;
port = Some(
raw.parse::<u16>()
.map_err(|e| anyhow::anyhow!("invalid --port: {e}"))?,
);
i += 2;
}
"--host" => {
host = Some(
args.get(i + 1)
.ok_or_else(|| anyhow::anyhow!("missing value for --host"))?
.clone(),
);
i += 2;
}
"--jsonrpc-only" => {
socketio_enabled = false;
i += 1;
}
"--headless-api" => {
socketio_enabled = false;
headless_api = true;
i += 1;
}
"-v" | "--verbose" => {
verbose = true;
i += 1;
}
"-h" | "--help" => {View on GitHub (pinned to 7491200858)