Skip to content

CLI Commands

Build or update the search index.

Terminal window
rfx index [OPTIONS]
FlagShortDescription
--forceRebuild the entire index, ignoring cached hashes
--languages <LANGS>Comma-separated list of languages to index
--quiet-qSuppress progress output
Terminal window
# Show index status
rfx index status
# Compact the index (reclaim space from deleted files)
rfx index compact

Indexing is incremental by default — only files whose blake3 hash has changed are reprocessed. Use --force after configuration changes or when troubleshooting.


Search the codebase. With no pattern, launches interactive TUI mode.

Terminal window
rfx query [PATTERN] [OPTIONS]
FlagShortDescription
--symbols-sOnly return symbol definitions
--regex-rTreat pattern as a regular expression
--astMatch using Tree-sitter AST patterns
--lang <LANG>Filter by language
--kind <KIND>Filter by symbol kind (requires --symbols)
--paths <PATTERN>-pFilter by file path prefix
--file <PATH>-fFilter results to a specific file path
--glob <PATTERN>-gInclude only files matching glob pattern
--exclude <PATTERN>-xExclude files matching glob pattern
--exactExact symbol name match (no substring)
--containsSubstring matching for symbol names
--dependenciesInclude dependency context in results
--expandShow full symbol definitions in output
--jsonOutput results as JSON
--prettyPretty-print JSON output
--aiAI-optimized output format
--plainDisable colored output
--count-cShow match count only
--limit <N>Maximum number of results (default: 100)
--offset <N>-oSkip first N results (pagination)
--all-aReturn all results (no limit)
--forceBypass safety checks
--timeout <SECS>Query timeout in seconds (default: 30)
Terminal window
# Full-text search
rfx query "handleRequest"
# Symbol definitions only
rfx query "Config" --symbols --kind struct
# Regex search
rfx query "TODO\(\w+\)" --regex
# JSON output
rfx query "authenticate" --symbols --json
# Language filter
rfx query "import" --lang typescript
# Interactive mode
rfx query

Per-file dependency analysis.

Terminal window
rfx deps <FILE> [OPTIONS]
FlagDescription
--reverseShow files that depend on this file
--depth <N>Traversal depth (default: 1)
--format <FMT>Output format: tree (default), table, json
--jsonShorthand for --format json
--prettyPretty-print JSON output
Terminal window
# Direct dependencies
rfx deps src/main.rs
# Reverse dependencies (who imports this file?)
rfx deps src/auth/handler.rs --reverse
# Transitive dependencies
rfx deps src/main.rs --depth 3
# JSON output
rfx deps src/main.rs --json --pretty

Codebase-wide dependency analysis.

Terminal window
rfx analyze [OPTIONS]
FlagDescription
--circularFind circular dependencies
--hotspotsFind most-depended-upon files
--unusedFind files that nothing imports
--islandsFind disconnected file clusters
--limit <N>Results per page
--offset <N>Skip first N results
--allReturn all results (no pagination)
--jsonJSON output
Terminal window
# Find circular dependencies
rfx analyze --circular
# Top 10 hotspots
rfx analyze --hotspots --limit 10
# All unused files as JSON
rfx analyze --unused --all --json

Start the MCP (Model Context Protocol) server for AI assistant integration.

Terminal window
rfx mcp

No flags — the MCP server exposes 15 tools through the standard MCP protocol. See MCP Tools for the complete tool reference.


AI-powered code question answering.

Terminal window
rfx ask [QUESTION] [OPTIONS]
FlagDescription
--provider <PROVIDER>Override LLM provider (anthropic, openai, openrouter)
--agenticEnable multi-step reasoning
--answerDirect answer mode (default)
--executeRun query without LLM interpretation

With no question, enters interactive conversation mode.

Terminal window
# Interactive mode
rfx ask
# One-shot question
rfx ask "How does error handling work?"
# Agentic mode for complex questions
rfx ask "How would I add WebSocket support?" --agentic

Generate codebase context for AI prompts.

Terminal window
rfx context [OPTIONS]
FlagDescription
--structureInclude directory structure
--file-typesInclude file type breakdown
--project-typeDetect and include project type
--frameworkDetect and include framework
--entry-pointsInclude entry point files
--test-layoutInclude test file organization
--config-filesInclude configuration files
--path <PATH>Scope to a subdirectory
--depth <N>Directory tree depth

Start the HTTP API server.

Terminal window
rfx serve [OPTIONS]
FlagDescription
--port <PORT>Port number (default: 7878)
--host <HOST>Bind address (default: 127.0.0.1)

See HTTP API for endpoint documentation.


Manage LLM provider configuration.

Terminal window
# Interactive configuration wizard
rfx llm config
# Show current configuration
rfx llm status

Codebase intelligence surfaces (preview feature).

Terminal window
rfx pulse <SUBCOMMAND> [OPTIONS]
SubcommandDescription
generateGenerate a complete static site with digest, wiki, and architecture map
serveServe the generated site locally

See Pulse guide for details.


Manage Pulse snapshots.

Terminal window
rfx snapshot [SUBCOMMAND]
SubcommandDescription
(none)Take a new snapshot
diffCompare two snapshots
listList saved snapshots
gcGarbage-collect old snapshots

Show index statistics — file counts, language breakdown, index size.

Terminal window
rfx stats

Remove the index cache (.reflex/ directory).

Terminal window
rfx clear

List all indexed files.

Terminal window
rfx list-files

Watch for file changes and auto-reindex.

Terminal window
rfx watch