claude-prism 0.2.0 ā 0.2.2
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/bin/cli.mjs +10 -0
- package/lib/installer.mjs +3 -3
- package/package.json +1 -1
- package/templates/commands/claude-prism/update.md +36 -0
package/bin/cli.mjs
CHANGED
|
@@ -146,6 +146,15 @@ switch (command) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
case 'update': {
|
|
149
|
+
if (hasFlag('global')) {
|
|
150
|
+
console.log('š claude-prism update --global\n');
|
|
151
|
+
initGlobal();
|
|
152
|
+
console.log('ā
Global commands updated');
|
|
153
|
+
console.log('ā
OMC skill updated');
|
|
154
|
+
console.log('\nš Global prism updated to latest.');
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
|
|
149
158
|
console.log('š claude-prism update\n');
|
|
150
159
|
await update(cwd);
|
|
151
160
|
console.log('ā
Rules updated');
|
|
@@ -166,6 +175,7 @@ Usage:
|
|
|
166
175
|
prism stats Show installation summary
|
|
167
176
|
prism reset Clear hook state (edit counters, etc.)
|
|
168
177
|
prism update Re-install using current config
|
|
178
|
+
prism update --global Update global commands + OMC skill
|
|
169
179
|
prism uninstall Remove prism from current project
|
|
170
180
|
prism uninstall --global Remove global commands + OMC skill
|
|
171
181
|
|
package/lib/installer.mjs
CHANGED
|
@@ -30,7 +30,7 @@ export async function init(projectDir, options = {}) {
|
|
|
30
30
|
const nsCommandsDir = join(claudeDir, 'commands', 'claude-prism');
|
|
31
31
|
mkdirSync(nsCommandsDir, { recursive: true });
|
|
32
32
|
|
|
33
|
-
const commandFiles = ['prism.md', 'checkpoint.md', 'plan.md', 'doctor.md', 'stats.md', 'help.md'];
|
|
33
|
+
const commandFiles = ['prism.md', 'checkpoint.md', 'plan.md', 'doctor.md', 'stats.md', 'help.md', 'update.md'];
|
|
34
34
|
for (const cmd of commandFiles) {
|
|
35
35
|
copyFileSync(
|
|
36
36
|
join(TEMPLATES_DIR, 'commands', 'claude-prism', cmd),
|
|
@@ -241,7 +241,7 @@ export function doctor(projectDir, options = {}) {
|
|
|
241
241
|
|
|
242
242
|
// Check namespaced commands
|
|
243
243
|
const nsCommandsDir = join(claudeDir, 'commands', 'claude-prism');
|
|
244
|
-
const expectedCommands = ['prism.md', 'checkpoint.md', 'plan.md', 'doctor.md', 'stats.md', 'help.md'];
|
|
244
|
+
const expectedCommands = ['prism.md', 'checkpoint.md', 'plan.md', 'doctor.md', 'stats.md', 'help.md', 'update.md'];
|
|
245
245
|
for (const cmd of expectedCommands) {
|
|
246
246
|
if (!existsSync(join(nsCommandsDir, cmd))) {
|
|
247
247
|
issues.push(`Missing command: claude-prism/${cmd}`);
|
|
@@ -386,7 +386,7 @@ export function initGlobal(options = {}) {
|
|
|
386
386
|
const commandsDir = join(claudeDir, 'commands', 'claude-prism');
|
|
387
387
|
mkdirSync(commandsDir, { recursive: true });
|
|
388
388
|
|
|
389
|
-
const commandFiles = ['prism.md', 'checkpoint.md', 'plan.md', 'doctor.md', 'stats.md', 'help.md'];
|
|
389
|
+
const commandFiles = ['prism.md', 'checkpoint.md', 'plan.md', 'doctor.md', 'stats.md', 'help.md', 'update.md'];
|
|
390
390
|
for (const cmd of commandFiles) {
|
|
391
391
|
copyFileSync(
|
|
392
392
|
join(TEMPLATES_DIR, 'commands', 'claude-prism', cmd),
|
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# /claude-prism:update ā Update Prism
|
|
2
|
+
|
|
3
|
+
When this command is invoked, update claude-prism to the latest version.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. **Run the update command**:
|
|
8
|
+
```bash
|
|
9
|
+
npx claude-prism@latest update
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. **If `--global` argument is provided**, update global installation instead:
|
|
13
|
+
```bash
|
|
14
|
+
npx claude-prism@latest update --global
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
3. **Report the result** using this format:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
š claude-prism updated
|
|
21
|
+
|
|
22
|
+
ā
Rules updated ā CLAUDE.md
|
|
23
|
+
ā
Commands updated ā /claude-prism:*
|
|
24
|
+
ā
Hooks updated ā commit-guard, debug-loop, test-tracker, scope-guard
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or for global:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
š claude-prism updated (global)
|
|
31
|
+
|
|
32
|
+
ā
Commands updated ā ~/.claude/commands/claude-prism/
|
|
33
|
+
ā
OMC skill updated ā ~/.claude/skills/prism/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
4. **Verify** by running `prism check` (local) or checking file existence (global).
|