project-compass 4.3.6 → 4.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1121 -22
- package/ARCHITECTURE.md +826 -10
- package/CONTRIBUTING.md +974 -10
- package/PROJECT_CONTEXT.md +404 -0
- package/README.md +637 -67
- package/assets/screenshots/ai_mode.png +0 -0
- package/assets/screenshots/art_bar.png +0 -0
- package/assets/screenshots/help_structure.png +0 -0
- package/assets/screenshots/home.png +0 -0
- package/assets/screenshots/languages_checker_omni_studio.png +0 -0
- package/assets/screenshots/task_manager.png +0 -0
- package/commands.md +841 -104
- package/package.json +5 -4
- package/src/cli.js +310 -169
- package/src/components/AIHorizon.js +138 -255
- package/src/components/Footer.js +8 -64
- package/src/components/Header.js +8 -47
- package/src/components/Navigator.js +16 -70
- package/src/components/PackageRegistry.js +4 -3
- package/src/components/ProjectArchitect.js +6 -1
- package/src/components/TaskManager.js +12 -70
- package/src/detectors/dotnet.js +3 -2
- package/src/detectors/frameworks.js +28 -28
- package/src/detectors/go.js +6 -6
- package/src/detectors/java.js +2 -1
- package/src/detectors/node.js +3 -2
- package/src/detectors/php.js +1 -1
- package/src/detectors/python.js +11 -4
- package/src/detectors/ruby.js +1 -1
- package/src/detectors/rust.js +2 -2
- package/src/detectors/utils.js +6 -7
- package/src/projectDetection.js +41 -5
- package/assets/screenshots/architect.jpg +0 -0
- package/assets/screenshots/artboard.jpg +0 -0
- package/assets/screenshots/exit-confirm.jpg +0 -0
- package/assets/screenshots/navigator.jpg +0 -0
- package/assets/screenshots/overlays.jpg +0 -0
- package/assets/screenshots/registry.jpg +0 -0
- package/assets/screenshots/studio.jpg +0 -0
- package/assets/screenshots/taskmanager.jpg +0 -0
- package/src/store/useProjectStore.js +0 -32
package/README.md
CHANGED
|
@@ -4,77 +4,647 @@
|
|
|
4
4
|
|
|
5
5
|
Project Compass is a high-performance, TUI (Terminal User Interface) workspace orchestrator built with Ink and React. It transforms your terminal into a command center for managing complex, multi-stack environments with a focus on speed, safety, and visual clarity.
|
|
6
6
|
|
|
7
|
+
---
|
|
8
|
+
|
|
7
9
|
## 🛠️ Installation
|
|
8
10
|
|
|
9
11
|
```bash
|
|
12
|
+
# Install globally via npm
|
|
10
13
|
npm install -g project-compass
|
|
14
|
+
|
|
15
|
+
# Or install from source
|
|
16
|
+
git clone https://github.com/CrimsonDevil333333/project-compass.git
|
|
17
|
+
cd project-compass
|
|
18
|
+
npm install
|
|
19
|
+
npm start
|
|
11
20
|
```
|
|
12
21
|
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 📸 Screenshot
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
13
30
|
## 🔗 Links
|
|
14
|
-
|
|
15
|
-
- **
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
###
|
|
47
|
-
- **
|
|
48
|
-
- **
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
**
|
|
31
|
+
|
|
32
|
+
- **NPM Package**: [npmjs.com/package/project-compass](https://www.npmjs.com/package/project-compass)
|
|
33
|
+
- **GitHub Repository**: [github.com/CrimsonDevil333333/project-compass](https://github.com/CrimsonDevil333333/project-compass)
|
|
34
|
+
- **Bug Reports**: [github.com/CrimsonDevil333333/project-compass/issues](https://github.com/CrimsonDevil333333/project-compass/issues)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🌌 The Navigator (Main Interface)
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
- **Automatic Discovery**: Instantly identifies **Node.js, Python, Rust, Go, Java, PHP, Ruby, .NET** projects
|
|
42
|
+
- **Accurate Framework Detection**: No hallucinations - only detects frameworks with actual dependencies (fixed in v4.3.6)
|
|
43
|
+
- **Paginated Control**: Optimized for massive workspaces. View projects in clean, manageable pages with **Page Up / Page Down** support
|
|
44
|
+
- **Configurable UI**: Customize your view with `maxVisibleProjects` and toggleable Art Boards and Help Cards
|
|
45
|
+
- **Real-time Scanning**: Projects are detected automatically when you navigate to a directory
|
|
46
|
+
|
|
47
|
+
### Supported Languages & Detection
|
|
48
|
+
| Language | Manifest Files | Package Managers | Priority |
|
|
49
|
+
|----------|----------------|-------------------|----------|
|
|
50
|
+
| **Node.js** | `package.json` | npm, pnpm, yarn, bun | 100 |
|
|
51
|
+
| **Python** | `pyproject.toml`, `requirements.txt`, `setup.py`, `Pipfile`, `manage.py` | uv, poetry, pipenv, pip | 95 |
|
|
52
|
+
| **Rust** | `Cargo.toml` | cargo | 90 |
|
|
53
|
+
| **Go** | `go.mod` | go | 85 |
|
|
54
|
+
| **Java** | `pom.xml`, `build.gradle`, `build.gradle.kts` | maven, gradle | 80 |
|
|
55
|
+
| **PHP** | `composer.json` | composer | 75 |
|
|
56
|
+
| **Ruby** | `Gemfile` | bundler | 70 |
|
|
57
|
+
| **.NET** | `*.csproj`, `*.fsproj` | dotnet | 65 |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 🛰️ Orbit Task Manager (`Shift+T`)
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
- **Background Orchestration**: Keep tasks running while you navigate
|
|
65
|
+
- **Process Management**: Kill (`Shift+K`) or Rename (`Shift+R`) background tasks on the fly
|
|
66
|
+
- **Live Log Streaming**: Real-time output with scroll support (`Shift+↑/↓`)
|
|
67
|
+
- **Log Management**: Clear logs (`Shift+X`) or export to file (`Shift+E`)
|
|
68
|
+
- **Multi-Task Support**: Run multiple commands simultaneously
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 📦 Package Registry (`Shift+P`)
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
- **Native Logic**: Automatically uses your project's preferred package manager
|
|
78
|
+
- Node.js: npm, pnpm, yarn, bun
|
|
79
|
+
- Python: uv, poetry, pipenv, pip
|
|
80
|
+
- Rust: cargo
|
|
81
|
+
- Go: go
|
|
82
|
+
- Java: maven, gradle
|
|
83
|
+
- PHP: composer
|
|
84
|
+
- Ruby: bundler
|
|
85
|
+
- .NET: dotnet
|
|
86
|
+
- **Internal Switcher**: Quick-swap between detected projects directly inside the registry
|
|
87
|
+
- **Add/Remove Packages**: Interactive package management
|
|
88
|
+
- **Python Virtual Environments**: Create venv with `V` key
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 🏗️ Project Architect (`Shift+N`)
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
- **Modern Templates**: Scaffold high-performance projects with built-in support for:
|
|
96
|
+
- **Next.js** (npm or Bun)
|
|
97
|
+
- **React** (Vite with pnpm or npm)
|
|
98
|
+
- **Vue** (Vite)
|
|
99
|
+
- **Rust** (Cargo binary)
|
|
100
|
+
- **Django** (startproject)
|
|
101
|
+
- **Python** (Basic directory)
|
|
102
|
+
- **Go** (mod init)
|
|
103
|
+
|
|
104
|
+
### CLI Alternative (Non-TUI)
|
|
105
|
+
```bash
|
|
106
|
+
project-compass --scaffold nextjs --name my-app --dir /path/to/output
|
|
107
|
+
project-compass --scaffold python-basic --name my-script --dir /tmp
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🤖 AI Horizon (`Shift+O` or `0` in Detail View)
|
|
113
|
+
|
|
114
|
+
### Features
|
|
115
|
+
- **Agentic Intelligence**: Real-world integration with **OpenRouter, Gemini, Claude, and Ollama**
|
|
116
|
+
- **DNA Mapping**: Analyzes your project structure and **injects optimized BRIT commands** (Build, Run, Install, Test) into your config
|
|
117
|
+
- **Raw AI Output**: View actual AI responses before applying
|
|
118
|
+
- **Persistent Auth**: Save your API tokens once; Compass handles the secure handshake thereafter
|
|
119
|
+
- **Project-Specific Config**: Loads `compass.config.js` from project directories
|
|
120
|
+
- **Editable Suggestions**: Review and edit AI suggestions before saving (`E` to edit)
|
|
121
|
+
- **Manual Save**: Press `S` to save suggestions to config
|
|
122
|
+
|
|
123
|
+
### Supported AI Providers
|
|
124
|
+
| Provider | Endpoint | Configuration |
|
|
125
|
+
|----------|----------|----------------|
|
|
126
|
+
| **OpenRouter** | `https://openrouter.ai/api/v1/chat/completions` | Default provider |
|
|
127
|
+
| **Google Gemini** | `https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent` | Requires API key |
|
|
128
|
+
| **Anthropic Claude** | `https://api.anthropic.com/v1/messages` | Requires API key |
|
|
129
|
+
| **Ollama (Local)** | `http://localhost:11434/api/generate` | Local installation required |
|
|
130
|
+
|
|
131
|
+

|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 🔌 Infrastructure Control (`Shift+R`)
|
|
136
|
+
|
|
137
|
+
### Features
|
|
138
|
+
- **Manual Port Mapping**: Directly assign specific ports to projects
|
|
139
|
+
- **Metadata Awareness**: AI Horizon uses your manual port settings to suggest smarter deployment scripts
|
|
140
|
+
- **Config Persistence**: Settings saved to `~/.project-compass/config.json`
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 🎨 Omni-Studio & Art Board
|
|
145
|
+
|
|
146
|
+
### Omni-Studio (`Shift+A`)
|
|
147
|
+
- **Runtime Health Check**: Scans for installed languages and versions
|
|
148
|
+
- **Environment Audit**: Quick overview of available build tools
|
|
149
|
+
- **CLI Alternative**: `project-compass --studio-check`
|
|
150
|
+
|
|
151
|
+
### Art Board (`Shift+B`)
|
|
152
|
+
- **Build Atlas**: Visual representation of your workspace
|
|
153
|
+
- **Toggle Visibility**: Saved to config (`showArtBoard`)
|
|
154
|
+
|
|
155
|
+

|
|
156
|
+
|
|
157
|
+

|
|
158
|
+
|
|
159
|
+

|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## ⌨️ Complete Command Reference
|
|
164
|
+
|
|
165
|
+
### Navigation (All Modes)
|
|
166
|
+
| Key | Action | Context |
|
|
167
|
+
|-----|--------|---------|
|
|
168
|
+
| `↑` / `↓` | Move project focus | Navigator |
|
|
169
|
+
| `PgUp` / `PgDn` | Jump full project page | Navigator |
|
|
170
|
+
| `Enter` | Toggle project Detail View / Switch back from sub-views | Navigator |
|
|
171
|
+
| `Esc` | **Global Back**: Return to Main Navigator from any view | Global |
|
|
172
|
+
| `?` | Toggle help overlay | Navigator |
|
|
173
|
+
| `Shift+Q` | **Quit** application (confirms if tasks are running) | Global |
|
|
174
|
+
| `Ctrl+C` | Interrupt running command | When process running |
|
|
175
|
+
|
|
176
|
+
### Quick Actions (Detail View Only)
|
|
177
|
+
| Key | Action | Description |
|
|
178
|
+
|-----|--------|-------------|
|
|
179
|
+
| `0` | **Quick AI Analysis** | Switches to AI Horizon for selected project |
|
|
180
|
+
| `B` | **Build** project | Runs build command |
|
|
181
|
+
| `T` | **Test** project | Runs test command |
|
|
182
|
+
| `R` | **Run** project | Runs run command |
|
|
183
|
+
| `I` | **Install** dependencies | Runs install command |
|
|
184
|
+
| `1-9` | **Run numbered commands** | Execute commands 1-9 from detail view |
|
|
185
|
+
| `Shift+1-9` (A-Z) | **Run commands 10+** | Execute commands 10+ (A=10, B=11, etc.) |
|
|
186
|
+
|
|
187
|
+
### View Toggles
|
|
188
|
+
| Key | Action | Description |
|
|
189
|
+
|-----|--------|-------------|
|
|
190
|
+
| `Shift+O` | **AI Horizon** Dashboard | Workspace intelligence & analysis |
|
|
191
|
+
| `Shift+T` | **Orbit Task Manager** | Manage background processes |
|
|
192
|
+
| `Shift+P` | **Package Registry** | Dependency management |
|
|
193
|
+
| `Shift+N` | **Project Architect** | Scaffold new projects |
|
|
194
|
+
| `Shift+A` | **Omni-Studio** | Environment & runtime health |
|
|
195
|
+
|
|
196
|
+
### UI Toggles (Saved to Config)
|
|
197
|
+
| Key | Action | Config Key |
|
|
198
|
+
|-----|--------|----------|
|
|
199
|
+
| `Shift+B` | Toggle **Art Board** visibility | `showArtBoard` |
|
|
200
|
+
| `Shift+H` | Toggle **Help Cards** UI | `showHelpCards` |
|
|
201
|
+
| `Shift+S` | Toggle **Structure Guide** | `showStructureGuide` |
|
|
202
|
+
|
|
203
|
+
### Task Management
|
|
204
|
+
| Key | Action | Context |
|
|
205
|
+
|-----|--------|---------|
|
|
206
|
+
| `Shift+K` | **Kill** running process | Task Manager |
|
|
207
|
+
| `Shift+R` | **Rename** task | Task Manager |
|
|
208
|
+
| `Shift+D` | **Detach** from active task (runs in background) | Navigator |
|
|
209
|
+
| `Shift+X` | **Clear** active task output logs | Navigator |
|
|
210
|
+
| `Shift+E` | **Export** logs to a timestamped `.txt` file | Navigator |
|
|
211
|
+
| `Shift+L` | **Rerun** the last executed command | Navigator |
|
|
212
|
+
| `↑` / `↓` | Move focus between tasks | Task Manager |
|
|
213
|
+
| `Enter` | Select/deselect task | Task Manager |
|
|
214
|
+
|
|
215
|
+
### Log Scrolling
|
|
216
|
+
| Key | Action |
|
|
217
|
+
|-----|--------|
|
|
218
|
+
| `Shift+↑` | Scroll output logs up |
|
|
219
|
+
| `Shift+↓` | Scroll output logs down |
|
|
220
|
+
|
|
221
|
+
### Project Configuration
|
|
222
|
+
| Key | Action | Context |
|
|
223
|
+
|-----|--------|---------|
|
|
224
|
+
| `Shift+R` | **Configure Port** / Rename task | Detail View / Task Manager |
|
|
225
|
+
| `Shift+C` | **Add Custom Command** (`label\|cmd`) | Detail View |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 💻 Complete CLI Reference (Non-TUI Mode)
|
|
230
|
+
|
|
231
|
+
### Basic Usage
|
|
232
|
+
```bash
|
|
233
|
+
# Show help
|
|
234
|
+
project-compass --help
|
|
235
|
+
project-compass -h
|
|
236
|
+
|
|
237
|
+
# Show version
|
|
238
|
+
project-compass --version
|
|
239
|
+
project-compass -v
|
|
240
|
+
|
|
241
|
+
# Launch TUI (default: navigator view)
|
|
242
|
+
project-compass
|
|
243
|
+
project-compass --dir /path/to/workspace
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Direct View Launch
|
|
247
|
+
```bash
|
|
248
|
+
# Launch directly into specific views
|
|
249
|
+
project-compass --studio # Launch in Studio view
|
|
250
|
+
project-compass --ai # Launch in AI Horizon view
|
|
251
|
+
project-compass --task # Launch in Task Manager view
|
|
252
|
+
project-compass --tasks # Alias for --task
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Project Detection (No TUI)
|
|
256
|
+
```bash
|
|
257
|
+
# List detected projects with details
|
|
258
|
+
project-compass --mode test
|
|
259
|
+
project-compass --dir /path/to/workspace --mode test
|
|
260
|
+
|
|
261
|
+
# List projects with full details
|
|
262
|
+
project-compass --list-projects
|
|
263
|
+
project-compass --list-projects --dir /path/to/workspace
|
|
264
|
+
|
|
265
|
+
# Get project info by index
|
|
266
|
+
project-compass --project-info 0 --dir /path/to/workspace
|
|
267
|
+
|
|
268
|
+
# Output as JSON (for scripting/automation)
|
|
269
|
+
project-compass --list-projects --json
|
|
270
|
+
project-compass --project-info 0 --json
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Run Commands Directly (No TUI)
|
|
274
|
+
```bash
|
|
275
|
+
# Run any command in a project directory
|
|
276
|
+
project-compass --run "npm install" --dir /path/to/project
|
|
277
|
+
project-compass --run "uv sync" --dir /path/to/python
|
|
278
|
+
project-compass --run "cargo build" --dir /path/to/rust
|
|
279
|
+
project-compass --run "go mod tidy" --dir /path/to/go
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Package Management (No TUI)
|
|
283
|
+
```bash
|
|
284
|
+
# Add packages to project
|
|
285
|
+
project-compass --add-pkg "express" --dir /path/to/node-project
|
|
286
|
+
project-compass --add-pkg "fastapi" --dir /path/to/python-project
|
|
287
|
+
|
|
288
|
+
# Remove packages from project
|
|
289
|
+
project-compass --remove-pkg "lodash" --dir /path/to/node-project
|
|
290
|
+
project-compass --remove-pkg "requests" --dir /path/to/python-project
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Project Scaffolding (No TUI)
|
|
294
|
+
```bash
|
|
295
|
+
# Create new projects from templates
|
|
296
|
+
project-compass --scaffold nextjs --name my-app --dir /path/to/output
|
|
297
|
+
project-compass --scaffold nextjs-bun --name my-app --dir /path/to/output
|
|
298
|
+
project-compass --scaffold react-vite --name my-app --dir /path/to/output
|
|
299
|
+
project-compass --scaffold react-vite-npm --name my-app --dir /path/to/output
|
|
300
|
+
project-compass --scaffold vue-vite --name my-app --dir /path/to/output
|
|
301
|
+
project-compass --scaffold rust --name my-app --dir /path/to/output
|
|
302
|
+
project-compass --scaffold django --name my-app --dir /path/to/output
|
|
303
|
+
project-compass --scaffold python-basic --name my-app --dir /path/to/output
|
|
304
|
+
project-compass --scaffold go --name my-app --dir /path/to/output
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Available Templates:
|
|
308
|
+
- `nextjs` - Next.js with npm
|
|
309
|
+
- `nextjs-bun` - Next.js with Bun
|
|
310
|
+
- `react-vite` - React with Vite (pnpm)
|
|
311
|
+
- `react-vite-npm` - React with Vite (npm)
|
|
312
|
+
- `vue-vite` - Vue with Vite
|
|
313
|
+
- `rust` - Rust Cargo binary
|
|
314
|
+
- `django` - Django project
|
|
315
|
+
- `python-basic` - Basic Python directory
|
|
316
|
+
- `go` - Go module
|
|
317
|
+
|
|
318
|
+
### Environment Health Check (No TUI)
|
|
319
|
+
```bash
|
|
320
|
+
# Check installed runtimes
|
|
321
|
+
project-compass --studio-check
|
|
322
|
+
|
|
323
|
+
# Output example:
|
|
324
|
+
# ✓ Node.js: v24.15.0
|
|
325
|
+
# ✓ npm: 11.12.1
|
|
326
|
+
# ✓ Python: Python 3.13.5
|
|
327
|
+
# ✗ Rust (Cargo): not installed
|
|
328
|
+
# ✓ Go: go version go1.24.4 linux/arm64
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### AI Analysis
|
|
332
|
+
```bash
|
|
333
|
+
# AI analysis requires interactive TUI mode for API configuration
|
|
334
|
+
project-compass --ai
|
|
335
|
+
project-compass --ai --dir /path/to/project
|
|
336
|
+
|
|
337
|
+
# Note: --ai-analyze flag shows message to use TUI mode
|
|
338
|
+
project-compass --ai-analyze # Shows: "AI analysis requires interactive TUI mode"
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 🔧 Configuration
|
|
344
|
+
|
|
345
|
+
### Main Config File: `~/.project-compass/config.json`
|
|
346
|
+
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"customCommands": {
|
|
350
|
+
"/path/to/project": [
|
|
351
|
+
{ "label": "My Command", "command": ["echo", "hello"], "source": "custom" }
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"showArtBoard": true,
|
|
355
|
+
"showHelpCards": false,
|
|
356
|
+
"showStructureGuide": false,
|
|
357
|
+
"maxVisibleProjects": 3,
|
|
358
|
+
"aiProvider": "openrouter",
|
|
359
|
+
"aiModel": "deepseek/deepseek-r1",
|
|
360
|
+
"aiToken": "your-api-token-here",
|
|
361
|
+
"projectMeta": {
|
|
362
|
+
"/path/to/project": { "port": "3000" }
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Configuration Options
|
|
368
|
+
| Option | Type | Default | Description |
|
|
369
|
+
|--------|------|---------|-------------|
|
|
370
|
+
| `customCommands` | Object | `{}` | Per-project custom commands |
|
|
371
|
+
| `showArtBoard` | Boolean | `true` | Show/hide the art board |
|
|
372
|
+
| `showHelpCards` | Boolean | `false` | Show/hide help cards |
|
|
373
|
+
| `showStructureGuide` | Boolean | `false` | Show/hide structure guide |
|
|
374
|
+
| `maxVisibleProjects` | Number | `3` | Projects per page in navigator |
|
|
375
|
+
| `aiProvider` | String | `"openrouter"` | AI provider ID |
|
|
376
|
+
| `aiModel` | String | `"deepseek/deepseek-r1"` | AI model to use |
|
|
377
|
+
| `aiToken` | String | `""` | API token for AI provider |
|
|
378
|
+
| `projectMeta` | Object | `{}` | Per-project metadata (ports, etc.) |
|
|
379
|
+
|
|
380
|
+
### Project-Specific Config: `compass.config.js`
|
|
381
|
+
|
|
382
|
+
Create a `compass.config.js` in your project root:
|
|
383
|
+
|
|
384
|
+
```javascript
|
|
385
|
+
export default {
|
|
386
|
+
commands: {
|
|
387
|
+
custom: {
|
|
388
|
+
label: 'My Command',
|
|
389
|
+
command: ['echo', 'hello'],
|
|
390
|
+
source: 'config'
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
frameworks: [
|
|
394
|
+
{ name: 'MyFramework', icon: '🚀' }
|
|
395
|
+
]
|
|
396
|
+
};
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
This file is automatically loaded during project detection and merged into project data.
|
|
400
|
+
|
|
401
|
+
### Custom Framework Plugins: `~/.project-compass/plugins.json`
|
|
402
|
+
|
|
403
|
+
```json
|
|
404
|
+
{
|
|
405
|
+
"plugins": [
|
|
406
|
+
{
|
|
407
|
+
"name": "My Framework",
|
|
408
|
+
"icon": "🚀",
|
|
409
|
+
"languages": ["Node.js"],
|
|
410
|
+
"files": ["my-framework.config.js"],
|
|
411
|
+
"dependencies": ["my-framework"],
|
|
412
|
+
"priority": 100,
|
|
413
|
+
"commands": {
|
|
414
|
+
"dev": {
|
|
415
|
+
"label": "Dev",
|
|
416
|
+
"command": ["my-cli", "dev"]
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## 🏗️ Built-in Framework Intelligence
|
|
427
|
+
|
|
428
|
+
### Node.js Frameworks (40+ detected)
|
|
429
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
430
|
+
|-----------|------|----------|---------------|
|
|
431
|
+
| **Next.js** | 🧭 | install, dev, build, test, start | ✓ |
|
|
432
|
+
| **React** | ⚛️ | install, dev, build, test | ✓ |
|
|
433
|
+
| **Vue.js** | 🟩 | install, dev, build, test | ✓ |
|
|
434
|
+
| **NestJS** | 🛡️ | install, dev (start:dev), build, test | ✓ |
|
|
435
|
+
| **Nuxt** | 🟢 | install, dev, build, generate | ✓ |
|
|
436
|
+
| **Express** | 🚂 | install, start, dev | ✓ |
|
|
437
|
+
| **Svelte** | 🧡 | install, dev, build, test | ✓ |
|
|
438
|
+
| **Astro** | 🚀 | install, dev, build, preview | ✓ |
|
|
439
|
+
| **Fastify** | ⚡ | install, start, dev | ✓ |
|
|
440
|
+
| **Koa** | 🎋 | install, start | ✓ |
|
|
441
|
+
| **Vite** | ⚡ | install, dev, build, preview | ✓ |
|
|
442
|
+
| **Tailwind CSS** | 🎨 | init | ✓ |
|
|
443
|
+
| **Prisma** | ◮ | install, generate, studio | ✓ |
|
|
444
|
+
| **tRPC** | 🔌 | dev, build | ✓ |
|
|
445
|
+
| **GraphQL** | ◼️ | start, dev | ✓ |
|
|
446
|
+
|
|
447
|
+
### Python Frameworks
|
|
448
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
449
|
+
|-----------|------|----------|---------------|
|
|
450
|
+
| **FastAPI** | ⚡ | install, run (uvicorn), test | ✓ |
|
|
451
|
+
| **Flask** | 🌶️ | install, run, test | ✓ |
|
|
452
|
+
| **Django** | 🌿 | install, runserver, test, migrate | ✓ |
|
|
453
|
+
| **Sanic** | 🚀 | run, test | ✓ |
|
|
454
|
+
| **AioHTTP** | 🔄 | test | ✓ |
|
|
455
|
+
| **Tornado** | 🌪️ | run, test | ✓ |
|
|
456
|
+
| **Pytest** | ✅ | run, coverage | ✓ |
|
|
457
|
+
| **SQLAlchemy** | 🗄️ | test | ✓ |
|
|
458
|
+
|
|
459
|
+
### Rust Frameworks
|
|
460
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
461
|
+
|-----------|------|----------|---------------|
|
|
462
|
+
| **Actix Web** | 🎭 | fetch, run, test, build | ✓ |
|
|
463
|
+
| **Axum** | 🗡️ | fetch, run, test | ✓ |
|
|
464
|
+
| **Rocket** | 🚀 | fetch, run, test | ✓ |
|
|
465
|
+
| **Warp** | 🌀 | run, test | ✓ |
|
|
466
|
+
| **Tokio** | ⚡ | run, test | ✓ |
|
|
467
|
+
|
|
468
|
+
### Go Frameworks
|
|
469
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
470
|
+
|-----------|------|----------|---------------|
|
|
471
|
+
| **Gin** | 🍸 | mod tidy, run, test, build | ✓ |
|
|
472
|
+
| **Fiber** | 🔥 | run, test | ✓ |
|
|
473
|
+
| **Echo** | 🔊 | run, test | ✓ |
|
|
474
|
+
| **Chi** | 🤝 | run, test | ✓ |
|
|
475
|
+
|
|
476
|
+
### Java Frameworks
|
|
477
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
478
|
+
|-----------|------|----------|---------------|
|
|
479
|
+
| **Spring Boot** | 🍃 | install, run, test, build | ✓ |
|
|
480
|
+
| **Quarkus** | ⚡ | dev, build, test | ✓ |
|
|
481
|
+
| **Micronaut** | 🚀 | run, test | ✓ |
|
|
482
|
+
|
|
483
|
+
### PHP Frameworks
|
|
484
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
485
|
+
|-----------|------|----------|---------------|
|
|
486
|
+
| **Laravel** | 🧡 | install, serve, test, migrate | ✓ |
|
|
487
|
+
| **Symfony** | 🎵 | install, server:start, test | ✓ |
|
|
488
|
+
| **CodeIgniter** | 🔥 | test | ✓ |
|
|
489
|
+
|
|
490
|
+
### Ruby Frameworks
|
|
491
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
492
|
+
|-----------|------|----------|---------------|
|
|
493
|
+
| **Ruby on Rails** | 🛤️ | install, server, test, migrate | ✓ |
|
|
494
|
+
| **Sinatra** | 🎷 | install, rackup | ✓ |
|
|
495
|
+
|
|
496
|
+
### .NET Frameworks
|
|
497
|
+
| Framework | Icon | Commands | Auto-Detected |
|
|
498
|
+
|-----------|------|----------|---------------|
|
|
499
|
+
| **ASP.NET Core** | 🔷 | restore, run, test, build | ✓ |
|
|
500
|
+
| **Blazor** | 🌀 | run, build | ✓ |
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## 🎯 Recent Fixes (v4.3.6)
|
|
505
|
+
|
|
506
|
+
### 1. Framework Hallucination Bug FIXED
|
|
507
|
+
**Problem**: Projects without frameworks were showing random frameworks (e.g., simple Python project with `main.py` was detected as FastAPI).
|
|
508
|
+
|
|
509
|
+
**Root Cause**: Framework matchers in `frameworks.js` used file existence (`hasProjectFile`) instead of dependency matching.
|
|
510
|
+
|
|
511
|
+
**Fix Applied**:
|
|
512
|
+
- `fastapi` matcher: Removed `|| hasProjectFile(project.path, 'main.py')`
|
|
513
|
+
- `django` matcher: Removed `|| hasProjectFile(project.path, 'manage.py')`
|
|
514
|
+
- Java/.NET/Ruby frameworks: Now use `dependencyMatches()` instead of file checks
|
|
515
|
+
|
|
516
|
+
**Result**: Projects without explicit framework dependencies now correctly show `Frameworks: none`.
|
|
517
|
+
|
|
518
|
+
### 2. compass-config.js Integration
|
|
519
|
+
**Problem**: `compass-config.js` existed but was never integrated into project detection.
|
|
520
|
+
|
|
521
|
+
**Fix Applied**:
|
|
522
|
+
- Added import of `loadProjectConfig` in `projectDetection.js`
|
|
523
|
+
- Integrated into `discoverProjects()` function to load `compass.config.js` from project directories
|
|
524
|
+
- Project-specific commands and frameworks from `compass.config.js` are now merged into project data
|
|
525
|
+
|
|
526
|
+
### 3. AI Horizon Improvements
|
|
527
|
+
**Problem**: AI Horizon didn't properly show raw AI output and had poor JSON parsing.
|
|
528
|
+
|
|
529
|
+
**Fix Applied**:
|
|
530
|
+
- Added `rawAIResponse` state to store raw AI output
|
|
531
|
+
- Improved JSON parsing to handle markdown code blocks (```json ... ```)
|
|
532
|
+
- Raw AI response is now displayed in the UI during review step
|
|
533
|
+
- Better error messages showing partial AI response if JSON parsing fails
|
|
534
|
+
|
|
535
|
+
### 4. Node.js Detector Fixed
|
|
536
|
+
**Problem**: `node.js` detector was adding "Node.js" as a framework.
|
|
537
|
+
|
|
538
|
+
**Fix Applied**:
|
|
539
|
+
- Detector now only adds framework if it's not the generic "Node.js" type
|
|
540
|
+
- Projects using plain Node.js without frameworks now show `Frameworks: none`
|
|
541
|
+
|
|
542
|
+
### 5. Framework Deduplication
|
|
543
|
+
**Problem**: `applyFrameworkPlugins()` could add duplicate frameworks.
|
|
544
|
+
|
|
545
|
+
**Fix Applied**:
|
|
546
|
+
- Added check to avoid adding duplicate frameworks
|
|
547
|
+
- Now preserves detector-detected frameworks and merges with plugin-detected ones
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
## 🎯 Recent Fixes (v4.3.7)
|
|
552
|
+
|
|
553
|
+
### 1. Python Binary Detection Bug FIXED
|
|
554
|
+
**Problem**: `python.js` checked if ALL of `['python3', 'python', 'uv']` binaries existed, causing false "Runtime missing" warnings when only `python` or `python3` was available.
|
|
555
|
+
|
|
556
|
+
**Root Cause**: `binaries.filter(b => !checkBinary(b))` treats alternate Python binary names as separate requirements.
|
|
557
|
+
|
|
558
|
+
**Fix Applied**:
|
|
559
|
+
- Now checks if AT LEAST ONE Python runtime exists
|
|
560
|
+
- Only shows "Runtime missing" when no Python runtime is found
|
|
561
|
+
|
|
562
|
+
### 2. Removed Unused Store
|
|
563
|
+
**Problem**: `src/store/useProjectStore.js` existed but was never imported anywhere.
|
|
564
|
+
|
|
565
|
+
**Fix Applied**:
|
|
566
|
+
- Removed dead code file
|
|
567
|
+
- Updated all documentation
|
|
568
|
+
|
|
569
|
+
### 4. Added Screenshots to README
|
|
570
|
+
**Problem**: README had no images, and package wouldn't show screenshots on npmjs.com because of relative paths.
|
|
571
|
+
|
|
572
|
+
**Fix Applied**:
|
|
573
|
+
- Added 6 screenshots using raw GitHub URLs
|
|
574
|
+
- Navigator Home, Task Manager, AI Horizon, Omni-Studio, Art Board, Help Structure
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## 🚀 Performance
|
|
579
|
+
|
|
580
|
+
- **Fast Scanning**: Uses `fast-glob` for high-speed project discovery
|
|
581
|
+
- **Non-Blocking**: Heavy operations (globbing, command execution) are offloaded from the main render loop
|
|
582
|
+
- **Smart Caching**: Framework plugins are cached after first load
|
|
583
|
+
- **Memory Efficient**: Log buffers capped at 500 lines per task
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
## 🔒 Security
|
|
588
|
+
|
|
589
|
+
- **No Arbitrary Execution**: Commands are only executed when explicitly requested by the user
|
|
590
|
+
- **Local Storage**: API tokens stored locally in `~/.project-compass/config.json`
|
|
591
|
+
- **Workspace Boundaries**: Project detection respects directory structure
|
|
592
|
+
- **Process Isolation**: Background tasks are managed via `execa` with proper cleanup
|
|
593
|
+
|
|
594
|
+
---
|
|
595
|
+
|
|
596
|
+
## 🎓 Examples
|
|
597
|
+
|
|
598
|
+
### Example 1: Navigate and Run
|
|
599
|
+
```bash
|
|
600
|
+
# Launch TUI
|
|
601
|
+
project-compass
|
|
602
|
+
|
|
603
|
+
# Use ↑/↓ to select project
|
|
604
|
+
# Press Enter to see details
|
|
605
|
+
# Press B/T/R/I to Build/Test/Run/Install
|
|
606
|
+
# Press 0 for AI analysis
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### Example 2: Quick CLI Usage
|
|
610
|
+
```bash
|
|
611
|
+
# Detect projects
|
|
612
|
+
project-compass --list-projects --dir ~/workspace
|
|
613
|
+
|
|
614
|
+
# Run command
|
|
615
|
+
project-compass --run "npm install" --dir ~/workspace/my-project
|
|
616
|
+
|
|
617
|
+
# Add package
|
|
618
|
+
project-compass --add-pkg "express" --dir ~/workspace/my-project
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### Example 3: JSON Output for Scripting
|
|
622
|
+
```bash
|
|
623
|
+
# Get project list as JSON
|
|
624
|
+
project-compass --list-projects --json --dir ~/workspace | jq '.[0].name'
|
|
625
|
+
|
|
626
|
+
# Get specific project info
|
|
627
|
+
project-compass --project-info 0 --json --dir ~/workspace
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## 📦 NPM Scripts
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
# Start the TUI
|
|
636
|
+
npm start
|
|
637
|
+
|
|
638
|
+
# Run linting
|
|
639
|
+
npm run lint
|
|
640
|
+
|
|
641
|
+
# Test project detection
|
|
642
|
+
npm run test
|
|
643
|
+
|
|
644
|
+
# Run a command (uses --run flag)
|
|
645
|
+
npm run run -- "echo hello"
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
---
|
|
649
|
+
|
|
650
|
+
**Crafted with ❤️ by Satyaa & Clawdy (AI Agent)**
|