Skip to main content

CLI Overview

Graph-powered code analysis from your terminal. No sign-up required.

Installation

Rust CLI:

cargo install repotoire

Quick Start

# Analyze current directory
repotoire analyze .

# View findings
repotoire findings

# Check project status
repotoire status

Commands

CommandDescription
analyzeParse codebase, build graph, run 114 detectors
calibrateGenerate adaptive thresholds from your coding style
findingsList all findings with filters
fixAI-powered fixes (BYOK — Claude, GPT-4, Ollama)
graphQuery the code graph directly
doctorCheck environment setup
cleanRemove cached analysis data
initGenerate repotoire.toml config
statusShow project health summary

Adaptive Thresholds

Repotoire learns your coding patterns. On first analyze, it auto-calibrates thresholds based on your codebase's p90/p95 percentiles. No manual setup needed.

# Explicit calibration (optional)
repotoire calibrate .

# Auto-calibrates on first run, reuses profile after
repotoire analyze .

MCP Server

CommandDescription
serveStart MCP server for AI assistants

Output Formats

# Terminal (default) - rich formatting
repotoire analyze .

# JSON - for CI/CD
repotoire analyze . --format json

# Quiet - just the score
repotoire analyze . --quiet

Common Workflows

Daily Development

# Quick health check
repotoire analyze .

# Focus on critical issues
repotoire findings --severity critical,high

# Get fixes
repotoire fix

CI/CD Integration

# JSON output for parsing
repotoire analyze . --format json > results.json

# Fail on critical findings
repotoire analyze . --fail-on critical

AI Assistant Integration

# Start MCP server
repotoire serve

# In Claude/Cursor, connect to the MCP server
# Then ask: "What are the main issues in this codebase?"

Configuration

Repotoire works out of the box with sensible defaults. For customization:

# Create config file
repotoire init

# Show current config
repotoire config

Environment Variables

VariableDescription
OPENAI_API_KEYEnable AI features (ask, fix)
ANTHROPIC_API_KEYAlternative to OpenAI
REPOTOIRE_LOG_LEVELDEBUG, INFO, WARNING, ERROR

Supported Languages

  • Python
  • TypeScript / JavaScript
  • Go
  • Java
  • Rust
  • C / C++
  • C#
  • Kotlin

All languages are parsed with tree-sitter for accurate AST analysis.

Exit Codes

CodeMeaning
0Success
1General error
2Critical findings detected (with --fail-on)