cc-cream 0.1.7 → 0.1.9
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 +14 -0
- package/README.md +22 -15
- package/package.json +4 -2
- package/src/install.js +26 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to cc-cream are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.1.9] — 2026-05-29
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **`/cc-cream:setup` and `/cc-cream:uninstall` no longer hang on a y/N prompt** (CREAM-vxbbrypj). The slash commands run `install.js` via Claude Code's bang execution, which has no interactive TTY, so install.js's readline prompts blocked forever — the uninstaller's "delete runtime/state?" prompt was the dead end. install.js now detects a missing TTY and resolves prompts non-interactively: uninstall removes the `statusLine` and **keeps** the runtime/state artifacts (re-run in a terminal or pass `--purge` to delete them); setup overwrites an existing *cc-cream* `statusLine` but never clobbers a foreign one without a terminal or the new `--force`/`--yes` flag. Interactive terminals are unchanged. (Plugin removal still takes two steps — `/cc-cream:uninstall` then `/plugin uninstall cc-cream` — because Claude Code has no plugin-uninstall hook to clean `settings.json` automatically.)
|
|
11
|
+
|
|
12
|
+
## [0.1.8] — 2026-05-29
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **`cc-cream-setup` bin for npm users** (CREAM-gvrvnhsc). `npm install -g cc-cream` now exposes a first-class `cc-cream-setup` command (and `cc-cream-setup --uninstall` / `--purge`) that runs the consent installer, replacing the clunky `node $(npm root -g)/cc-cream/src/install.js`. The existing `cc-cream` bin remains the status-line renderer.
|
|
16
|
+
- **CI workflow that runs the publish gate on a CLI-less runner** (CREAM-xzhidmjt). `.github/workflows/ci.yml` runs `npm test` — the exact command `prepublishOnly` runs — on every PR and push to `main`, and asserts the `claude` CLI is absent so it mirrors the npm-publish environment.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **Publish gate is now CI-safe by construction** (CREAM-xzhidmjt). Scenarios that shell out to a live `claude` are tagged `@needs-cli` and excluded from the default cucumber profile (`not @manual and not @needs-cli`); run them with `npm run test:cli`. Previously such a scenario could go `pending` on a runner without the CLI and silently break `npm publish` — now any regression of that kind fails on the PR instead.
|
|
20
|
+
|
|
7
21
|
## [0.1.7] — 2026-05-29
|
|
8
22
|
|
|
9
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -76,20 +76,21 @@ The `/cc-cream:setup` command runs the consent installer, which writes the
|
|
|
76
76
|
`/plugin update` drops a new version into the cache, the next render picks it
|
|
77
77
|
up without any further action.
|
|
78
78
|
|
|
79
|
-
### Option 2 — npm
|
|
79
|
+
### Option 2 — npm
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
|
|
82
|
+
npm install -g cc-cream
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Then wire it into Claude Code with the bundled CLI:
|
|
86
86
|
```bash
|
|
87
|
-
|
|
87
|
+
cc-cream-setup
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
`cc-cream-setup` runs the consent installer (`src/install.js`). Without a global
|
|
91
|
+
install you can run it through npx:
|
|
91
92
|
```bash
|
|
92
|
-
|
|
93
|
+
npx -y -p cc-cream cc-cream-setup
|
|
93
94
|
```
|
|
94
95
|
|
|
95
96
|
### Option 3 — Manual GitHub clone
|
|
@@ -111,23 +112,29 @@ and you may need to **restart** it for the bar to appear.
|
|
|
111
112
|
|
|
112
113
|
### Uninstall
|
|
113
114
|
|
|
114
|
-
Plugin users
|
|
115
|
+
Plugin users — two steps (Claude Code can't clean `settings.json` when a plugin
|
|
116
|
+
is removed, so the wiring is cleared separately from the cache):
|
|
115
117
|
```
|
|
116
|
-
/cc-cream:uninstall
|
|
117
|
-
/plugin uninstall cc-cream
|
|
118
|
+
/cc-cream:uninstall # removes the statusLine wiring
|
|
119
|
+
/plugin uninstall cc-cream # drops the plugin from the cache
|
|
118
120
|
```
|
|
119
121
|
|
|
120
122
|
npm / manual users:
|
|
121
123
|
```bash
|
|
122
|
-
|
|
123
|
-
node cc-cream/src/install.js --uninstall
|
|
124
|
+
cc-cream-setup --uninstall # npm (add --purge to also remove runtime + config)
|
|
125
|
+
node cc-cream/src/install.js --uninstall # manual clone
|
|
124
126
|
```
|
|
125
127
|
|
|
126
128
|
Uninstall removes the `statusLine` block **only if it is cc-cream's** — a
|
|
127
|
-
statusLine you wired for something else is left untouched.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
to
|
|
129
|
+
statusLine you wired for something else is left untouched. In a terminal it asks
|
|
130
|
+
before deleting the copied runtime and session-state files; run **non-interactively**
|
|
131
|
+
(as the `/cc-cream:uninstall` slash command does) it leaves those artifacts in
|
|
132
|
+
place — pass `--purge` to remove them and your `~/.claude/cc-cream.json` config.
|
|
133
|
+
Restart Claude Code to clear the bar.
|
|
134
|
+
|
|
135
|
+
Likewise, `cc-cream-setup` run non-interactively will overwrite an existing
|
|
136
|
+
*cc-cream* statusLine but never a foreign one — pass `--force` to replace
|
|
137
|
+
regardless.
|
|
131
138
|
|
|
132
139
|
## Configuration
|
|
133
140
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-cream",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Claude Code cache/context/cost status-line tool",
|
|
5
5
|
"directories": {
|
|
6
6
|
"doc": "docs"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"pretest": "npm run lint && npm run knip && npm run validate",
|
|
13
13
|
"test": "cucumber-js",
|
|
14
14
|
"test:manual": "cucumber-js --profile manual",
|
|
15
|
+
"test:cli": "cucumber-js --profile cli",
|
|
15
16
|
"coverage": "c8 cucumber-js",
|
|
16
17
|
"watch": "cucumber-js --watch",
|
|
17
18
|
"hooks": "simple-git-hooks",
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
"pre-push": "npm run coverage"
|
|
22
23
|
},
|
|
23
24
|
"bin": {
|
|
24
|
-
"cc-cream": "src/cc-cream.js"
|
|
25
|
+
"cc-cream": "src/cc-cream.js",
|
|
26
|
+
"cc-cream-setup": "src/install.js"
|
|
25
27
|
},
|
|
26
28
|
"files": [
|
|
27
29
|
"src/",
|
package/src/install.js
CHANGED
|
@@ -223,12 +223,22 @@ async function uninstall({ purge }) {
|
|
|
223
223
|
|
|
224
224
|
const artifacts = [runtimeDir, stateFile].filter((p) => fs.existsSync(p));
|
|
225
225
|
if (artifacts.length) {
|
|
226
|
-
|
|
226
|
+
let remove = purge;
|
|
227
|
+
if (!remove && process.stdin.isTTY) {
|
|
228
|
+
remove = await ask(`Also delete the copied runtime and session state?\n ${artifacts.join('\n ')}`);
|
|
229
|
+
}
|
|
227
230
|
if (remove) {
|
|
228
231
|
for (const p of artifacts) fs.rmSync(p, { recursive: true, force: true });
|
|
229
232
|
console.log('Removed runtime and state files.');
|
|
230
|
-
} else {
|
|
233
|
+
} else if (process.stdin.isTTY) {
|
|
231
234
|
console.log('Left runtime and state files in place.');
|
|
235
|
+
} else {
|
|
236
|
+
// Non-interactive (e.g. run via the /cc-cream:uninstall slash command, which
|
|
237
|
+
// has no TTY): never block on a prompt. The statusLine — the thing that
|
|
238
|
+
// matters — is already removed; keep the artifacts (deletion is destructive)
|
|
239
|
+
// and say how to remove them.
|
|
240
|
+
console.log(`Left runtime and session state in place — no terminal to confirm deletion:\n ${artifacts.join('\n ')}`);
|
|
241
|
+
console.log('Re-run in a terminal, or pass --purge, to remove them.');
|
|
232
242
|
}
|
|
233
243
|
}
|
|
234
244
|
if (purge && fs.existsSync(configFile)) {
|
|
@@ -248,6 +258,7 @@ async function main() {
|
|
|
248
258
|
return;
|
|
249
259
|
}
|
|
250
260
|
const plugin = args.includes('--plugin');
|
|
261
|
+
const force = args.includes('--force') || args.includes('--yes');
|
|
251
262
|
// First non-flag arg is an optional local source path (manual mode only).
|
|
252
263
|
const positional = args.filter((a) => !a.startsWith('--'));
|
|
253
264
|
|
|
@@ -284,7 +295,19 @@ async function main() {
|
|
|
284
295
|
// If a replace needs consent, ask now and re-plan with the answer.
|
|
285
296
|
if (!result.changed && result.needsConsent) {
|
|
286
297
|
for (const m of result.messages) console.log(m);
|
|
287
|
-
|
|
298
|
+
let yes;
|
|
299
|
+
if (process.stdin.isTTY) {
|
|
300
|
+
yes = await ask('Replace it with cc-cream?');
|
|
301
|
+
} else {
|
|
302
|
+
// Non-interactive (e.g. run via the /cc-cream:setup slash command, which has
|
|
303
|
+
// no TTY): never block on a prompt. Safe to overwrite our OWN wiring (an
|
|
304
|
+
// older/other-strategy cc-cream statusLine); never clobber a FOREIGN
|
|
305
|
+
// statusLine without a terminal or an explicit --force.
|
|
306
|
+
yes = force || isCcCreamStatusLine(settings.statusLine);
|
|
307
|
+
console.log(yes
|
|
308
|
+
? 'Non-interactive: replacing the existing cc-cream statusLine.'
|
|
309
|
+
: 'Non-interactive: left your existing statusLine unchanged. Re-run in a terminal, or pass --force, to replace it.');
|
|
310
|
+
}
|
|
288
311
|
result = plan(settings, { ...planOpts, consent: yes });
|
|
289
312
|
}
|
|
290
313
|
|