CLI Reference
The ranex CLI is installed with the ranex PyPI package.
Global commands
- Print version
ranex version
- Initialize project config
ranex init- Writes
.ranex/firewall.yaml - Options:
--project-root <path>(default: current directory)--force(overwrite existing file)
Atlas commands
All Atlas commands are under ranex atlas ....
Common options:
--project-root <path>(default: current directory)--json(JSON output)
Commands:
Scanning and search
- Scan:
ranex atlas scan - Search:
ranex atlas search "<query>"- Options:
--limit <n>(default: 100)
- Options:
- Search by feature tag:
ranex atlas search-by-feature <feature> - Count artifacts:
ranex atlas count - Health/status:
ranex atlas health
Patterns and quality
- Detect patterns:
ranex atlas detect-patterns - Get patterns:
ranex atlas get-patterns - Find duplicates:
ranex atlas duplicates - Detect cycles:
ranex atlas cycles
Impact analysis
- Function impact:
ranex atlas function-impact <qualified_name> - File impact:
ranex atlas file-impact <file_path>
File dependency graph
- Dependencies:
ranex atlas dependencies <file_path> - Dependents:
ranex atlas dependents <file_path>
Utilities
- Glob:
ranex atlas glob "<glob>"(default limit: 10) - Grep:
ranex atlas grep "<text>"(default limit: 10)- Option:
--path-glob "<glob>"
- Option:
- Search spans:
ranex atlas search-spans "<query>"(default limit: 10) - Read span:
ranex atlas read-span <file_path> <start_line> <end_line>- Option:
--max-bytes <n>(default: 8192)
- Option:
FastAPI analysis
- Scaling policy:
ranex atlas fastapi-scaling-policy - Scaling report:
ranex atlas fastapi-scaling-report - Router topology:
ranex atlas fastapi-router-topology - Truth capsule:
ranex atlas fastapi-truth-capsule- Options:
--method <GET|POST|...>--path </route>--operation-id <id>--handler-qualified-name <qualified.name>--mode <static>(default:static)--strict--max-spans <n>(default: 1024)--max-dependency-depth <n>(default: 8)--max-call-depth <n>(default: 6)--max-call-nodes <n>(default: 256)--include-snippets--snippet-max-lines <n>(default: 0)
- Options:
Firewall commands
All Firewall commands are under ranex firewall ....
Common options:
--project-root <path>(default: current directory)--json(JSON output)
Commands:
Import checking
- Check one import:
ranex firewall check-import <import_path>- Exit code:
0allowed,2blocked/unknown/typosquat
- Exit code:
- Check multiple imports:
ranex firewall check-imports <import_path>...- Exit code:
0all allowed,2at least one blocked/unknown/typosquat
- Exit code:
- Analyze a Python file:
ranex firewall analyze-file <file_path>- Exit code:
0passed,2violations found
- Exit code:
- Typosquat check:
ranex firewall typosquat <package_name>
Policy inspection
- Policy mode:
ranex firewall policy-mode - Blocked patterns:
ranex firewall blocked-patterns - Allowed packages:
ranex firewall allowed-packages - List rules:
ranex firewall list-rules - Info:
ranex firewall info
JSON output
Where available, --json prints machine-readable JSON. This is the recommended mode for automation (CI, scripts, AI assistants).