project-compass 4.1.4 → 4.1.5
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/README.md +28 -64
- package/package.json +1 -1
- package/src/cli.js +20 -12
package/README.md
CHANGED
|
@@ -20,84 +20,48 @@ npm install -g project-compass
|
|
|
20
20
|
|
|
21
21
|
### 🌌 The Navigator (Main Interface)
|
|
22
22
|
- **Automatic Discovery**: Instantly identifies **Node.js, Python, Rust, Go, Java, PHP, Ruby, .NET, and Shell/Make**.
|
|
23
|
-
- **Paginated Control**: Optimized for massive workspaces.
|
|
24
|
-
- **Configurable UI**: Customize your view with `maxVisibleProjects`
|
|
23
|
+
- **Paginated Control**: Optimized for massive workspaces. Jump through project pages with **Page Up / Page Down**.
|
|
24
|
+
- **Configurable UI**: Customize your view with `maxVisibleProjects` (set to 2 or 3 for tight terminals).
|
|
25
25
|
|
|
26
|
-
###
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
26
|
+
### 🤖 AI Horizon (`Shift+O` or `0`)
|
|
27
|
+
- **Agentic Intelligence**: Real-world integration with **OpenRouter, Gemini, Claude, and Ollama**.
|
|
28
|
+
- **DNA Mapping**: Automatically analyzes your project structure and **injects optimized BRIT commands** (Build, Run, Install, Test) into your config.
|
|
29
|
+
- **Persistent Auth**: Save your API tokens once; Compass handles the secure handshake thereafter.
|
|
29
30
|
|
|
30
|
-
###
|
|
31
|
-
- **
|
|
31
|
+
### 🔌 Infrastructure Control (`Shift+R`)
|
|
32
|
+
- **Manual Port Mapping**: Directly assign specific ports to projects. Config is saved persistently to prevent conflicts.
|
|
33
|
+
- **Metadata Awareness**: AI Horizon uses your manual port settings to suggest smarter deployment scripts.
|
|
32
34
|
|
|
33
|
-
###
|
|
34
|
-
- **
|
|
35
|
+
### 🛰️ Orbit Task Manager (`Shift+T`)
|
|
36
|
+
- **Background Orchestration**: Keep tasks running while you navigate.
|
|
37
|
+
- **Process Management**: Kill (`Shift+K`) or Rename (`Shift+R`) background tasks on the fly.
|
|
35
38
|
|
|
36
|
-
###
|
|
37
|
-
- **
|
|
38
|
-
- **Deep DNA Analysis**: Press `0` on any project to analyze its structure.
|
|
39
|
-
- **Auto-Config (BRIT)**: AI automatically detects and configures missing **Build, Run, Install, and Test** commands, saving them directly to your `config.json`.
|
|
40
|
-
- **Direct Access**: Launch straight into intelligence mode with `project-compass --ai`.
|
|
39
|
+
### 📦 Package Registry (`Shift+P`)
|
|
40
|
+
- **Context-Aware Management**: Automatically detects **npm, pnpm, yarn, bun, pip, cargo, composer, and dotnet**.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
### 🏗️ Project Architect (`Shift+N`)
|
|
43
|
+
- **Rapid Scaffolding**: Create new projects from scratch using industry-standard templates.
|
|
44
|
+
|
|
45
|
+
## ⌨️ Command Reference
|
|
43
46
|
|
|
44
47
|
| Shortcut | Action |
|
|
45
48
|
| :--- | :--- |
|
|
46
49
|
| `↑ / ↓` | Move project focus |
|
|
50
|
+
| `PgUp / PgDn`| Jump full project page |
|
|
47
51
|
| `Enter` | Toggle project Detail View |
|
|
48
|
-
| `
|
|
52
|
+
| `0` | Trigger **AI DNA Analysis** (Inside Details) |
|
|
53
|
+
| `B / T / R / I`| Macro: Build, Test, Run, Install |
|
|
54
|
+
| `Shift + R` | **Configure Port** (Inside Details) |
|
|
55
|
+
| `Shift + O` | **AI Horizon** Dashboard |
|
|
49
56
|
| `Shift + T` | **Orbit**: Task Manager |
|
|
50
57
|
| `Shift + P` | **Registry**: Package Manager |
|
|
51
|
-
| `Shift +
|
|
52
|
-
| `Shift + A` | **Studio**: Environment Health |
|
|
53
|
-
| `Shift + B` | Toggle **Art Board** visibility |
|
|
54
|
-
| `Shift + H` | Toggle **Help Cards** |
|
|
55
|
-
| `Shift + S` | Toggle **Structure Guide** |
|
|
56
|
-
| `Shift + Q` | Quit (with safe-exit confirmation) |
|
|
57
|
-
| `?` | Toggle Help Overlay |
|
|
58
|
-
|
|
59
|
-
### 🛡️ Safe Termination
|
|
60
|
-
- **Process Protection**: Compass won't let you accidentally kill your work. If tasks are running, a dedicated confirmation dialog ensures you intended to quit.
|
|
61
|
-
|
|
62
|
-

