prjct-cli 0.10.2 → 0.10.4

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.4] - 2025-11-27
4
+
5
+ ### Fixed
6
+
7
+ - **Commands Module Export** - Fixed `require('./commands').sync is not a function` error
8
+ - Module now exports singleton instance for direct use
9
+ - Class still available via `require('./commands').PrjctCommands`
10
+ - Enables Claude to call commands directly: `require('./commands').sync()`
11
+
12
+ ## [0.10.3] - 2025-11-27
13
+
14
+ ### Fixed
15
+
16
+ - **Global CLAUDE.md Auto-Update** - Now updates `~/.claude/CLAUDE.md` on every sync/analyze/init
17
+ - `/p:sync`: Updates global config after generating agents
18
+ - `/p:analyze`: Updates global config after analysis
19
+ - `/p:init`: Updates global config for all init modes
20
+ - Ensures Claude always has latest prjct instructions
21
+
3
22
  ## [0.10.2] - 2025-11-27
4
23
 
5
24
  ### Added
package/core/commands.js CHANGED
@@ -389,9 +389,17 @@ class PrjctCommands {
389
389
  console.log(' Custom: Describe your preferred stack\n')
390
390
  console.log('Which option do you prefer? (Respond to continue setup)')
391
391
 
392
+ // Update global CLAUDE.md with latest instructions
393
+ const commandInstaller = require('./infrastructure/command-installer')
394
+ await commandInstaller.installGlobalConfig()
395
+
392
396
  return { success: true, mode: 'architect', projectId, idea }
393
397
  }
394
398
 
399
+ // Update global CLAUDE.md with latest instructions (fallback for any case)
400
+ const commandInstaller = require('./infrastructure/command-installer')
401
+ await commandInstaller.installGlobalConfig()
402
+
395
403
  return { success: true, projectId }
396
404
  } catch (error) {
397
405
  console.error('āŒ Error:', error.message)
@@ -2352,6 +2360,13 @@ Agent: ${agent}
2352
2360
  const projectId = await configManager.getProjectId(projectPath)
2353
2361
  await contextSync.generateLocalContext(projectPath, projectId)
2354
2362
 
2363
+ // Update global CLAUDE.md with latest instructions
2364
+ const commandInstaller = require('./infrastructure/command-installer')
2365
+ const globalConfigResult = await commandInstaller.installGlobalConfig()
2366
+ if (globalConfigResult.success) {
2367
+ console.log('šŸ“ Updated ~/.claude/CLAUDE.md')
2368
+ }
2369
+
2355
2370
  console.log('āœ… Analysis complete!\n')
2356
2371
  console.log('šŸ“„ Full report: analysis/repo-summary.md')
2357
2372
  console.log('šŸ“ Context: ~/.prjct-cli/projects/' + projectId + '/CLAUDE.md\n')
@@ -2523,6 +2538,13 @@ Agent: ${agent}
2523
2538
  const contextSync = require('./context-sync')
2524
2539
  await contextSync.generateLocalContext(projectPath, projectId)
2525
2540
 
2541
+ // Update global CLAUDE.md with latest instructions
2542
+ const commandInstaller = require('./infrastructure/command-installer')
2543
+ const globalConfigResult = await commandInstaller.installGlobalConfig()
2544
+ if (globalConfigResult.success) {
2545
+ console.log('šŸ“ Updated ~/.claude/CLAUDE.md')
2546
+ }
2547
+
2526
2548
  console.log('\nāœ… Sync complete!\n')
2527
2549
  console.log(`šŸ¤– Agents Generated: ${generatedAgents.length}`)
2528
2550
  generatedAgents.forEach((agent) => {
@@ -2992,4 +3014,10 @@ Agent: ${agent}
2992
3014
  }
2993
3015
  }
2994
3016
 
2995
- module.exports = PrjctCommands
3017
+ // Export both class and singleton instance
3018
+ // Class for CLI (new PrjctCommands())
3019
+ // Instance for direct use (require('./commands').sync())
3020
+ const instance = new PrjctCommands()
3021
+
3022
+ module.exports = instance
3023
+ module.exports.PrjctCommands = PrjctCommands
package/core/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * This file is required by bin/prjct after setup verification
5
5
  */
6
6
 
7
- const PrjctCommands = require('./commands')
7
+ const { PrjctCommands } = require('./commands')
8
8
  const registry = require('./command-registry')
9
9
 
10
10
  async function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
5
5
  "main": "core/index.js",
6
6
  "bin": {