claude-code-pulsify 1.1.0 → 1.1.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/README.md CHANGED
@@ -34,6 +34,18 @@ npx claude-code-pulsify@latest --uninstall
34
34
  - **Context monitor** -- Warns at 65% and 75% context usage via PostToolUse hook
35
35
  - **Update checker** -- Background version check on session start, non-blocking
36
36
 
37
+ ## Checking your installed version
38
+
39
+ ```bash
40
+ npx claude-code-pulsify --status
41
+ ```
42
+
43
+ This shows the currently installed version, hooks location, and whether an update is available.
44
+
45
+ You can also check manually:
46
+ - **VERSION file:** `~/.claude/hooks/claude-code-pulsify/VERSION`
47
+ - **Update cache:** `~/.claude/cache/claude-code-pulsify-update.json` — written on each session start, contains `installed`, `latest`, and `updateAvailable` fields
48
+
37
49
  ## Configuration
38
50
 
39
51
  Respects the `CLAUDE_CONFIG_DIR` environment variable. Defaults to `~/.claude`.
package/bin/install.js CHANGED
@@ -69,9 +69,15 @@ function install() {
69
69
  fs.writeFileSync(path.join(hooksTarget, 'VERSION'), PACKAGE_VERSION, 'utf8')
70
70
  console.log(` Wrote VERSION (${PACKAGE_VERSION})`)
71
71
 
72
- // 3. Clear stale update cache so the indicator disappears immediately
73
- const updateCachePath = path.join(configDir, 'cache', 'claude-code-pulsify-update.json')
74
- try { fs.unlinkSync(updateCachePath) } catch { /* doesn't exist — fine */ }
72
+ // 3. Clear update cache so stale "update available" indicators don't persist after install.
73
+ // The background worker will refresh it on next session.
74
+ const cachePath = path.join(configDir, 'cache', 'claude-code-pulsify-update.json')
75
+ try {
76
+ fs.unlinkSync(cachePath)
77
+ console.log(` Cleared update cache`)
78
+ } catch {
79
+ // Doesn't exist — fine
80
+ }
75
81
 
76
82
  // 4. Patch settings.json
77
83
  const settings = readJSON(settingsPath)
@@ -170,6 +176,26 @@ const args = process.argv.slice(2)
170
176
 
171
177
  if (args.includes('--version')) {
172
178
  console.log(PACKAGE_VERSION)
179
+ } else if (args.includes('--status')) {
180
+ const versionFile = path.join(hooksTarget, 'VERSION')
181
+ const cachePath = path.join(configDir, 'cache', 'claude-code-pulsify-update.json')
182
+ const installed = fs.existsSync(versionFile) ? fs.readFileSync(versionFile, 'utf8').trim() : null
183
+ if (!installed) {
184
+ console.log('claude-code-pulsify is not installed.')
185
+ process.exit(1)
186
+ }
187
+ console.log(`Installed: v${installed}`)
188
+ console.log(`Hooks: ${hooksTarget}`)
189
+ try {
190
+ const cache = JSON.parse(fs.readFileSync(cachePath, 'utf8'))
191
+ if (cache.updateAvailable && cache.latest) {
192
+ console.log(`Latest: v${cache.latest} (update available)`)
193
+ } else {
194
+ console.log(`Latest: v${cache.latest || installed} (up to date)`)
195
+ }
196
+ } catch {
197
+ console.log(`Latest: unknown (run a Claude Code session to check)`)
198
+ }
173
199
  } else if (args.includes('--uninstall')) {
174
200
  uninstall()
175
201
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-pulsify",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Context-aware statusline and context monitor for Claude Code",
5
5
  "bin": {
6
6
  "claude-code-pulsify": "bin/install.js"