|
|
63
|
-
|
|
64
|
-
## ⚙️ Configuration & Customization
|
|
65
|
-
|
|
66
|
-
Project Compass is designed to be personalized. All settings and custom commands are stored in a local JSON file.
|
|
67
|
-
|
|
68
|
-
- **Linux/macOS**: `~/.project-compass/config.json`
|
|
69
|
-
- **Windows**: `C:\Users\<YourUser>\.project-compass\config.json`
|
|
70
|
-
|
|
71
|
-
### 🛠️ Adding Custom Commands
|
|
72
|
-
You can add your own project-specific commands directly within the app by pressing **Shift+C** in the Detail View. Use the format `Label|Command` (e.g., `Deploy|npm run deploy`).
|
|
73
|
-
|
|
74
|
-
### 📁 Manual Config Structure
|
|
75
|
-
If you prefer manual editing, the `config.json` follows this structure:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"showArtBoard": true,
|
|
80
|
-
"showHelpCards": false,
|
|
81
|
-
"showStructureGuide": false,
|
|
82
|
-
"customCommands": {
|
|
83
|
-
"/path/to/your/project": [
|
|
84
|
-
{
|
|
85
|
-
"label": "Build Production",
|
|
86
|
-
"command": ["npm", "run", "build", "--prod"]
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
```
|
|
58
|
+
| `Shift + Q` | **Quit** (with terminal clear) |
|
|
92
59
|
|
|
93
|
-
|
|
94
|
-
- `customCommands`: A map of absolute project paths to arrays of command objects.
|
|
95
|
-
|
|
96
|
-
---
|
|
60
|
+
## ⚙️ Configuration
|
|
97
61
|
|
|
98
|
-
|
|
99
|
-
|
|
62
|
+
Edit `~/.project-compass/config.json` to customize:
|
|
63
|
+
- `maxVisibleProjects`: How many rows per page.
|
|
64
|
+
- `aiToken / aiModel`: Your intelligence credentials.
|
|
100
65
|
|
|
101
66
|
---
|
|
102
67
|
**Crafted with ❤️ by Satyaa & Clawdy**
|
|
103
|
-
*MIT License*
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -482,25 +482,33 @@ function Compass({rootPath, initialView = 'navigator'}) {
|
|
|
482
482
|
if (key.shift && key.upArrow) { scrollLogs(1); return; }
|
|
483
483
|
if (key.shift && key.downArrow) { scrollLogs(-1); return; }
|
|
484
484
|
|
|
485
|
+
|
|
485
486
|
const pageLimit = config.maxVisibleProjects || 3;
|
|
486
|
-
const
|
|
487
|
+
const totalProjects = projects.length;
|
|
487
488
|
|
|
488
|
-
if (key.pageUp &&
|
|
489
|
-
console.clear();
|
|
489
|
+
if (key.pageUp && totalProjects > pageLimit) {
|
|
490
490
|
setSelectedIndex((prev) => {
|
|
491
|
-
const next = prev -
|
|
491
|
+
const next = prev - pageLimit;
|
|
492
492
|
return next < 0 ? 0 : next;
|
|
493
|
-
});
|
|
494
|
-
|
|
493
|
+
});
|
|
494
|
+
console.clear();
|
|
495
|
+
return;
|
|
495
496
|
}
|
|
496
|
-
|
|
497
|
-
|
|
497
|
+
|
|
498
|
+
if (key.pageDown && totalProjects > pageLimit) {
|
|
498
499
|
setSelectedIndex((prev) => {
|
|
499
|
-
const next = prev +
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
500
|
+
const next = prev + pageLimit;
|
|
501
|
+
// If next jump exceeds project list, stay at the start of the last page
|
|
502
|
+
if (next >= totalProjects) {
|
|
503
|
+
const lastPageStart = Math.floor((totalProjects - 1) / pageLimit) * pageLimit;
|
|
504
|
+
return lastPageStart;
|
|
505
|
+
}
|
|
506
|
+
return next;
|
|
507
|
+
});
|
|
508
|
+
console.clear();
|
|
509
|
+
return;
|
|
503
510
|
}
|
|
511
|
+
|
|
504
512
|
|
|
505
513
|
if (normalizedInput === '?') { console.clear(); setShowHelp((prev) => !prev); return; }
|
|
506
514
|
if (shiftCombo('l') && lastCommandRef.current) { runProjectCommand(lastCommandRef.current.commandMeta, lastCommandRef.current.project); return; }
|