prjct-cli 2.3.6 → 2.3.7
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 +7 -0
- package/dist/bin/prjct-core.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/bin/prjct-core.mjs
CHANGED
|
@@ -1341,7 +1341,7 @@ ${W.yellow(`Command '${n}' not found.`)}
|
|
|
1341
1341
|
|
|
1342
1342
|
Run 'prjct help' to see all available commands.
|
|
1343
1343
|
`}function kT(){let n=[];n.push(""),n.push(W.cyan.bold("All Commands")),n.push("");let e=Object.entries(Mr).sort((t,s)=>t[1].order-s[1].order);for(let[t,s]of e){let r=Wn.filter(o=>o.group===t);if(r.length!==0){n.push(`${W.bold(s.title)} ${W.dim(`(${r.length} commands)`)}`),n.push(W.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(W.dim("Run 'prjct help <command>' for detailed help on a specific command.")),n.push(""),n.join(`
|
|
1344
|
-
`)}function vT(n){return n?n==="commands"||n==="all"?kT():wT(n):fT()}var vf,gT,Sf=y(()=>{"use strict";$l();Ne();vf=[{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"]}],gT=[{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(fT,"formatMainHelp");c(hT,"formatTerminalCommandHelp");c(yT,"formatAgentCommandHelp");c(wT,"formatCommandHelp");c(kT,"formatCommandList");c(vT,"getHelp")});var Tf=Of((cF,bT)=>{bT.exports={name:"prjct-cli",version:"2.3.
|
|
1344
|
+
`)}function vT(n){return n?n==="commands"||n==="all"?kT():wT(n):fT()}var vf,gT,Sf=y(()=>{"use strict";$l();Ne();vf=[{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"]}],gT=[{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(fT,"formatMainHelp");c(hT,"formatTerminalCommandHelp");c(yT,"formatAgentCommandHelp");c(wT,"formatCommandHelp");c(kT,"formatCommandList");c(vT,"getHelp")});var Tf=Of((cF,bT)=>{bT.exports={name:"prjct-cli",version:"2.3.7",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 RT={};import Cf from"node:os";import ji from"node:path";import Ee from"chalk";async function ST(){let[n,...e]=process.argv.slice(2);if(["-v","--version","version"].includes(n)){let s=await Promise.resolve().then(()=>Lf(Tf()));await ET(s.version),process.exit(0)}if(["-h","--help",void 0].includes(n)&&(PT(),process.exit(0)),n&&Ci(n)&&!Q.getByName(n)){let s=Ti[n];s&&(g.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&&gr(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||g.start();try{let s=Q.getByName(n);if(!s){let m=gr(n),f=m?`Did you mean 'prjct ${m}'? Run 'prjct --help' for all commands`:"Run 'prjct --help' to see available commands";g.failWithHint(dr("UNKNOWN_COMMAND",{message:`Unknown command: ${n}`,hint:f})),t||g.end(),process.exit(1)}if(s.deprecated){let m=s.replacedBy?`Use 'prjct ${s.replacedBy}' instead`:"Run 'prjct --help' to see available commands";g.failWithHint({message:`Command '${n}' is deprecated`,hint:m}),t||g.end(),process.exit(1)}s.implemented||(g.failWithHint({message:`Command '${n}' is not yet implemented`,hint:"Run 'prjct --help' to see available commands",docs:"https://github.com/jlopezlira/prjct-cli"}),t||g.end(),process.exit(1));let{parsedArgs:r,options:o}=CT(s,e),i=!process.stdin.isTTY||o.md===!0||o.json===!0;s.requiresLlm&&!i&&(g.failWithHint({message:`'prjct ${n}' requires an AI agent to process its output`,hint:`Use 'p. ${n}' inside Claude/Cursor, or add --md flag`}),t||g.end(),process.exit(1));let a=TT(s,r);a&&(g.failWithHint(a),t||g.end(),process.exit(1));let l=null,u=Date.now();try{l=await A.getProjectId(process.cwd()),l&&(await mn.expireIfStale(l),await mn.touch(l))}catch{}let d=new ks,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,f=o.md===!0,R={task:c(h=>d.task(h,process.cwd(),{md:f}),"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:f}),"ship"),workflow:c(h=>d.workflowPrefs(h,process.cwd(),{md:f}),"workflow"),sync:c(()=>d.sync(process.cwd(),{preview:o.preview===!0||o["dry-run"]===!0,yes:o.yes===!0,json:o.json===!0,md:f,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:f}):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:f}),"regen"),start:c(()=>d.start(),"start"),context:c(h=>d.context(h),"context"),status:c(h=>d.status(h,process.cwd(),{md:f}),"status"),tag:c(h=>d.tag(h,process.cwd(),{md:f}),"tag"),remember:c(h=>d.remember(h,process.cwd(),{md:f,tags:o.tags?String(o.tags):void 0}),"remember"),login:c(()=>d.login({md:f,url:o.url?String(o.url):void 0}),"login"),logout:c(()=>d.logout(),"logout"),auth:c(h=>d.auth(h,{md:f}),"auth"),seed:c(h=>d.seed(h,process.cwd(),{md:f}),"seed"),install:c(()=>d.install(null,process.cwd(),{md:f}),"install"),capture:c(h=>d.capture(h,process.cwd(),{md:f,tags:o.tags?String(o.tags):void 0,force:o.force===!0}),"capture")}[n];if(R)p=await R(m);else throw new Error(`Command '${n}' has no handler`)}if(l){let m=Date.now()-u;try{await mn.trackCommand(l,n,m)}catch{}try{await mr.recordTiming(l,"command_duration",m,{command:n});let f=globalThis.__perfStartNs;if(f){let k=Number(process.hrtime.bigint()-f)/1e6;await mr.recordTiming(l,"startup_time",k)}await mr.recordMemory(l,{command:n})}catch{}}p?.message&&console.log(p.message),t||g.end(),process.exit(p?.success?0:1)}catch(s){console.error("Error:",v(s)),process.env.DEBUG&&console.error(xi(s)),t||g.end(),process.exit(1)}}function TT(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 dr("MISSING_PARAM",{message:`Missing required parameter: ${s}`,hint:`Usage: ${r}`})}return null}function CT(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 ET(n){let e=await zt(),t=ji.join(Cf.homedir(),".claude","commands","p.md"),s=ji.join(Cf.homedir(),".gemini","commands","p.toml"),[r,o,i,a]=await Promise.all([S(t),S(s),S(ji.join(process.cwd(),".cursor","commands","sync.md")),S(ji.join(process.cwd(),".cursor"))]),l=await or();if(console.log(`
|
|
1345
1345
|
${Ee.cyan("p/")} prjct v${n}
|
|
1346
1346
|
${Ee.dim("Context layer for AI coding agents")}
|
|
1347
1347
|
|