Skip to content
Arxo Arxo

Interactive Mode

Interactive mode provides a guided, prompt-based workflow for running architecture analysis. Perfect for beginners, exploratory analysis, or when you don’t remember all the CLI options.

Instead of memorizing flags and options, interactive mode asks you questions:

Terminal window
arxo analyze --interactive

What it prompts for:

  1. Project path - Directory to analyze
  2. Analysis preset - Which preset to use (quick, ci, risk, etc.)
  3. Output file - Where to save results (optional)

Terminal window
arxo analyze --interactive

Example session:

🔍 Arxo Interactive Analysis
? Select project directory:
> . (current directory)
Browse...
Enter path manually
? Select analysis preset:
> quick - Fast feedback (1-5s)
ci - CI/CD checks (10-30s)
risk - Technical debt audit (30-60s)
coupling - Dependency analysis (30-60s)
security - Security review (30-90s)
runtime - Operational analysis (requires telemetry)
ai - AI/LLM projects (30-60s)
full - Comprehensive (2-5min)
? Save report to file?
> No, display in terminal
Yes, save as JSON
Yes, save as HTML
Yes, save as YAML snapshot
🚀 Starting analysis...
✓ Parsed 247 files
✓ Built import graph (183 nodes, 412 edges)
✓ Computed 8 metrics
📊 Results:
...

Interactive mode offers multiple ways to select the project:

Option 1: Current Directory

? Select project directory:
> . (current directory)

Option 2: Browse Filesystem

? Select project directory:
. (current directory)
> Browse...

Opens a file browser to select a directory.

Option 3: Manual Entry

? Select project directory:
. (current directory)
Browse...
> Enter path manually
? Enter project path: /path/to/my-app

Each preset shows:

  • Name - Preset identifier
  • Description - What it does
  • Speed - Estimated runtime
? Select analysis preset:
> quick - Fast feedback (1-5s)
Metrics: SCC, L1 Overview
ci - CI/CD checks (10-30s)
Metrics: SCC, Propagation Cost, Smells, Hierarchy
risk - Technical debt audit (30-60s)
Metrics: SCC, Propagation Cost, Smells, Centrality,
MSR, Change Coupling

Choose how to view results:

? Save report to file?
> No, display in terminal
Yes, save as JSON → report.json
Yes, save as HTML → report.html
Yes, save as YAML snapshot → report.yaml
Yes, save as SARIF → report.sarif
Yes, save as MessagePack → report.mpk

Custom filename:

? Save report to file?
No, display in terminal
> Yes, save as JSON
? Output filename: my-analysis.json

If .arxo.yaml exists in the project:

✓ Found configuration: .arxo.yaml
? Use existing config or select preset?
> Use .arxo.yaml config
Ignore config, use preset

Scenario: New to Arxo, want to explore

Terminal window
arxo analyze --interactive
  1. Select current directory (.)
  2. Choose quick preset
  3. Display in terminal
  4. Review results
  5. Re-run with risk or full for deeper analysis

Scenario: Downloaded a project, want quick assessment

Terminal window
cd ~/Downloads/new-project
arxo analyze --interactive
  1. Current directory is auto-selected
  2. Choose quick for fast overview
  3. Save as HTML to share with team

Scenario: Compare multiple projects

Terminal window
arxo analyze --interactive

Run multiple times:

  1. First run: Select project-a/, preset coupling, save as project-a.json
  2. Second run: Select project-b/, preset coupling, save as project-b.json
  3. Compare: Use jq to compare results

Scenario: Quick analysis without creating config

Terminal window
# Instead of:
arxo analyze --preset ci --format json --output report.json
# Use interactive mode:
arxo analyze --interactive

Faster for one-off analysis.

Scenario: Teaching Arxo to team members

Interactive mode is self-documenting:

  • Shows all available presets
  • Explains what each preset does
  • Guides through output options

During interactive prompts:

KeyAction
/ Navigate options
EnterSelect option
SpaceToggle checkbox (multi-select)
Ctrl+CCancel and exit
Ctrl+DCancel and exit
/Search/filter (in long lists)

You can pre-fill some answers:

Terminal window
# Pre-select path, prompt for preset and output
arxo analyze --interactive --path ./my-project
# Pre-select path and preset, prompt for output only
arxo analyze --interactive --path ./my-project --preset ci
# Pre-select everything (no prompts)
arxo analyze --path ./my-project --preset ci --output report.json

When does interactive mode activate?

  • Explicit: --interactive flag
  • Implicit: Missing required arguments (not in all versions)

Some prompts support multi-select:

? Select metrics to run:
◉ scc
◯ propagation_cost
◉ centrality
◯ modularity
◯ smells
(Use Space to toggle, Enter to confirm)

Access multi-select:

Terminal window
arxo analyze --interactive --custom-metrics

Interactive mode can generate config files:

Terminal window
arxo init --interactive

Prompts:

  1. Project type (TypeScript, Python, Rust, etc.)
  2. Analysis goals (CI, security, coupling, etc.)
  3. Policy strictness (Strict, Moderate, Lenient)
  4. Output preferences

Generates: .arxo.yaml with recommended settings


