@basestream/cli 0.2.7 → 0.2.8
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/dist/cli.mjs +22 -13
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -289,7 +289,10 @@ function injectClaudeMdRule() {
|
|
|
289
289
|
}
|
|
290
290
|
let updated;
|
|
291
291
|
if (existing.includes(CLAUDE_MD_MARKER)) {
|
|
292
|
-
updated = existing.replace(
|
|
292
|
+
updated = existing.replace(
|
|
293
|
+
/<!-- basestream -->[\s\S]*?<!-- \/basestream -->/,
|
|
294
|
+
CLAUDE_MD_RULE
|
|
295
|
+
);
|
|
293
296
|
fs2.writeFileSync(CLAUDE_MD_PATH, updated);
|
|
294
297
|
check("Updated Basestream rules in ~/.claude/CLAUDE.md");
|
|
295
298
|
} else {
|
|
@@ -367,7 +370,9 @@ function injectClaudeCodeHook() {
|
|
|
367
370
|
);
|
|
368
371
|
if (ourEntryIndex !== -1) {
|
|
369
372
|
const entry = existing[ourEntryIndex];
|
|
370
|
-
const hookIndex = entry.hooks.findIndex(
|
|
373
|
+
const hookIndex = entry.hooks.findIndex(
|
|
374
|
+
(h) => h.command?.includes(HOOK_MARKER)
|
|
375
|
+
);
|
|
371
376
|
const hook = entry.hooks[hookIndex];
|
|
372
377
|
if (hook.command === HOOK_COMMAND && hook.timeout === HOOK_TIMEOUT) {
|
|
373
378
|
check("Claude Code hook already installed");
|
|
@@ -416,9 +421,13 @@ async function init() {
|
|
|
416
421
|
console.log();
|
|
417
422
|
console.log(` ${c.dim("That's it. One last step:")}`);
|
|
418
423
|
console.log();
|
|
419
|
-
console.log(
|
|
424
|
+
console.log(
|
|
425
|
+
` ${c.bold("Restart Claude Code")} for the hook to take effect.`
|
|
426
|
+
);
|
|
420
427
|
console.log();
|
|
421
|
-
console.log(
|
|
428
|
+
console.log(
|
|
429
|
+
` ${c.dim("After that, every session is automatically tracked.")}`
|
|
430
|
+
);
|
|
422
431
|
console.log();
|
|
423
432
|
}
|
|
424
433
|
|
|
@@ -943,18 +952,18 @@ var HELP = `
|
|
|
943
952
|
basestream \u2014 AI work intelligence for teams
|
|
944
953
|
|
|
945
954
|
Usage:
|
|
946
|
-
npx @basestream/cli
|
|
955
|
+
npx @basestream/cli <command>
|
|
947
956
|
|
|
948
957
|
Commands:
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
958
|
+
init Detect AI tools, inject hooks, authenticate
|
|
959
|
+
login Authenticate with your Basestream account
|
|
960
|
+
status Show this week's logged sessions
|
|
961
|
+
sync Manually sync buffered entries to Basestream
|
|
962
|
+
uninstall Remove the Claude Code tracking hook
|
|
954
963
|
|
|
955
964
|
Options:
|
|
956
|
-
--help, -h
|
|
957
|
-
--version, -v
|
|
965
|
+
--help, -h Show this help message
|
|
966
|
+
--version, -v Show version
|
|
958
967
|
`;
|
|
959
968
|
async function main() {
|
|
960
969
|
const command = process.argv[2];
|
|
@@ -963,7 +972,7 @@ async function main() {
|
|
|
963
972
|
process.exit(0);
|
|
964
973
|
}
|
|
965
974
|
if (command === "--version" || command === "-v") {
|
|
966
|
-
console.log(true ? "0.2.
|
|
975
|
+
console.log(true ? "0.2.8" : "dev");
|
|
967
976
|
process.exit(0);
|
|
968
977
|
}
|
|
969
978
|
switch (command || "init") {
|
package/package.json
CHANGED