CLI Commands
rfx index
Section titled “rfx index”Build or update the search index.
rfx index [OPTIONS]| Flag | Short | Description |
|---|---|---|
--force | Rebuild the entire index, ignoring cached hashes | |
--languages <LANGS> | Comma-separated list of languages to index | |
--quiet | -q | Suppress progress output |
Subcommands
Section titled “Subcommands”# Show index statusrfx index status
# Compact the index (reclaim space from deleted files)rfx index compactIndexing is incremental by default — only files whose blake3 hash has changed are reprocessed. Use --force after configuration changes or when troubleshooting.
rfx query
Section titled “rfx query”Search the codebase. With no pattern, launches interactive TUI mode.
rfx query [PATTERN] [OPTIONS]| Flag | Short | Description |
|---|---|---|
--symbols | -s | Only return symbol definitions |
--regex | -r | Treat pattern as a regular expression |
--ast | Match using Tree-sitter AST patterns | |
--lang <LANG> | Filter by language | |
--kind <KIND> | Filter by symbol kind (requires --symbols) | |
--paths <PATTERN> | -p | Filter by file path prefix |
--file <PATH> | -f | Filter results to a specific file path |
--glob <PATTERN> | -g | Include only files matching glob pattern |
--exclude <PATTERN> | -x | Exclude files matching glob pattern |
--exact | Exact symbol name match (no substring) | |
--contains | Substring matching for symbol names | |
--dependencies | Include dependency context in results | |
--expand | Show full symbol definitions in output | |
--json | Output results as JSON | |
--pretty | Pretty-print JSON output | |
--ai | AI-optimized output format | |
--plain | Disable colored output | |
--count | -c | Show match count only |
--limit <N> | Maximum number of results (default: 100) | |
--offset <N> | -o | Skip first N results (pagination) |
--all | -a | Return all results (no limit) |
--force | Bypass safety checks | |
--timeout <SECS> | Query timeout in seconds (default: 30) |
Examples
Section titled “Examples”# Full-text searchrfx query "handleRequest"
# Symbol definitions onlyrfx query "Config" --symbols --kind struct
# Regex searchrfx query "TODO\(\w+\)" --regex
# JSON outputrfx query "authenticate" --symbols --json
# Language filterrfx query "import" --lang typescript
# Interactive moderfx queryrfx deps
Section titled “rfx deps”Per-file dependency analysis.
rfx deps <FILE> [OPTIONS]| Flag | Description |
|---|---|
--reverse | Show files that depend on this file |
--depth <N> | Traversal depth (default: 1) |
--format <FMT> | Output format: tree (default), table, json |
--json | Shorthand for --format json |
--pretty | Pretty-print JSON output |
Examples
Section titled “Examples”# Direct dependenciesrfx deps src/main.rs
# Reverse dependencies (who imports this file?)rfx deps src/auth/handler.rs --reverse
# Transitive dependenciesrfx deps src/main.rs --depth 3
# JSON outputrfx deps src/main.rs --json --prettyrfx analyze
Section titled “rfx analyze”Codebase-wide dependency analysis.
rfx analyze [OPTIONS]| Flag | Description |
|---|---|
--circular | Find circular dependencies |
--hotspots | Find most-depended-upon files |
--unused | Find files that nothing imports |
--islands | Find disconnected file clusters |
--limit <N> | Results per page |
--offset <N> | Skip first N results |
--all | Return all results (no pagination) |
--json | JSON output |
Examples
Section titled “Examples”# Find circular dependenciesrfx analyze --circular
# Top 10 hotspotsrfx analyze --hotspots --limit 10
# All unused files as JSONrfx analyze --unused --all --jsonrfx mcp
Section titled “rfx mcp”Start the MCP (Model Context Protocol) server for AI assistant integration.
rfx mcpNo flags — the MCP server exposes 15 tools through the standard MCP protocol. See MCP Tools for the complete tool reference.
rfx ask
Section titled “rfx ask”AI-powered code question answering.
rfx ask [QUESTION] [OPTIONS]| Flag | Description |
|---|---|
--provider <PROVIDER> | Override LLM provider (anthropic, openai, openrouter) |
--agentic | Enable multi-step reasoning |
--answer | Direct answer mode (default) |
--execute | Run query without LLM interpretation |
With no question, enters interactive conversation mode.
Examples
Section titled “Examples”# Interactive moderfx ask
# One-shot questionrfx ask "How does error handling work?"
# Agentic mode for complex questionsrfx ask "How would I add WebSocket support?" --agenticrfx context
Section titled “rfx context”Generate codebase context for AI prompts.
rfx context [OPTIONS]| Flag | Description |
|---|---|
--structure | Include directory structure |
--file-types | Include file type breakdown |
--project-type | Detect and include project type |
--framework | Detect and include framework |
--entry-points | Include entry point files |
--test-layout | Include test file organization |
--config-files | Include configuration files |
--path <PATH> | Scope to a subdirectory |
--depth <N> | Directory tree depth |
rfx serve
Section titled “rfx serve”Start the HTTP API server.
rfx serve [OPTIONS]| Flag | Description |
|---|---|
--port <PORT> | Port number (default: 7878) |
--host <HOST> | Bind address (default: 127.0.0.1) |
See HTTP API for endpoint documentation.
rfx llm
Section titled “rfx llm”Manage LLM provider configuration.
# Interactive configuration wizardrfx llm config
# Show current configurationrfx llm statusrfx pulse
Section titled “rfx pulse”Codebase intelligence surfaces (preview feature).
rfx pulse <SUBCOMMAND> [OPTIONS]| Subcommand | Description |
|---|---|
generate | Generate a complete static site with digest, wiki, and architecture map |
serve | Serve the generated site locally |
See Pulse guide for details.
rfx snapshot
Section titled “rfx snapshot”Manage Pulse snapshots.
rfx snapshot [SUBCOMMAND]| Subcommand | Description |
|---|---|
| (none) | Take a new snapshot |
diff | Compare two snapshots |
list | List saved snapshots |
gc | Garbage-collect old snapshots |
Utility commands
Section titled “Utility commands”rfx stats
Section titled “rfx stats”Show index statistics — file counts, language breakdown, index size.
rfx statsrfx clear
Section titled “rfx clear”Remove the index cache (.reflex/ directory).
rfx clearrfx list-files
Section titled “rfx list-files”List all indexed files.
rfx list-filesrfx watch
Section titled “rfx watch”Watch for file changes and auto-reindex.
rfx watch