prjct-cli 0.37.0 → 0.37.1
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/CHANGELOG.md +23 -0
- package/README.md +45 -19
- package/core/index.ts +45 -26
- package/core/infrastructure/setup.ts +21 -7
- package/package.json +1 -1
- package/templates/cursor/commands/bug.md +8 -0
- package/templates/cursor/commands/done.md +4 -0
- package/templates/cursor/commands/pause.md +6 -0
- package/templates/cursor/commands/resume.md +4 -0
- package/templates/cursor/commands/ship.md +8 -0
- package/templates/cursor/commands/sync.md +4 -0
- package/templates/cursor/commands/task.md +8 -0
- package/templates/cursor/router.mdc +6 -6
- package/templates/global/CURSOR.mdc +30 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.37.1] - 2026-01-24
|
|
4
|
+
|
|
5
|
+
### Fix: Cursor Command Syntax (PRJ-65)
|
|
6
|
+
|
|
7
|
+
Fixed Cursor IDE commands not working. Cursor uses `/command` syntax, not `p. command`.
|
|
8
|
+
|
|
9
|
+
**Changes:**
|
|
10
|
+
- Created individual command files: `/sync`, `/task`, `/done`, `/ship`, `/bug`, `/pause`, `/resume`
|
|
11
|
+
- Updated `CURSOR.mdc` with correct `/command` syntax documentation
|
|
12
|
+
- Updated `router.mdc` with new syntax examples
|
|
13
|
+
- Updated `README.md` with Cursor-specific syntax section
|
|
14
|
+
- Fixed `installCursorProject()` to install all individual command files
|
|
15
|
+
|
|
16
|
+
**Cursor Syntax:**
|
|
17
|
+
```
|
|
18
|
+
/sync # Analyze project
|
|
19
|
+
/task "description" # Start task
|
|
20
|
+
/done # Complete subtask
|
|
21
|
+
/ship # Ship feature
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
3
26
|
## [0.37.0] - 2026-01-24
|
|
4
27
|
|
|
5
28
|
### Feature: Cursor IDE Support (PRJ-63)
|
package/README.md
CHANGED
|
@@ -32,49 +32,75 @@ Your AI Agent (Claude/Gemini/Cursor) prjct
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
npm install -g prjct-cli
|
|
35
|
-
prjct start
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
##
|
|
37
|
+
## Quick Start
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
### Claude Code / Gemini CLI
|
|
41
40
|
|
|
42
|
-
```
|
|
43
|
-
|
|
41
|
+
```bash
|
|
42
|
+
# 1. One-time global setup
|
|
43
|
+
prjct start
|
|
44
|
+
|
|
45
|
+
# 2. Initialize your project
|
|
46
|
+
cd my-project
|
|
47
|
+
prjct init
|
|
48
|
+
|
|
49
|
+
# 3. Open in Claude Code or Gemini CLI and use:
|
|
50
|
+
p. sync # Analyze project
|
|
44
51
|
p. task "add user auth" # Start a task
|
|
45
|
-
p. done # Complete
|
|
46
|
-
p. ship
|
|
52
|
+
p. done # Complete subtask
|
|
53
|
+
p. ship # Ship with PR
|
|
47
54
|
```
|
|
48
55
|
|
|
56
|
+
### Cursor IDE
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# 1. Initialize your project (no global setup needed)
|
|
60
|
+
cd my-project
|
|
61
|
+
prjct init
|
|
62
|
+
|
|
63
|
+
# 2. Open in Cursor and use:
|
|
64
|
+
/sync # Analyze project
|
|
65
|
+
/task "add user auth" # Start a task
|
|
66
|
+
/done # Complete subtask
|
|
67
|
+
/ship # Ship with PR
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
> **Note:** Cursor uses `/command` syntax. Commands are installed per-project in `.cursor/commands/`. If deleted, run `/sync` to regenerate.
|
|
71
|
+
|
|
49
72
|
### Core Workflow
|
|
50
73
|
|
|
51
74
|
```
|
|
52
|
-
p. sync → p. task "..." → [code] → p. done → p. ship
|
|
75
|
+
Claude/Gemini: p. sync → p. task "..." → [code] → p. done → p. ship
|
|
76
|
+
Cursor: /sync → /task "..." → [code] → /done → /ship
|
|
53
77
|
```
|
|
54
78
|
|
|
55
79
|
## How It Works
|
|
56
80
|
|
|
57
81
|
| Component | Claude Code | Gemini CLI | Cursor IDE |
|
|
58
82
|
|-----------|-------------|------------|------------|
|
|
59
|
-
| Router | `~/.claude/commands/p.md` | `~/.gemini/commands/p.toml` | `.cursor/commands
|
|
83
|
+
| Router | `~/.claude/commands/p.md` | `~/.gemini/commands/p.toml` | `.cursor/commands/*.md` |
|
|
60
84
|
| Config | `~/.claude/CLAUDE.md` | `~/.gemini/GEMINI.md` | `.cursor/rules/prjct.mdc` |
|
|
61
85
|
| Storage | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` |
|
|
62
86
|
| Scope | Global | Global | Per-project |
|
|
87
|
+
| Syntax | `p. command` | `p. command` | `/command` |
|
|
63
88
|
|
|
64
89
|
All agents share the same project storage, so you can switch between them freely.
|
|
65
90
|
|
|
66
91
|
## Commands
|
|
67
92
|
|
|
68
|
-
|
|
|
69
|
-
|
|
70
|
-
| `p. sync` | Analyze project, generate domain agents |
|
|
71
|
-
| `p. task "desc"` | Start task with auto-classification |
|
|
72
|
-
| `p. done` | Complete current subtask |
|
|
73
|
-
| `p. ship "name"` | Ship feature with PR + version bump |
|
|
74
|
-
| `p. pause` | Pause current task |
|
|
75
|
-
| `p. resume` | Resume paused task |
|
|
76
|
-
| `p.
|
|
77
|
-
| `p.
|
|
93
|
+
| Claude/Gemini | Cursor | Description |
|
|
94
|
+
|---------------|--------|-------------|
|
|
95
|
+
| `p. sync` | `/sync` | Analyze project, generate domain agents |
|
|
96
|
+
| `p. task "desc"` | `/task "desc"` | Start task with auto-classification |
|
|
97
|
+
| `p. done` | `/done` | Complete current subtask |
|
|
98
|
+
| `p. ship "name"` | `/ship "name"` | Ship feature with PR + version bump |
|
|
99
|
+
| `p. pause` | `/pause` | Pause current task |
|
|
100
|
+
| `p. resume` | `/resume` | Resume paused task |
|
|
101
|
+
| `p. bug "desc"` | `/bug "desc"` | Report a bug |
|
|
102
|
+
| `p. linear` | - | Linear integration |
|
|
103
|
+
| `p. github` | - | GitHub Issues integration |
|
|
78
104
|
|
|
79
105
|
## CLI Commands
|
|
80
106
|
|
package/core/index.ts
CHANGED
|
@@ -198,11 +198,15 @@ function displayVersion(version: string): void {
|
|
|
198
198
|
const claudeConfigured = fs.existsSync(claudeCommandPath)
|
|
199
199
|
const geminiConfigured = fs.existsSync(geminiCommandPath)
|
|
200
200
|
|
|
201
|
+
// Check current project for Cursor
|
|
202
|
+
const cursorConfigured = fs.existsSync(path.join(process.cwd(), '.cursor', 'commands', 'sync.md'))
|
|
203
|
+
const cursorExists = fs.existsSync(path.join(process.cwd(), '.cursor'))
|
|
204
|
+
|
|
201
205
|
console.log(`
|
|
202
206
|
${CYAN}p/${RESET} prjct v${version}
|
|
203
207
|
${DIM}Context layer for AI coding agents${RESET}
|
|
204
208
|
|
|
205
|
-
${DIM}Providers:${RESET}`)
|
|
209
|
+
${DIM}Global Providers:${RESET}`)
|
|
206
210
|
|
|
207
211
|
// Claude status
|
|
208
212
|
if (detection.claude.installed) {
|
|
@@ -222,8 +226,19 @@ ${DIM}Providers:${RESET}`)
|
|
|
222
226
|
console.log(` Gemini CLI ${DIM}○ not installed${RESET}`)
|
|
223
227
|
}
|
|
224
228
|
|
|
229
|
+
// Cursor status (per-project)
|
|
230
|
+
console.log(`
|
|
231
|
+
${DIM}Project Providers:${RESET}`)
|
|
232
|
+
if (cursorConfigured) {
|
|
233
|
+
console.log(` Cursor IDE ${GREEN}✓ ready${RESET} ${DIM}(use /sync, /task)${RESET}`)
|
|
234
|
+
} else if (cursorExists) {
|
|
235
|
+
console.log(` Cursor IDE ${YELLOW}● detected${RESET} ${DIM}(run prjct init)${RESET}`)
|
|
236
|
+
} else {
|
|
237
|
+
console.log(` Cursor IDE ${DIM}○ no .cursor/ folder${RESET}`)
|
|
238
|
+
}
|
|
239
|
+
|
|
225
240
|
console.log(`
|
|
226
|
-
${DIM}Run 'prjct start'
|
|
241
|
+
${DIM}Run 'prjct start' for Claude/Gemini, 'prjct init' for Cursor${RESET}
|
|
227
242
|
${CYAN}https://prjct.app${RESET}
|
|
228
243
|
`)
|
|
229
244
|
}
|
|
@@ -234,45 +249,49 @@ ${CYAN}https://prjct.app${RESET}
|
|
|
234
249
|
function displayHelp(): void {
|
|
235
250
|
console.log(`
|
|
236
251
|
prjct - Context layer for AI coding agents
|
|
237
|
-
Works with Claude Code, Gemini CLI, and more.
|
|
252
|
+
Works with Claude Code, Gemini CLI, Cursor IDE, and more.
|
|
238
253
|
|
|
239
254
|
QUICK START
|
|
240
255
|
-----------
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
256
|
+
Claude/Gemini:
|
|
257
|
+
1. prjct start Configure your AI provider
|
|
258
|
+
2. cd my-project && prjct init
|
|
259
|
+
3. Open in Claude Code or Gemini CLI
|
|
260
|
+
4. Type: p. sync Analyze project
|
|
261
|
+
|
|
262
|
+
Cursor IDE:
|
|
263
|
+
1. cd my-project && prjct init
|
|
264
|
+
2. Open in Cursor
|
|
265
|
+
3. Type: /sync Analyze project
|
|
266
|
+
|
|
267
|
+
COMMANDS (inside your AI agent)
|
|
268
|
+
-------------------------------
|
|
269
|
+
Claude/Gemini Cursor Description
|
|
270
|
+
─────────────────────────────────────────────────────
|
|
271
|
+
p. sync /sync Analyze project
|
|
272
|
+
p. task "desc" /task "desc" Start a task
|
|
273
|
+
p. done /done Complete subtask
|
|
274
|
+
p. ship "name" /ship "name" Ship with PR
|
|
255
275
|
|
|
256
276
|
TERMINAL COMMANDS (this CLI)
|
|
257
277
|
----------------------------
|
|
258
|
-
prjct start First-time setup
|
|
278
|
+
prjct start First-time setup (Claude/Gemini global config)
|
|
279
|
+
prjct init Initialize project (required for Cursor)
|
|
259
280
|
prjct setup Reconfigure installations
|
|
260
|
-
prjct init Initialize project (creates .prjct/)
|
|
261
281
|
prjct sync Sync project state
|
|
262
282
|
|
|
263
283
|
EXAMPLES
|
|
264
284
|
--------
|
|
265
|
-
#
|
|
285
|
+
# Claude Code / Gemini CLI (global setup, then per-project)
|
|
266
286
|
$ prjct start
|
|
267
|
-
|
|
268
|
-
# Initialize a new project
|
|
269
287
|
$ cd my-project && prjct init
|
|
270
|
-
|
|
271
|
-
# Inside Claude Code or Gemini CLI
|
|
272
288
|
> p. sync
|
|
273
289
|
> p. task "add user authentication"
|
|
274
|
-
|
|
275
|
-
|
|
290
|
+
|
|
291
|
+
# Cursor IDE (per-project only)
|
|
292
|
+
$ cd my-project && prjct init
|
|
293
|
+
> /sync
|
|
294
|
+
> /task "add user authentication"
|
|
276
295
|
|
|
277
296
|
MORE INFO
|
|
278
297
|
---------
|
|
@@ -307,6 +307,7 @@ async function installGeminiGlobalConfig(): Promise<{ success: boolean; action:
|
|
|
307
307
|
* configuration in .cursor/rules/ and .cursor/commands/.
|
|
308
308
|
*
|
|
309
309
|
* Creates minimal routers that point to the npm package for real instructions.
|
|
310
|
+
* Installs individual command files for better Cursor UX (/sync, /task, etc.)
|
|
310
311
|
*
|
|
311
312
|
* @param projectRoot - The project root directory
|
|
312
313
|
* @returns Object with success status and files created
|
|
@@ -330,10 +331,9 @@ export async function installCursorProject(projectRoot: string): Promise<{
|
|
|
330
331
|
const commandsDir = path.join(cursorDir, 'commands')
|
|
331
332
|
|
|
332
333
|
const routerMdcDest = path.join(rulesDir, 'prjct.mdc')
|
|
333
|
-
const commandRouterDest = path.join(commandsDir, 'p.md')
|
|
334
334
|
|
|
335
335
|
const routerMdcSource = path.join(getPackageRoot(), 'templates', 'cursor', 'router.mdc')
|
|
336
|
-
const
|
|
336
|
+
const cursorCommandsSource = path.join(getPackageRoot(), 'templates', 'cursor', 'commands')
|
|
337
337
|
|
|
338
338
|
// Ensure directories exist
|
|
339
339
|
fs.mkdirSync(rulesDir, { recursive: true })
|
|
@@ -345,10 +345,18 @@ export async function installCursorProject(projectRoot: string): Promise<{
|
|
|
345
345
|
result.rulesCreated = true
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
// Copy
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
348
|
+
// Copy individual command files → .cursor/commands/
|
|
349
|
+
// This enables /sync, /task, /done, /ship, etc. syntax in Cursor
|
|
350
|
+
if (fs.existsSync(cursorCommandsSource)) {
|
|
351
|
+
const commandFiles = fs.readdirSync(cursorCommandsSource)
|
|
352
|
+
.filter(f => f.endsWith('.md'))
|
|
353
|
+
|
|
354
|
+
for (const file of commandFiles) {
|
|
355
|
+
const src = path.join(cursorCommandsSource, file)
|
|
356
|
+
const dest = path.join(commandsDir, file)
|
|
357
|
+
fs.copyFileSync(src, dest)
|
|
358
|
+
}
|
|
359
|
+
result.commandsCreated = commandFiles.length > 0
|
|
352
360
|
}
|
|
353
361
|
|
|
354
362
|
// Update .gitignore to exclude prjct Cursor routers
|
|
@@ -373,7 +381,13 @@ async function addCursorToGitignore(projectRoot: string): Promise<boolean> {
|
|
|
373
381
|
const entriesToAdd = [
|
|
374
382
|
'# prjct Cursor routers (regenerated per-developer)',
|
|
375
383
|
'.cursor/rules/prjct.mdc',
|
|
376
|
-
'.cursor/commands/
|
|
384
|
+
'.cursor/commands/sync.md',
|
|
385
|
+
'.cursor/commands/task.md',
|
|
386
|
+
'.cursor/commands/done.md',
|
|
387
|
+
'.cursor/commands/ship.md',
|
|
388
|
+
'.cursor/commands/bug.md',
|
|
389
|
+
'.cursor/commands/pause.md',
|
|
390
|
+
'.cursor/commands/resume.md',
|
|
377
391
|
]
|
|
378
392
|
|
|
379
393
|
let content = ''
|
package/package.json
CHANGED
|
@@ -11,18 +11,18 @@ You are using **prjct**, a context layer for AI coding agents.
|
|
|
11
11
|
|
|
12
12
|
1. Run: `npm root -g` to get the npm global root
|
|
13
13
|
2. Read: `{npmRoot}/prjct-cli/templates/global/CURSOR.mdc`
|
|
14
|
-
3. Follow those instructions for ALL `
|
|
14
|
+
3. Follow those instructions for ALL `/command` requests
|
|
15
15
|
|
|
16
16
|
## Quick Reference
|
|
17
17
|
|
|
18
18
|
| Command | Action |
|
|
19
19
|
|---------|--------|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
20
|
+
| `/sync` | Analyze project, generate agents |
|
|
21
|
+
| `/task "..."` | Start a task |
|
|
22
|
+
| `/done` | Complete subtask |
|
|
23
|
+
| `/ship` | Ship with PR + version |
|
|
24
24
|
|
|
25
25
|
## Note
|
|
26
26
|
|
|
27
|
-
This router auto-regenerates with
|
|
27
|
+
This router auto-regenerates with `/sync` if deleted.
|
|
28
28
|
Full instructions are in the npm package (always up-to-date).
|
|
@@ -10,15 +10,20 @@ alwaysApply: true
|
|
|
10
10
|
|
|
11
11
|
## HOW TO USE PRJCT (Read This First)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
In Cursor, use the `/command` syntax. Type `/` followed by the command name:
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/sync → Analyze project, generate agents
|
|
17
|
+
/task X → Start task with description X
|
|
18
|
+
/done → Complete current subtask
|
|
19
|
+
/ship → Ship feature with PR + version bump
|
|
20
|
+
/bug X → Report bug with description X
|
|
21
|
+
/pause → Pause current task
|
|
22
|
+
/resume → Resume paused task
|
|
20
23
|
```
|
|
21
24
|
|
|
25
|
+
Each command loads templates from the prjct-cli npm package.
|
|
26
|
+
|
|
22
27
|
**Key Insight**: Templates are GUIDANCE, not scripts. Use your intelligence to adapt them to the situation.
|
|
23
28
|
|
|
24
29
|
---
|
|
@@ -90,29 +95,29 @@ Built with [Cursor](https://www.cursor.com/)
|
|
|
90
95
|
## CORE WORKFLOW
|
|
91
96
|
|
|
92
97
|
```
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
/sync → /task "description" → [work] → /done → /ship
|
|
99
|
+
│ │ │ │
|
|
100
|
+
│ └─ Creates branch, breaks down │ │
|
|
101
|
+
│ task, starts tracking │ │
|
|
102
|
+
│ │ │
|
|
103
|
+
└─ Analyzes project, generates agents │ │
|
|
104
|
+
│ │
|
|
105
|
+
Completes subtask ───┘ │
|
|
106
|
+
│
|
|
107
|
+
Ships feature, PR ────┘
|
|
103
108
|
```
|
|
104
109
|
|
|
105
110
|
### Quick Reference
|
|
106
111
|
|
|
107
|
-
|
|
|
112
|
+
| Command | What It Does |
|
|
108
113
|
|---------|--------------|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
114
|
+
| `/sync` | Analyze project, generate domain agents |
|
|
115
|
+
| `/task <desc>` | Start task with auto-classification |
|
|
116
|
+
| `/done` | Complete current subtask |
|
|
117
|
+
| `/ship [name]` | Ship feature with PR + version bump |
|
|
118
|
+
| `/pause` | Pause current task |
|
|
119
|
+
| `/resume` | Resume paused task |
|
|
120
|
+
| `/bug <desc>` | Report bug with auto-priority |
|
|
116
121
|
|
|
117
122
|
---
|
|
118
123
|
|
|
@@ -213,8 +218,8 @@ These agents contain project-specific patterns. **USE THEM**.
|
|
|
213
218
|
## CURSOR-SPECIFIC NOTES
|
|
214
219
|
|
|
215
220
|
### Router Regeneration
|
|
216
|
-
If
|
|
217
|
-
- Run
|
|
221
|
+
If command files in `.cursor/commands/` are deleted:
|
|
222
|
+
- Run `/sync` to regenerate them
|
|
218
223
|
- Or run `prjct init` in the project
|
|
219
224
|
|
|
220
225
|
### Model Agnostic
|