rtk-ai/rtk · error

Unknown filter '{}'. Available: cargo-test, pytest, go-test,

Error message

Unknown filter '{}'. Available: cargo-test, pytest, go-test, go-build, ctest, tsc, vitest, grep, rg, find, fd, git-log, git-diff, git-status, log, mypy, ruff-check, ruff-format, prettier, phpunit, pest, paratest, php-test, ecs, phpstan, pint

What it means

Error "Unknown filter '{}'. Available: cargo-test, pytest, go-test, go-build, ctest, tsc, vitest, grep, rg, find, fd, git-log, git-diff, git-status, log, mypy, ruff-check, ruff-format, prettier, phpunit, pest, paratest, php-test, ecs, phpstan, pint" thrown in rtk-ai/rtk.

Source

Thrown at src/cmds/system/pipe_cmd.rs:269

pub fn run(filter_name: Option<&str>, passthrough: bool) -> Result<()> {
    if passthrough {
        std::io::copy(&mut std::io::stdin(), &mut std::io::stdout())
            .map_err(|e| anyhow::anyhow!("Failed to relay stdin: {}", e))?;
        return Ok(());
    }

    let mut buf = String::new();
    std::io::stdin()
        .take((RAW_CAP + 1) as u64)
        .read_to_string(&mut buf)
        .map_err(|e| anyhow::anyhow!("Failed to read stdin: {}", e))?;
    if buf.len() > RAW_CAP {
        anyhow::bail!("stdin exceeds {} byte limit", RAW_CAP);
    }

    let filter_fn = match filter_name {
        Some(name) => resolve_filter(name).ok_or_else(|| {
            anyhow::anyhow!(
                "Unknown filter '{}'. Available: cargo-test, pytest, go-test, go-build, \
                 ctest, tsc, vitest, grep, rg, find, fd, git-log, git-diff, git-status, \
                 log, mypy, ruff-check, ruff-format, prettier, phpunit, pest, \
                 paratest, php-test, ecs, phpstan, pint",
                name
            )
        })?,
        None => auto_detect_filter(&buf),
    };

    let output = apply_filter(filter_fn, &buf);
    let shown = never_worse(&buf, &output);
    print!("{}", shown);
    Ok(())
}

#[cfg(test)]
mod tests {

View on GitHub (pinned to 36788f6bd4)

Solutions

  1. Use one of the listed built-in filter names, e.g. rtk pipe cargo-test
  2. Check spelling of the filter name passed to rtk pipe
  3. Extend the match in pipe_cmd.rs with a new filter entry if a custom filter is required
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/cmds/system/pipe_cmd.rs:269 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rtk-ai/rtk@36788f6bd4 (2026-09-03). Data as JSON: /api/errors/3779761054ce6024. Report an issue: GitHub.