redteamer logo

Guides

Discovering Modules

redteamer includes a built-in search index to help you discover public, private, and local modules by name.


Overview

Each module in redteamer is discoverable by name. The rt search command lets you query this index using simple keywords or fuzzy matching. Results can be shown in multiple formats for scripting, pipelines, or interactive exploration.


Syncing the Module Catalog

redteamer publishes a catalog of known public modules on GitHub.
To fetch the latest public modules and update your local index, run:

rt sync catalog

This command retrieves any new or updated module definitions, and merges them into your local catalog. It’s safe to run repeatedly. redteamer only downloads deltas.

Tip: The search index remains usable offline. You only need to sync when you want to discover newly published modules.


Basic Usage

rt search [keywords] [--flags]

Examples

# List all available modules
rt search

# Search modules matching “alpha”
rt search alpha

# Limit results to 10
rt search --limit 10

Search Modes

ModeFlagDescription
Default(none)Simple keyword match (fast and deterministic).
Interactive--interactive / -iLaunches an interactive fuzzy finder (navigate and preview results).
Fuzzy (non-interactive)--fuzzy / -fPerforms a fuzzy search automatically without interaction.
rt search -i

Use your arrow keys or type to narrow down results interactively. Press Enter to select a module slug and exit.


Output Formats

You can export results in several formats for downstream tools:

FormatFlagNotes
Table (default)--output tableHuman-readable table with columns.
CSV--output csvMachine-readable, good for pipelines.
JSON--output jsonStructured JSON array.
NDJSON--output ndjsonOne JSON object per line (stream-friendly).
YAML--output yamlReadable for manual inspection.

Example

# Export search results in JSON format
rt search core --output json

You can select which columns appear in tabular or CSV outputs:

rt search --columns slug,tags

Refining Results

Use these options to control scope and output:

FlagDescription
--limit <n>Restrict number of results (0 = unlimited).
--pagerView results with a pager (useful for long lists).
--no-headersOmit header row for CSV or table formats.

Tips & Best Practices

  • Keep your catalog current: Run rt sync catalog periodically to discover new public modules.

  • Use interactive search (-i) to browse and preview quickly.

  • Combine keyword search with output filters for scripting:

    rt search aws --output json | jq '.[].slug'
    
  • Pipe results directly into automation or inventories.

  • Integrate with MCP or Serve API to expose search functionality to AI assistants or REST clients.

Previous
CLI Basics