prjct-cli 2.4.21 → 2.4.24
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 +15 -0
- package/README.md +56 -39
- package/dist/bin/prjct-core.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.24] - 2026-05-02
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- current work
|
|
7
|
+
|
|
8
|
+
## [2.4.23] - 2026-05-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- current work
|
|
12
|
+
|
|
13
|
+
## [2.4.22] - 2026-05-02
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- current work
|
|
17
|
+
|
|
3
18
|
## [2.4.21] - 2026-05-01
|
|
4
19
|
|
|
5
20
|
### Added
|
package/README.md
CHANGED
|
@@ -1,64 +1,81 @@
|
|
|
1
1
|
# prjct
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
Works with Claude Code, Gemini CLI, Cursor IDE, Windsurf, OpenAI Codex, Antigravity, and more.
|
|
3
|
+
**Project memory + quality workflows for AI coding agents.** prjct gives Claude Code (and any agent) durable memory of your projects: decisions, learnings, gotchas, hot files, recurring bugs. Plus 5 named quality workflows (review, qa, security, investigate, ship) that persist findings back to memory so the next session compounds.
|
|
6
4
|
|
|
7
5
|
[](https://www.npmjs.com/package/prjct-cli)
|
|
8
6
|
[]()
|
|
9
7
|
[]()
|
|
10
8
|
[]()
|
|
11
|
-
[]()
|
|
12
9
|
|
|
13
|
-
##
|
|
10
|
+
## Install — one paste
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
Paste this into Claude Code:
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
> Install prjct on this machine: run `curl -sSL https://raw.githubusercontent.com/jlopezlira/prjct-cli/main/scripts/install-via-claude.sh | bash` and verify with `prjct -v`. If the cwd is a git repo, also run `prjct sync` to register it.
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
Claude Code / Gemini / Cursor prjct
|
|
21
|
-
| |
|
|
22
|
-
| SessionStart hook fires |
|
|
23
|
-
| -----------------------------------> | reads .prjct/prjct.config.json
|
|
24
|
-
| | resolves persona + memory + indexes
|
|
25
|
-
| You are <role> for <project>. |
|
|
26
|
-
| Active task: … |
|
|
27
|
-
| Recent learnings: … |
|
|
28
|
-
| <----------------------------------- |
|
|
29
|
-
v |
|
|
30
|
-
Writes code / specs / updates |
|
|
31
|
-
with full project context |
|
|
32
|
-
```
|
|
16
|
+
That's it. ~30 seconds. The script downloads the standalone binary for your platform from GitHub Releases (no Node/npm needed), wires hooks + the lookup-first CLAUDE.md block, and registers the project. Full install paths (terminal one-liner, npm fallback, follow-up config) are documented in [INSTALL_PROMPT.md](./INSTALL_PROMPT.md).
|
|
33
17
|
|
|
34
|
-
|
|
18
|
+
## What you get
|
|
35
19
|
|
|
36
|
-
|
|
20
|
+
After install, **next session in any prjct project**:
|
|
37
21
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
- **Lookup-first protocol**: Claude reads `~/Documents/prjct/<slug>/_generated/` (architecture, patterns, decisions, gotchas, recent ships) BEFORE re-exploring source. Cuts ~10K tokens of exploration per session.
|
|
23
|
+
- **Auto-capture**: Stop hook scans the assistant transcript and persists durable insights (decisions/learnings/gotchas) tagged for dedup. The next session finds them in the vault.
|
|
24
|
+
- **Pattern detection**: Stop hook detects hot files (>3 changes in 7 days), recurring bugs (gotchas with the same topic), tech-debt growth (TODO/FIXME count rising). All persisted as learnings, surfaced next session.
|
|
25
|
+
- **5 quality workflows** activated by natural language ("review this branch", "qa the UI", "security check", "investigate this bug"):
|
|
26
|
+
- `review` — Production Bug Hunt + Completeness Gate (3 modes)
|
|
27
|
+
- `qa` — Real Browser, Atomic Fixes, Regression Tests
|
|
28
|
+
- `security` — OWASP Top 10 + STRIDE, 8/10 confidence gate, concrete exploit per finding
|
|
29
|
+
- `investigate` — Iron Law (no fix without investigation), max 3 failed hypotheses
|
|
30
|
+
- `ship` (endurecido) — Coverage Gate + Auto-Document
|
|
41
31
|
|
|
42
|
-
|
|
32
|
+
## How it works
|
|
43
33
|
|
|
44
|
-
|
|
34
|
+
State lives in **SQLite** at `~/.prjct-cli/projects/<id>/`. The vault at `~/Documents/prjct/<slug>/_generated/` is an auto-regenerated Markdown snapshot — agent-readable via `Read`/`Glob`, browsable in Obsidian.
|
|
45
35
|
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
```
|
|
37
|
+
Claude Code session prjct
|
|
38
|
+
| |
|
|
39
|
+
| SessionStart hook fires |
|
|
40
|
+
| --------------------------------> | self-heal CLAUDE.md, regen vault
|
|
41
|
+
| | (opt-in: silent auto-update check)
|
|
42
|
+
| |
|
|
43
|
+
| Lookup-first protocol kicks in: |
|
|
44
|
+
| reads _generated/* before source |
|
|
45
|
+
v |
|
|
46
|
+
Writes code, makes decisions |
|
|
47
|
+
| |
|
|
48
|
+
| Stop hook fires |
|
|
49
|
+
| --------------------------------> | ingest captured/, ingest workflows/,
|
|
50
|
+
| | scan transcript → memory,
|
|
51
|
+
| | detect hot files / recurring bugs
|
|
52
|
+
| | / tech-debt growth → memory,
|
|
53
|
+
| | regen vault
|
|
54
|
+
```
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
cd my-project
|
|
52
|
-
prjct init
|
|
56
|
+
State is the source of truth; the vault is recall. New knowledge enters via `prjct remember <type>`, `prjct capture`, or — automatically — the Stop hook's transcript scan.
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
prjct install
|
|
58
|
+
## Quick start (post-install)
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
```bash
|
|
61
|
+
# In any git repo
|
|
62
|
+
prjct sync # register the project (auto on first prjct command)
|
|
63
|
+
prjct task "add OAuth refresh" # start tracking work
|
|
64
|
+
prjct remember decision "we chose JWT + refresh rotation"
|
|
65
|
+
prjct status done # close the active task
|
|
66
|
+
prjct ship # bump version, commit, push, open PR
|
|
59
67
|
```
|
|
60
68
|
|
|
61
|
-
|
|
69
|
+
In Claude Code, ask naturally:
|
|
70
|
+
- "review my changes" → activates the `review` workflow with Production Bug Hunt methodology
|
|
71
|
+
- "what patterns does this project use?" → Claude reads `_generated/patterns.md` directly (no `grep`)
|
|
72
|
+
- "investigate why tests intermittently fail" → activates `investigate` with Iron Law
|
|
73
|
+
|
|
74
|
+
Optional flags:
|
|
75
|
+
```bash
|
|
76
|
+
prjct config set auto-update on # silent self-update (1/hour throttled)
|
|
77
|
+
prjct team --enforce # pre-commit hook blocks commits without prjct
|
|
78
|
+
```
|
|
62
79
|
|
|
63
80
|
## Inside Claude Code / Gemini CLI
|
|
64
81
|
|
package/dist/bin/prjct-core.mjs
CHANGED
|
@@ -1379,7 +1379,7 @@ ${B.yellow(`Command '${n}' not found.`)}
|
|
|
1379
1379
|
|
|
1380
1380
|
Run 'prjct help' to see all available commands.
|
|
1381
1381
|
`}function wC(){let n=[];n.push(""),n.push(B.cyan.bold("All Commands")),n.push("");let e=Object.entries(Xr).sort((t,s)=>t[1].order-s[1].order);for(let[t,s]of e){let r=tr.filter(o=>o.group===t);if(r.length!==0){n.push(`${B.bold(s.title)} ${B.dim(`(${r.length} commands)`)}`),n.push(B.dim(s.description)),n.push("");for(let o of r){let i=`p. ${o.name}`.padEnd(18),a=o.description.length>45?`${o.description.slice(0,42)}...`:o.description;n.push(` ${i} ${a}`)}n.push("")}}return n.push(B.dim("Run 'prjct help <command>' for detailed help on a specific command.")),n.push(""),n.join(`
|
|
1382
|
-
`)}function kC(n){return n?n==="commands"||n==="all"?wC():yC(n):gC()}var bh,mC,Sh=k(()=>{"use strict";pu();Ne();bh=[{name:"start",description:"First-time setup wizard",example:"prjct start"},{name:"init",description:"Initialize project in current directory",example:"prjct init"},{name:"sync",description:"Sync project state and update context files",example:"prjct sync"},{name:"watch",description:"Auto-sync on file changes",example:"prjct watch",options:["--verbose","--debounce=<ms>","--interval=<sec>"]},{name:"hooks",description:"Manage git hooks for auto-sync",example:"prjct hooks install",subcommands:["install","uninstall","status"]},{name:"doctor",description:"Check system health and dependencies",example:"prjct doctor"},{name:"context",description:"Smart context filtering tools for AI",example:'prjct context files "add auth"',subcommands:["files","signatures","imports","recent","summary"]},{name:"stop",description:"Stop the background daemon",example:"prjct stop",options:["--force"]},{name:"restart",description:"Restart the background daemon",example:"prjct restart"},{name:"uninstall",description:"Complete system removal of prjct",example:"prjct uninstall --backup",options:["--force","--backup","--dry-run","--keep-package"]}],mC=[{flag:"-q, --quiet",description:"Suppress all output (errors to stderr only)"},{flag:"-v, --version",description:"Show version and provider status"},{flag:"-h, --help",description:"Show this help message"}];c(gC,"formatMainHelp");c(fC,"formatTerminalCommandHelp");c(hC,"formatAgentCommandHelp");c(yC,"formatCommandHelp");c(wC,"formatCommandList");c(kC,"getHelp")});var Th=Mh((dH,bC)=>{bC.exports={name:"prjct-cli",version:"2.4.
|
|
1382
|
+
`)}function kC(n){return n?n==="commands"||n==="all"?wC():yC(n):gC()}var bh,mC,Sh=k(()=>{"use strict";pu();Ne();bh=[{name:"start",description:"First-time setup wizard",example:"prjct start"},{name:"init",description:"Initialize project in current directory",example:"prjct init"},{name:"sync",description:"Sync project state and update context files",example:"prjct sync"},{name:"watch",description:"Auto-sync on file changes",example:"prjct watch",options:["--verbose","--debounce=<ms>","--interval=<sec>"]},{name:"hooks",description:"Manage git hooks for auto-sync",example:"prjct hooks install",subcommands:["install","uninstall","status"]},{name:"doctor",description:"Check system health and dependencies",example:"prjct doctor"},{name:"context",description:"Smart context filtering tools for AI",example:'prjct context files "add auth"',subcommands:["files","signatures","imports","recent","summary"]},{name:"stop",description:"Stop the background daemon",example:"prjct stop",options:["--force"]},{name:"restart",description:"Restart the background daemon",example:"prjct restart"},{name:"uninstall",description:"Complete system removal of prjct",example:"prjct uninstall --backup",options:["--force","--backup","--dry-run","--keep-package"]}],mC=[{flag:"-q, --quiet",description:"Suppress all output (errors to stderr only)"},{flag:"-v, --version",description:"Show version and provider status"},{flag:"-h, --help",description:"Show this help message"}];c(gC,"formatMainHelp");c(fC,"formatTerminalCommandHelp");c(hC,"formatAgentCommandHelp");c(yC,"formatCommandHelp");c(wC,"formatCommandList");c(kC,"getHelp")});var Th=Mh((dH,bC)=>{bC.exports={name:"prjct-cli",version:"2.4.24",description:"Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",main:"dist/bin/prjct.mjs",bin:{prjct:"bin/prjct"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},scripts:{build:"node scripts/build.js","build:node":"node scripts/build.js",release:"node scripts/release.js","release:patch":"node scripts/release.js patch","release:minor":"node scripts/release.js minor","release:major":"node scripts/release.js major",postinstall:"node scripts/postinstall.js",prepare:"lefthook install","update-commands":`bun -e "const installer = require('./core/infrastructure/command-installer'); installer.syncCommands().then(r => console.log('Commands updated:', r)).catch(e => console.error('Error:', e.message))"`,"install-global":"./scripts/install.sh",update:"./scripts/update.sh",test:"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage",typecheck:"tsc --noEmit -p core/tsconfig.json","typecheck:watch":"tsc --noEmit -p core/tsconfig.json --watch",validate:"bun scripts/validate-commands.js",lint:"biome lint .","lint:fix":"biome lint --write .",knip:"knip","lint:meta":"bun core/cli/lint-meta-commentary.ts",format:"biome format --write .","format:check":"biome format .",check:"biome check .","check:fix":"biome check --write ."},keywords:["claude-code","gemini-cli","ai-agents","context-layer","developer-tools","ai-assistant","productivity","mcp","llm","coding-agents"],author:"prjct.app",license:"MIT",dependencies:{"@clack/prompts":"1.0.0","@modelcontextprotocol/sdk":"1.29.0","better-sqlite3":"12.9.0",chalk:"4.1.2",chokidar:"5.0.0","date-fns":"4.1.0",glob:"13.0.1","jsonc-parser":"3.3.1",zod:"3.25.76"},overrides:{"path-to-regexp":"8.4.0","brace-expansion":"5.0.5"},devDependencies:{"@biomejs/biome":"2.3.13","@types/better-sqlite3":"7.6.13","@types/bun":"latest","@types/chokidar":"2.1.7",esbuild:"0.25.0",knip:"6.3.1",lefthook:"2.1.0",typescript:"5.9.3"},repository:{type:"git",url:"git+https://github.com/jlopezlira/prjct-cli.git"},bugs:{url:"https://github.com/jlopezlira/prjct-cli/issues"},homepage:"https://prjct.app",packageManager:"bun@1.2.23",engines:{bun:">=1.0.0",node:">=22.22.2"},files:["assets/","bin/prjct","dist/","templates/","scripts/postinstall.js","scripts/ensure-bun.sh","scripts/install.sh","LICENSE","README.md","CHANGELOG.md"],prepublishOnly:"node scripts/build.js",trustedDependencies:["chalk"]}});var PC={};import Eh from"node:os";import Vi from"node:path";import Re from"chalk";async function vC(){let[n,...e]=process.argv.slice(2);if(["-v","--version","version"].includes(n)){let s=await Promise.resolve().then(()=>Nh(Th()));await EC(s.version),process.exit(0)}if(["-h","--help",void 0].includes(n)&&(CC(),process.exit(0)),n&&Li(n)&&!q.getByName(n)){let s=Oi[n];s&&(f.failWithHint({message:`'prjct ${n}' was removed in v2. ${s.note}`,hint:`Use: ${s.replacement}`}),process.exit(1))}if(n&&!q.getByName(n)&&!(e.length===0&&Ar(n)!==null)){let r=[n,...e.filter(i=>!i.startsWith("-"))].join(" "),o=e.filter(i=>i.startsWith("-"));n="capture",e=[r,...o]}let t=e.includes("--md");t||f.start();try{let s=q.getByName(n);if(!s){let m=Ar(n),g=m?`Did you mean 'prjct ${m}'? Run 'prjct --help' for all commands`:"Run 'prjct --help' to see available commands";f.failWithHint(Rr("UNKNOWN_COMMAND",{message:`Unknown command: ${n}`,hint:g})),t||f.end(),process.exit(1)}if(s.deprecated){let m=s.replacedBy?`Use 'prjct ${s.replacedBy}' instead`:"Run 'prjct --help' to see available commands";f.failWithHint({message:`Command '${n}' is deprecated`,hint:m}),t||f.end(),process.exit(1)}s.implemented||(f.failWithHint({message:`Command '${n}' is not yet implemented`,hint:"Run 'prjct --help' to see available commands",docs:"https://github.com/jlopezlira/prjct-cli"}),t||f.end(),process.exit(1));let{parsedArgs:r,options:o}=TC(s,e),i=!process.stdin.isTTY||o.md===!0||o.json===!0;s.requiresLlm&&!i&&(f.failWithHint({message:`'prjct ${n}' requires an AI agent to process its output`,hint:`Use 'p. ${n}' inside Claude/Cursor, or add --md flag`}),t||f.end(),process.exit(1));let a=SC(s,r);a&&(f.failWithHint(a),t||f.end(),process.exit(1));let l=null,u=Date.now();try{l=await j.getProjectId(process.cwd()),l&&(await Sn.expireIfStale(l),await Sn.touch(l))}catch{}let d=new Rs,p;if(n==="analyze")p=await d.analyze(o);else if(n==="setup")p=await d.setup(o);else if(n==="update")p=await d.update(o);else{let m=r.join(" ")||null,g=o.md===!0,P={task:c(h=>d.task(h,process.cwd(),{md:g}),"task"),init:c(h=>d.init({idea:h,yes:o.yes===!0,pack:o.pack?String(o.pack):void 0,persona:o.persona?String(o.persona):void 0}),"init"),ship:c(h=>d.ship(h,process.cwd(),{md:g}),"ship"),workflow:c(h=>d.workflowPrefs(h,process.cwd(),{md:g}),"workflow"),sync:c(()=>d.sync(process.cwd(),{preview:o.preview===!0||o["dry-run"]===!0,yes:o.yes===!0,json:o.json===!0,md:g,package:o.package?String(o.package):void 0,full:o.full===!0}),"sync"),"analysis-save-llm":c(h=>h?d.saveLlmAnalysis(h,process.cwd(),{md:g}):Promise.resolve({success:!1,error:"analysis-save-llm requires a JSON payload as positional arg"}),"analysis-save-llm"),regen:c(()=>d.regenVault(process.cwd(),{md:g}),"regen"),start:c(()=>d.start(),"start"),context:c(h=>d.context(h),"context"),status:c(h=>d.status(h,process.cwd(),{md:g}),"status"),tag:c(h=>d.tag(h,process.cwd(),{md:g}),"tag"),remember:c(h=>d.remember(h,process.cwd(),{md:g,tags:o.tags?String(o.tags):void 0}),"remember"),login:c(()=>d.login({md:g,url:o.url?String(o.url):void 0}),"login"),logout:c(()=>d.logout(),"logout"),auth:c(h=>d.auth(h,{md:g}),"auth"),seed:c(h=>d.seed(h,process.cwd(),{md:g}),"seed"),install:c(()=>d.install(null,process.cwd(),{md:g}),"install"),capture:c(h=>d.capture(h,process.cwd(),{md:g,tags:o.tags?String(o.tags):void 0,force:o.force===!0}),"capture"),mcp:c(h=>d.mcp(h,process.cwd(),{md:g}),"mcp")}[n];if(P)p=await P(m);else throw new Error(`Command '${n}' has no handler`)}if(l){let m=Date.now()-u;try{await Sn.trackCommand(l,n,m)}catch{}try{await jr.recordTiming(l,"command_duration",m,{command:n});let g=globalThis.__perfStartNs;if(g){let w=Number(process.hrtime.bigint()-g)/1e6;await jr.recordTiming(l,"startup_time",w)}await jr.recordMemory(l,{command:n})}catch{}}p?.message&&console.log(p.message),t||f.end(),process.exit(p?.success?0:1)}catch(s){console.error("Error:",b(s)),process.env.DEBUG&&console.error(Zi(s)),t||f.end(),process.exit(1)}}function SC(n,e){if(!n.params)return null;let t=n.params.match(/<[^>]+>/g);if(!t||t.length===0)return null;if(e.length<t.length){let s=t.map(o=>o.slice(1,-1)).join(", "),r=n.usage.terminal||`prjct ${n.name} ${n.params}`;return Rr("MISSING_PARAM",{message:`Missing required parameter: ${s}`,hint:`Usage: ${r}`})}return null}function TC(n,e){let t=[],s={};for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("--")){let i=o.slice(2);r+1<e.length&&!e[r+1].startsWith("--")?s[i]=e[++r]:s[i]=!0}else t.push(o)}return{parsedArgs:t,options:s}}async function EC(n){let e=await ts(),t=Vi.join(Eh.homedir(),".claude","commands","p.md"),s=Vi.join(Eh.homedir(),".gemini","commands","p.toml"),[r,o,i,a]=await Promise.all([T(t),T(s),T(Vi.join(process.cwd(),".cursor","commands","sync.md")),T(Vi.join(process.cwd(),".cursor"))]),l=await vr();if(console.log(`
|
|
1383
1383
|
${Re.cyan("p/")} prjct v${n}
|
|
1384
1384
|
${Re.dim("Context layer for AI coding agents")}
|
|
1385
1385
|
|