TaskInteractive ModeCLI Flags
New users✅ Beginner-friendly❌ Must learn flags
Speed⏱️ Slower (prompts)⚡ Faster (direct)
Discoverability✅ Shows all options❌ Must read docs
Automation❌ Not scriptable✅ Fully scriptable
Memory✅ No flags to remember❌ Must remember flags
CI/CD❌ Not suitable✅ Perfect for CI

Recommendation:

  • Development/Exploration: Use --interactive
  • Scripts/CI/CD: Use explicit flags

Error: “Interactive mode not supported in this terminal”

Cause: Running in non-interactive environment (CI, cron, etc.)

Solution: Use explicit flags:

Terminal window
arxo analyze --preset ci --format json

Issue: Hangs after running --interactive

Causes:

  1. Stdin not connected: Redirected input
  2. Terminal emulator: Some terminals don’t support interactive prompts

Solutions:

  1. Check stdin:

    Terminal window
    # ❌ Won't work
    echo "" | arxo analyze --interactive
    # ✅ Works
    arxo analyze --interactive
  2. Use explicit flags:

    Terminal window
    arxo analyze --path . --preset quick

Issue: File browser is slow

Solution: Enter path manually:

? Select project directory:
> Enter path manually

Issue: Project not listed in browse mode

Solution: Use absolute path:

? Enter project path: /full/path/to/project

Terminal window
$ arxo analyze --interactive
? Select project directory: . (current directory)
? Select analysis preset: quick
? Save report to file? No, display in terminal
Analysis complete!
No circular dependencies
System coupling: 0.12 (good)
Terminal window
$ arxo analyze --interactive
? Select project directory: ./frontend
? Select analysis preset: risk
? Save report to file? Yes, save as HTML
? Output filename: risk-report.html
Report saved to: risk-report.html
$ open risk-report.html
Terminal window
$ arxo analyze --interactive
? Select project directory: Browse...
[File browser opens]
Selected: /path/to/api-service
? Select analysis preset: security
? Save report to file? Yes, save as JSON
? Output filename: security-audit.json
Analysis complete
⚠️ 3 policy violations detected
Report saved to: security-audit.json
Terminal window
$ arxo analyze --interactive --custom-metrics
? Select project directory: .
? Select metrics to run:
scc
propagation_cost
smells
hierarchy
modularity
? Save report to file? Yes, save as JSON
Running 3 metrics...

For new projects:

Terminal window
arxo analyze --interactive
# Choose "quick" first
# Then re-run with "risk" or "full" if needed

HTML reports are self-contained and easy to share:

Terminal window
arxo analyze --interactive
# Choose "Yes, save as HTML"
# Email/Slack the HTML file to team

Interactive mode is self-documenting:

  • Team onboarding: Walk through options together
  • Workshops: Demonstrate each preset
  • Documentation: Screenshot the prompts

Best of both worlds:

Terminal window
# Create config with interactive wizard
arxo init --interactive
# Run analysis with interactive preset selection
arxo analyze --interactive
# Choose "Use .arxo.yaml config"

Create shell aliases:

Terminal window
# ~/.bashrc or ~/.zshrc
alias arxoi='arxo analyze --interactive'
alias arxoq='arxo analyze --preset quick'
alias arxor='arxo analyze --preset risk --format html'

Usage:

Terminal window
arxoi # Interactive mode
arxoq # Quick check
arxor # Risk report (HTML)

While interactive mode isn’t designed for automation, you can use expect or yes for demos:

Terminal window
# Auto-select first option for all prompts (not recommended)
yes "" | arxo analyze --interactive
#!/usr/bin/expect -f
spawn arxo analyze --interactive
# Select current directory
expect "Select project directory:"
send "\r"
# Select "quick" preset
expect "Select analysis preset:"
send "\r"
# Don't save to file
expect "Save report to file?"
send "\r"
expect eof

Note: For real automation, use CLI flags instead.


|| Feature | Interactive CLI | VSCode Extension | MCP (AI Assistant) | ||---------|----------------|------------------|-------------------| || Installation | CLI only | CLI + Extension | CLI + MCP Server | || Interface | Terminal prompts | GUI panels | Natural language | || Visualizations | Text-based | Rich webviews | AI-generated summaries | || File integration | Manual | Automatic (on save) | On-demand | || Ideal for | Quick checks, demos | Continuous development | AI-driven workflows |

Use all three:

  • Interactive CLI for one-off analysis and demos
  • VSCode extension for day-to-day development with visual feedback
  • MCP integration for AI-assisted architecture reviews (see MCP Workflows)

MCP Example:

You: "Check my project for circular dependencies"
AI: [Runs check_cycles via MCP] "Found 2 circular dependency groups..."

Interactive mode supports:

  • Keyboard navigation: Arrow keys, Enter, Space
  • Screen readers: ARIA labels on prompts
  • High-contrast: Terminal color schemes respected

For users with accessibility needs:

Terminal window
# Use explicit flags for screen reader compatibility
arxo analyze --preset quick --quiet

Upcoming features (check release notes):

  • Config preview: Preview generated config before saving
  • Metric search: Filter metrics by keyword
  • History: Resume previous selections
  • Validation: Real-time path/config validation
  • Telemetry prompt: Guide telemetry file selection for runtime preset