quickwit-oss/quickwit · error

unknown command

Error message

unknown command `{subcommand}`

What it means

Top-level CLI argument parsing received a subcommand string that matches none of the registered clap subcommands (run, index, source, split, tool, etc.). It fires after clap's subcommand extraction succeeded but the match on the subcommand name fell through to the default arm.

Solutions

  1. Run `quickwit --help` to list the valid subcommands
  2. Check for typos in the subcommand name
  3. Make sure you are on a Quickwit version that supports the subcommand you typed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at quickwit/quickwit-cli/src/cli.rs:85 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/38aed063c49a7be7. Report an issue: GitHub.

Appendix: source

Thrown at quickwit/quickwit-cli/src/cli.rs:85

            CliCommand::Run(_) => Level::INFO,
            CliCommand::Index(subcommand) => subcommand.default_log_level(),
            CliCommand::Source(_) => Level::ERROR,
            CliCommand::Split(_) => Level::ERROR,
            CliCommand::Tool(_) => Level::ERROR,
        }
    }

    pub fn parse_cli_args(mut matches: ArgMatches) -> anyhow::Result<Self> {
        let (subcommand, submatches) = matches
            .remove_subcommand()
            .context("failed to parse command")?;
        match subcommand.as_str() {
            "index" => IndexCliCommand::parse_cli_args(submatches).map(CliCommand::Index),
            "run" => RunCliCommand::parse_cli_args(submatches).map(CliCommand::Run),
            "source" => SourceCliCommand::parse_cli_args(submatches).map(CliCommand::Source),
            "split" => SplitCliCommand::parse_cli_args(submatches).map(CliCommand::Split),
            "tool" => ToolCliCommand::parse_cli_args(submatches).map(CliCommand::Tool),
            _ => bail!("unknown command `{subcommand}`"),
        }
    }

    pub async fn execute(self, env_filter_reload_fn: EnvFilterReloadFn) -> anyhow::Result<()> {
        match self {
            CliCommand::Index(subcommand) => subcommand.execute().await,
            CliCommand::Run(subcommand) => subcommand.execute(env_filter_reload_fn).await,
            CliCommand::Source(subcommand) => subcommand.execute().await,
            CliCommand::Split(subcommand) => subcommand.execute().await,
            CliCommand::Tool(subcommand) => subcommand.execute().await,
        }
    }
}

View on GitHub (pinned to a39730c5cd)