Hmbown/CodeWhale · error
--app must be `web` or `headless`, got
Error message
--app must be `web` or `headless`, got `{app}` What it means
The `dsh install-bundle` command received an --app value that DshAppBundle::parse does not recognize. Only the `web` and `headless` bundle kinds are supported; anything else is rejected before the bundle is installed.
Solutions
- Pass exactly `--app web` or `--app headless` (lowercase).
- Check `dsh install-bundle --help` for the accepted values on your CLI version.
- Fix the value in any automation scripts invoking this command.
Example fix
// before codewhale dsh install-bundle --app Desktop // after codewhale dsh install-bundle --app headless
Defensive patterns
Strategy: validation
Validate before calling
const VALID_APPS: [&str; 2] = ["web", "headless"];
if !VALID_APPS.contains(&app.as_str()) {
bail!("--app must be one of {:?}", VALID_APPS);
} Try / catch
// Shell if [ "$APP" != "web" ] && [ "$APP" != "headless" ]; then echo "--app must be web or headless" >&2; exit 2; fi codewhale dsh install-bundle --app "$APP"
Prevention
- Use --help to enumerate accepted --app values rather than guessing.
- Keep install scripts lowercase and in sync with the current CLI.
- Test automation flags against the installed CLI version after upgrades.
When it happens
Trigger: Running `dsh install-bundle --app <value>` with a value other than `web` or `headless` — misspellings, other casing (`Web`), or names copied from other tooling.
Common situations: Typos in shell scripts or docs; assuming other app names (e.g. `desktop`, `browser`) are valid; shell scripts with stale flags from an older CLI version.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- cannot resolve the current Codewhale route
- dsh binary path is unknown
- DSH is not connected; nothing to remove
- DSH is not connected; run
- DSH is not connected; run
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/860b4df33a44e391.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/integrations/cli.rs:400
}
DshIntegrationCommand::Disable => {
let paths = DshPaths::from_process()?;
let record = dsh::set_disabled(&paths, true)?;
println!(
"disabled: overlay kept at {}; launches refused",
record.overlay_path.display()
);
Ok(())
}
DshIntegrationCommand::Enable => {
let paths = DshPaths::from_process()?;
let record = dsh::set_disabled(&paths, false)?;
println!("enabled: {}", record.overlay_path.display());
Ok(())
}
DshIntegrationCommand::InstallBundle { app, yes } => {
let app = dsh::DshAppBundle::parse(&app)
.ok_or_else(|| anyhow::anyhow!("--app must be `web` or `headless`, got `{app}`"))?;
let (paths, report) = status_report(config, workspace, false)?;
ensure_launchable_dsh(&report)?;
let record = report.record.as_ref().ok_or_else(|| {
anyhow::anyhow!("DSH is not connected; run `{CLI_COMMAND} connect` first")
})?;
if let dsh::BundleAvailability::NotAvailable { reason } = &report.bundle_availability {
anyhow::bail!("DSH plugin path not available: {reason}");
}
if matches!(report.state, DshIntegrationState::StaleConfig { .. }) {
anyhow::bail!("overlay is stale; run `{CLI_COMMAND} update` before install-bundle");
}
let app_source = dsh::bundle::app_bundle_source(
report
.detection
.binary
.as_ref()
.ok_or_else(|| anyhow::anyhow!("dsh binary path is unknown"))?,
app,View on GitHub (pinned to 73e0f67d83)