Introduction
CLI Basics
Master the redteamer CLI. The primary interface for discovering, executing, and auditing modules.
Overview
The rt command-line interface (CLI) is the core entry point for redteamer operations. It follows a consistent pattern across all commands:
rt <verb> [object] [--flags]
Example invocations:
rt search web
rt run core/utils/whoami
rt audit --limit 5
Discovering Modules
Search for modules available locally or in connected sources.
rt search [keyword]
Examples:
rt search recon
rt search s3
Use --json, --yaml, or --table to control the output format.
Running Modules
Run a module directly from its slug:
rt run <module> [key=value ...]
Examples:
# Simple example
rt run core/utils/whoami
# With arguments
rt run core/tools/gobuster/dir --base_url https://example.com --wordlist /usr/share/wordlists/dirb/common.txt
Common flags:
| Flag | Description |
|---|---|
--trace | Stream detailed execution logs |
--quiet | Suppress progress output |
--output <format> | Control result format (json, yaml, table, etc.) |
Inspecting Runs
List past runs and view their results.
# Show the latest runs
rt audit
# Inspect a specific run
rt output <run-id>
# Include execution trace
rt output <run-id> --trace
Run metadata and artifacts are stored locally under:
~/.local/share/redteamer/runs/
Working with Output Formats
Every major command supports machine-readable output.
| Format | Flag | Description |
|---|---|---|
| table | --output table | Default, human-readable format |
| json | --output json | Structured data for scripts or integrations |
| ndjson | --output ndjson | Streaming JSON per line |
| csv | --output csv | Spreadsheet-compatible output |
| yaml | --output yaml | Compact and readable config format |
Example:
rt audit --output json > audit.json
Serving APIs
redteamer can run as a service for integration or automation.
# REST API
rt serve api --listen '127.0.0.1:8080'
# MCP (Model Context Protocol)
rt serve mcp
- API mode exposes modules as REST endpoints with OpenAPI schemas
- MCP mode exposes modules as AI-accessible tools for assistants like OpenAI or Anthropic
See Serve API and AI Integration for details.
Getting Help
Every command supports contextual help:
rt --help
rt run --help
rt run <module> --help
