|
| 1 | +# CLI Display Modes |
| 2 | + |
| 3 | +The `sync-ctl analyze` command now offers multiple display modes to present analysis results in different formats optimized for various use cases. |
| 4 | + |
| 5 | +## Display Options |
| 6 | + |
| 7 | +### 1. Matrix View (Default) - `--display matrix` |
| 8 | + |
| 9 | +The matrix view provides a modern, compact dashboard that's easy to scan and compare projects side-by-side. This is the new default display mode. |
| 10 | + |
| 11 | +```bash |
| 12 | +sync-ctl analyze . --display matrix |
| 13 | +# or simply |
| 14 | +sync-ctl analyze . |
| 15 | +``` |
| 16 | + |
| 17 | +**Example Output:** |
| 18 | +``` |
| 19 | +═══════════════════════════════════════════════════════════════════════════════════════════════════ |
| 20 | +📊 PROJECT ANALYSIS DASHBOARD |
| 21 | +═══════════════════════════════════════════════════════════════════════════════════════════════════ |
| 22 | +
|
| 23 | +┌─ Architecture Overview ────────────────────────────────────────────────────────────────────────┐ |
| 24 | +│ Type: Monorepo (3 projects) │ |
| 25 | +│ Pattern: Fullstack │ |
| 26 | +│ Full-stack app with frontend/backend separation │ |
| 27 | +└─────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 28 | +
|
| 29 | +┌─ Technology Stack ─────────────────────────────────────────────────────────────────────────────┐ |
| 30 | +│ Languages: TypeScript │ |
| 31 | +│ Frameworks: Encore, Tanstack Start │ |
| 32 | +│ Databases: Drizzle ORM │ |
| 33 | +└─────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 34 | +
|
| 35 | +┌─ Projects Matrix ──────────────────────────────────────────────────────────────────────────────┐ |
| 36 | +│ ┌─────────────────┬──────────────┬───────────┬─────────────────┬───────┬────────┬──────┐ │ |
| 37 | +│ │ Project │ Type │ Languages │ Main Tech │ Ports │ Docker │ Deps │ │ |
| 38 | +│ ├─────────────────┼──────────────┼───────────┼─────────────────┼───────┼────────┼──────┤ │ |
| 39 | +│ │ ⚙️ backend │ Backend │ TypeScript│ Encore │ 4000 │ ✓ │ 32 │ │ |
| 40 | +│ │ 🏗️ devops-agent │ Infrastructure│ TypeScript│ - │ - │ ✗ │ 5 │ │ |
| 41 | +│ │ 🌐 frontend │ Frontend │ TypeScript│ Tanstack Start │ 3000 │ ✓ │ 123 │ │ |
| 42 | +│ └─────────────────┴──────────────┴───────────┴─────────────────┴───────┴────────┴──────┘ │ |
| 43 | +└─────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 44 | +
|
| 45 | +┌─ Docker Infrastructure ────────────────────────────────────────────────────────────────────────┐ |
| 46 | +│ Dockerfiles: 2 │ |
| 47 | +│ Compose Files: 2 │ |
| 48 | +│ Total Services: 5 │ |
| 49 | +│ Orchestration Patterns: Microservices │ |
| 50 | +│ ───────────────────────────────────────────────────────────────────────────────────────────── │ |
| 51 | +│ Service Connectivity: │ |
| 52 | +│ encore-postgres: 5431:5432 │ |
| 53 | +│ encore: 4000:8080 → encore-postgres │ |
| 54 | +│ intellitask-app: 3000:3000 │ |
| 55 | +└─────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 56 | +
|
| 57 | +┌─ Analysis Metrics ─────────────────────────────────────────────────────────────────────────────┐ |
| 58 | +│ ⏱️ Duration: 57ms 📁 Files: 294 🎯 Score: 87% 🔖 Version: 0.3.0 │ |
| 59 | +└─────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 60 | +
|
| 61 | +═══════════════════════════════════════════════════════════════════════════════════════════════════ |
| 62 | +``` |
| 63 | + |
| 64 | +### 2. Summary View - `--display summary` |
| 65 | + |
| 66 | +A brief overview of the analysis results, perfect for quick checks or CI/CD pipelines. |
| 67 | + |
| 68 | +```bash |
| 69 | +sync-ctl analyze . --display summary |
| 70 | +``` |
| 71 | + |
| 72 | +**Example Output:** |
| 73 | +``` |
| 74 | +▶ PROJECT ANALYSIS SUMMARY |
| 75 | +────────────────────────────────────────────────── |
| 76 | +│ Architecture: Monorepo (3 projects) |
| 77 | +│ Pattern: Fullstack |
| 78 | +│ Stack: TypeScript |
| 79 | +│ Frameworks: Encore, Tanstack Start |
| 80 | +│ Analysis Time: 57ms |
| 81 | +│ Confidence: 87% |
| 82 | +────────────────────────────────────────────────── |
| 83 | +``` |
| 84 | + |
| 85 | +### 3. Detailed View (Legacy) - `--display detailed` or `-d` |
| 86 | + |
| 87 | +The traditional verbose output with all details in a vertical layout. Useful when you need to see everything about each project. |
| 88 | + |
| 89 | +```bash |
| 90 | +sync-ctl analyze . --display detailed |
| 91 | +# or for backward compatibility |
| 92 | +sync-ctl analyze . -d |
| 93 | +``` |
| 94 | + |
| 95 | +This produces the traditional long-form output with all details about each project. |
| 96 | + |
| 97 | +### 4. JSON Output - `--json` |
| 98 | + |
| 99 | +Machine-readable JSON output for integration with other tools or programmatic processing. |
| 100 | + |
| 101 | +```bash |
| 102 | +sync-ctl analyze . --json |
| 103 | +``` |
| 104 | + |
| 105 | +## Choosing the Right Display Mode |
| 106 | + |
| 107 | +- **Matrix View**: Best for daily use, comparing multiple projects, and getting a quick overview with key metrics |
| 108 | +- **Summary View**: Ideal for CI/CD pipelines, scripts, or when you just need basic information |
| 109 | +- **Detailed View**: Use when you need to see every detail about the analysis, including all dependencies, scripts, and configurations |
| 110 | +- **JSON**: Perfect for integration with other tools, creating reports, or feeding data to dashboards |
| 111 | + |
| 112 | +## Benefits of the New Matrix View |
| 113 | + |
| 114 | +1. **Reduced Scrolling**: All important information fits on one screen |
| 115 | +2. **Easy Comparison**: Projects are displayed side-by-side in a table |
| 116 | +3. **Visual Hierarchy**: Box-drawing characters and colors create clear sections |
| 117 | +4. **Key Metrics Focus**: Shows only the most important information by default |
| 118 | +5. **Modern Appearance**: Clean, professional look with proper alignment |
| 119 | +6. **LLM-Friendly**: The structured format is easy for AI assistants to parse and understand |
| 120 | + |
| 121 | +## Color Coding |
| 122 | + |
| 123 | +The matrix view uses colors strategically: |
| 124 | +- **Blue**: Headers and structural elements |
| 125 | +- **Yellow**: Important values and counts |
| 126 | +- **Green**: Success indicators and positive metrics |
| 127 | +- **Magenta**: Frameworks and technologies |
| 128 | +- **Cyan**: Interactive elements and services |
| 129 | +- **Red**: Error states or missing components |
| 130 | + |
| 131 | +## Tips |
| 132 | + |
| 133 | +- The matrix view automatically adjusts based on terminal width |
| 134 | +- Use `--no-color` to disable colors if needed |
| 135 | +- Pipe to `less` for scrolling in detailed view: `sync-ctl analyze . -d | less -R` |
| 136 | +- Combine with `jq` for JSON processing: `sync-ctl analyze . --json | jq '.projects[].name'` |
0 commit comments