Skip to content

Commit 44f4cae

Browse files
committed
Feature/condense overview with new representation (#29)
* chore: release v0.3.0 * feat: Optimized Analysis Dashboard Overview with new default matrix option
1 parent e23ad51 commit 44f4cae

10 files changed

Lines changed: 1886 additions & 502 deletions

File tree

Cargo.lock

Lines changed: 100 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ once_cell = "1"
3131
rayon = "1.7"
3232
termcolor = "1"
3333
chrono = { version = "0.4", features = ["serde"] }
34+
colored = "2"
35+
prettytable = "0.10"
3436

3537
# Vulnerability checking dependencies
3638
rustsec = "0.29"

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,25 @@ sync-ctl analyze /path/to/your/project
110110

111111
# Get JSON output
112112
sync-ctl analyze --json > analysis.json
113+
114+
# Use different display modes (NEW!)
115+
sync-ctl analyze --display matrix # Modern dashboard view (default)
116+
sync-ctl analyze --display summary # Brief summary only
117+
sync-ctl analyze --display detailed # Legacy verbose output
118+
sync-ctl analyze -d # Shorthand for detailed
113119
```
114120

121+
### 📊 Display Modes (NEW!)
122+
123+
The analyze command now offers multiple display formats:
124+
125+
- **Matrix View** (default): A modern, compact dashboard with side-by-side project comparison
126+
- **Summary View**: Brief overview perfect for CI/CD pipelines
127+
- **Detailed View**: Traditional verbose output with all project details
128+
- **JSON**: Machine-readable format for integration with other tools
129+
130+
See the [Display Modes Documentation](docs/cli-display-modes.md) for visual examples and more details.
131+
115132
### Check for Vulnerabilities
116133

117134
```bash

docs/cli-display-modes.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
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

Comments
 (0)