Interactive Mode
Interactive Mode
Section titled “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.
Overview
Section titled “Overview”Instead of memorizing flags and options, interactive mode asks you questions:
arxo analyze --interactiveWhat it prompts for:
- Project path - Directory to analyze
- Analysis preset - Which preset to use (quick, ci, risk, etc.)
- Output file - Where to save results (optional)
Getting Started
Section titled “Getting Started”Basic Interactive Analysis
Section titled “Basic Interactive Analysis”arxo analyze --interactiveExample 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:...Features
Section titled “Features”1. Smart Path Selection
Section titled “1. Smart Path Selection”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-app2. Preset Descriptions
Section titled “2. Preset Descriptions”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 Coupling3. Output Format Selection
Section titled “3. Output Format Selection”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.mpkCustom filename:
? Save report to file? No, display in terminal > Yes, save as JSON
? Output filename: my-analysis.json4. Configuration Detection
Section titled “4. Configuration Detection”If .arxo.yaml exists in the project:
✓ Found configuration: .arxo.yaml
? Use existing config or select preset? > Use .arxo.yaml config Ignore config, use presetUse Cases
Section titled “Use Cases”1. First-Time User
Section titled “1. First-Time User”Scenario: New to Arxo, want to explore
arxo analyze --interactive- Select current directory (
.) - Choose
quickpreset - Display in terminal
- Review results
- Re-run with
riskorfullfor deeper analysis
2. Evaluating a New Project
Section titled “2. Evaluating a New Project”Scenario: Downloaded a project, want quick assessment
cd ~/Downloads/new-projectarxo analyze --interactive- Current directory is auto-selected
- Choose
quickfor fast overview - Save as HTML to share with team
3. Comparative Analysis
Section titled “3. Comparative Analysis”Scenario: Compare multiple projects
arxo analyze --interactiveRun multiple times:
- First run: Select
project-a/, presetcoupling, save asproject-a.json - Second run: Select
project-b/, presetcoupling, save asproject-b.json - Compare: Use
jqto compare results
4. No Config File
Section titled “4. No Config File”Scenario: Quick analysis without creating config
# Instead of:arxo analyze --preset ci --format json --output report.json
# Use interactive mode:arxo analyze --interactiveFaster for one-off analysis.
5. Teaching/Demos
Section titled “5. Teaching/Demos”Scenario: Teaching Arxo to team members
Interactive mode is self-documenting:
- Shows all available presets
- Explains what each preset does
- Guides through output options
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”During interactive prompts:
| Key | Action |
|---|---|
↑ / ↓ | Navigate options |
Enter | Select option |
Space | Toggle checkbox (multi-select) |
Ctrl+C | Cancel and exit |
Ctrl+D | Cancel and exit |
/ | Search/filter (in long lists) |
Advanced Usage
Section titled “Advanced Usage”Skip Prompts with Flags
Section titled “Skip Prompts with Flags”You can pre-fill some answers:
# Pre-select path, prompt for preset and outputarxo analyze --interactive --path ./my-project
# Pre-select path and preset, prompt for output onlyarxo analyze --interactive --path ./my-project --preset ci
# Pre-select everything (no prompts)arxo analyze --path ./my-project --preset ci --output report.jsonWhen does interactive mode activate?
- Explicit:
--interactiveflag - Implicit: Missing required arguments (not in all versions)
Multi-Select (Advanced)
Section titled “Multi-Select (Advanced)”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:
arxo analyze --interactive --custom-metricsConfiguration Wizard
Section titled “Configuration Wizard”Interactive mode can generate config files:
arxo init --interactivePrompts:
- Project type (TypeScript, Python, Rust, etc.)
- Analysis goals (CI, security, coupling, etc.)
- Policy strictness (Strict, Moderate, Lenient)
- Output preferences
Generates: .arxo.yaml with recommended settings
Comparison with CLI Flags
Section titled “Comparison with CLI Flags”| Task | Interactive Mode | CLI 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
Troubleshooting
Section titled “Troubleshooting”Terminal Not Supported
Section titled “Terminal Not Supported”Error: “Interactive mode not supported in this terminal”
Cause: Running in non-interactive environment (CI, cron, etc.)
Solution: Use explicit flags:
arxo analyze --preset ci --format jsonPrompt Doesn’t Appear
Section titled “Prompt Doesn’t Appear”Issue: Hangs after running --interactive
Causes:
- Stdin not connected: Redirected input
- Terminal emulator: Some terminals don’t support interactive prompts
Solutions:
-
Check stdin:
Terminal window # ❌ Won't workecho "" | arxo analyze --interactive# ✅ Worksarxo analyze --interactive -
Use explicit flags:
Terminal window arxo analyze --path . --preset quick
Slow Browsing
Section titled “Slow Browsing”Issue: File browser is slow
Solution: Enter path manually:
? Select project directory: > Enter path manuallyCan’t Find Project
Section titled “Can’t Find Project”Issue: Project not listed in browse mode
Solution: Use absolute path:
? Enter project path: /full/path/to/projectExamples
Section titled “Examples”Example 1: Quick Health Check
Section titled “Example 1: Quick Health Check”$ 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)Example 2: Generate HTML Report
Section titled “Example 2: Generate HTML Report”$ 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.htmlExample 3: Security Audit
Section titled “Example 3: Security Audit”$ 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.jsonExample 4: Custom Metrics (Advanced)
Section titled “Example 4: Custom Metrics (Advanced)”$ 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...Tips and Best Practices
Section titled “Tips and Best Practices”1. Start with Quick Preset
Section titled “1. Start with Quick Preset”For new projects:
arxo analyze --interactive# Choose "quick" first# Then re-run with "risk" or "full" if needed2. Save HTML for Sharing
Section titled “2. Save HTML for Sharing”HTML reports are self-contained and easy to share:
arxo analyze --interactive# Choose "Yes, save as HTML"# Email/Slack the HTML file to team3. Use for Teaching
Section titled “3. Use for Teaching”Interactive mode is self-documenting:
- Team onboarding: Walk through options together
- Workshops: Demonstrate each preset
- Documentation: Screenshot the prompts
4. Combine with Config Files
Section titled “4. Combine with Config Files”Best of both worlds:
# Create config with interactive wizardarxo init --interactive
# Run analysis with interactive preset selectionarxo analyze --interactive# Choose "Use .arxo.yaml config"5. Bookmark Common Workflows
Section titled “5. Bookmark Common Workflows”Create shell aliases:
# ~/.bashrc or ~/.zshrcalias arxoi='arxo analyze --interactive'alias arxoq='arxo analyze --preset quick'alias arxor='arxo analyze --preset risk --format html'Usage:
arxoi # Interactive modearxoq # Quick checkarxor # Risk report (HTML)Scripting with Interactive Mode
Section titled “Scripting with Interactive Mode”While interactive mode isn’t designed for automation, you can use expect or yes for demos:
Using yes (Limited)
Section titled “Using yes (Limited)”# Auto-select first option for all prompts (not recommended)yes "" | arxo analyze --interactiveUsing expect (Advanced)
Section titled “Using expect (Advanced)”#!/usr/bin/expect -f
spawn arxo analyze --interactive
# Select current directoryexpect "Select project directory:"send "\r"
# Select "quick" presetexpect "Select analysis preset:"send "\r"
# Don't save to fileexpect "Save report to file?"send "\r"
expect eofNote: For real automation, use CLI flags instead.
Interactive Mode vs. IDE Extensions
Section titled “Interactive Mode vs. IDE Extensions”|| 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..."Accessibility
Section titled “Accessibility”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:
# Use explicit flags for screen reader compatibilityarxo analyze --preset quick --quietFuture Enhancements
Section titled “Future Enhancements”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
Next Steps
Section titled “Next Steps”- Quick Start - Getting started guide
- Presets - Available analysis presets
- Output Formats - Understanding reports
- MCP Workflows - AI-assisted architecture analysis
- Configuration - Config file reference
- CLI Reference - All CLI options