claudekit-cli 4.4.0-dev.1 → 4.4.0-dev.3
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 +3 -1
- package/cli-manifest.json +2 -2
- package/dist/index.js +70 -7
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Without a purchased kit and repository access, the CLI will not be able to downl
|
|
|
50
50
|
|
|
51
51
|
The ClaudeKit CLI is published on npm at [npmjs.com/package/claudekit-cli](https://www.npmjs.com/package/claudekit-cli).
|
|
52
52
|
|
|
53
|
-
End-user runtime note: global installs from `npm`, `pnpm`, `yarn`, or `bun` all execute the packaged Node.js CLI. Bun is optional for users and only needed for local ClaudeKit CLI development workflows.
|
|
53
|
+
End-user runtime note: global installs from `npm`, `pnpm`, `yarn`, or `bun` all execute the packaged Node.js CLI. Bun is optional for users and only needed for local ClaudeKit CLI development workflows. Most commands do not require native build tools; `ck content` uses an optional SQLite driver and shows remediation steps if that driver is unavailable.
|
|
54
54
|
|
|
55
55
|
### Using npm (Recommended)
|
|
56
56
|
|
|
@@ -407,6 +407,8 @@ ck content start --verbose
|
|
|
407
407
|
|
|
408
408
|
**Features:** 11-phase pipeline (scan → filter → classify → context → create → validate → review → photo → publish → engage → analyze), noise filtering, context caching (24h TTL), content validation, photo generation, 3 review modes (auto/manual/hybrid), quiet hours scheduling, engagement tracking, SQLite database, platform-specific adapters.
|
|
409
409
|
|
|
410
|
+
**Runtime dependency:** `ck content` uses the optional native SQLite driver `better-sqlite3`. If the driver is unavailable, other CLI commands still work and `ck content` prints reinstall/build-tool guidance.
|
|
411
|
+
|
|
410
412
|
**Config:** `.ck.json` under `content` key. See [docs/ck-content.md](./docs/ck-content.md) for full configuration reference.
|
|
411
413
|
|
|
412
414
|
### Other Commands
|
package/cli-manifest.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -63852,7 +63852,7 @@ var package_default;
|
|
|
63852
63852
|
var init_package = __esm(() => {
|
|
63853
63853
|
package_default = {
|
|
63854
63854
|
name: "claudekit-cli",
|
|
63855
|
-
version: "4.4.0-dev.
|
|
63855
|
+
version: "4.4.0-dev.3",
|
|
63856
63856
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
63857
63857
|
type: "module",
|
|
63858
63858
|
repository: {
|
|
@@ -63922,7 +63922,6 @@ var init_package = __esm(() => {
|
|
|
63922
63922
|
dependencies: {
|
|
63923
63923
|
"@clack/prompts": "^0.7.0",
|
|
63924
63924
|
"@octokit/rest": "^22.0.0",
|
|
63925
|
-
"better-sqlite3": "^12.6.2",
|
|
63926
63925
|
cac: "^6.7.14",
|
|
63927
63926
|
chokidar: "^5.0.0",
|
|
63928
63927
|
"cli-progress": "^3.12.0",
|
|
@@ -63947,6 +63946,9 @@ var init_package = __esm(() => {
|
|
|
63947
63946
|
ws: "^8.19.0",
|
|
63948
63947
|
zod: "^3.23.8"
|
|
63949
63948
|
},
|
|
63949
|
+
optionalDependencies: {
|
|
63950
|
+
"better-sqlite3": "^12.6.2"
|
|
63951
|
+
},
|
|
63950
63952
|
devDependencies: {
|
|
63951
63953
|
"@biomejs/biome": "^1.9.4",
|
|
63952
63954
|
"@playwright/test": "^1.59.1",
|
|
@@ -64260,6 +64262,10 @@ function extractCommandStdout(result) {
|
|
|
64260
64262
|
return result.stdout;
|
|
64261
64263
|
return "";
|
|
64262
64264
|
}
|
|
64265
|
+
function isNativeDependencyBuildError(errorMessage) {
|
|
64266
|
+
const normalized = errorMessage.toLowerCase();
|
|
64267
|
+
return (normalized.includes("better-sqlite3") || normalized.includes("prebuild-install") || normalized.includes("node-gyp")) && (normalized.includes("no prebuilt binaries found") || normalized.includes("could not find any visual studio installation") || normalized.includes("visual studio build tools") || normalized.includes("desktop development with c++") || normalized.includes("node-gyp rebuild"));
|
|
64268
|
+
}
|
|
64263
64269
|
async function runPackageManagerUpdate(updateCmd, pm, deps) {
|
|
64264
64270
|
const { execAsyncFn, spinnerStart, spinnerStop } = deps;
|
|
64265
64271
|
spinnerStart("Updating CLI...");
|
|
@@ -64277,6 +64283,17 @@ Or fix npm permissions: https://docs.npmjs.com/resolving-eacces-permissions-erro
|
|
|
64277
64283
|
const elevationHint = isWindows3 ? `Run your terminal as Administrator and retry: ${updateCmd}` : `sudo ${updateCmd}`;
|
|
64278
64284
|
throw new CliUpdateError(`Permission denied. Try: ${elevationHint}${permHint}`);
|
|
64279
64285
|
}
|
|
64286
|
+
if (isNativeDependencyBuildError(errorMessage)) {
|
|
64287
|
+
throw new CliUpdateError([
|
|
64288
|
+
"Update failed while installing a native optional dependency.",
|
|
64289
|
+
"ClaudeKit CLI should not require native SQLite for normal install/update commands.",
|
|
64290
|
+
"",
|
|
64291
|
+
`Manual update: ${redactCommandForLog(updateCmd)}`,
|
|
64292
|
+
"",
|
|
64293
|
+
"If this persists, retry after updating ClaudeKit CLI to a version where `better-sqlite3` is optional, or install Visual Studio Build Tools with the Desktop development with C++ workload for `ck content` support."
|
|
64294
|
+
].join(`
|
|
64295
|
+
`));
|
|
64296
|
+
}
|
|
64280
64297
|
logger.error(`Update failed: ${errorMessage}`);
|
|
64281
64298
|
logger.info(`Try running: ${updateCmd}`);
|
|
64282
64299
|
throw new CliUpdateError(`Update failed: ${errorMessage}
|
|
@@ -68466,17 +68483,18 @@ function registerSystemRoutes(app) {
|
|
|
68466
68483
|
});
|
|
68467
68484
|
app.get("/api/system/info", async (_req, res) => {
|
|
68468
68485
|
try {
|
|
68469
|
-
const [packageJson, installLocation, gitVersion, ghVersion] = await Promise.all([
|
|
68486
|
+
const [packageJson, installLocation, gitVersion, ghVersion, bunVersion] = await Promise.all([
|
|
68470
68487
|
getPackageJson(),
|
|
68471
68488
|
runCommand("which", ["ck"], "not found"),
|
|
68472
68489
|
runCommand("git", ["--version"], "unknown"),
|
|
68473
68490
|
runCommand("gh", ["--version"], "unknown").then((out) => out.split(`
|
|
68474
|
-
`)[0] ?? "unknown")
|
|
68491
|
+
`)[0] ?? "unknown"),
|
|
68492
|
+
runCommand("bun", ["--version"], "").then((out) => out || null)
|
|
68475
68493
|
]);
|
|
68476
68494
|
const response = {
|
|
68477
68495
|
configPath: PathResolver.getGlobalKitDir(),
|
|
68478
68496
|
nodeVersion: process.version,
|
|
68479
|
-
bunVersion
|
|
68497
|
+
bunVersion,
|
|
68480
68498
|
os: `${process.platform} ${process.arch}`,
|
|
68481
68499
|
cliVersion: packageJson?.version ?? "unknown",
|
|
68482
68500
|
packageManager: detectPackageManager(),
|
|
@@ -77843,11 +77861,56 @@ var init_content_logger = __esm(() => {
|
|
|
77843
77861
|
});
|
|
77844
77862
|
|
|
77845
77863
|
// src/commands/content/phases/sqlite-client.ts
|
|
77846
|
-
import
|
|
77864
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
77865
|
+
function createMissingSqliteDriverError(cause) {
|
|
77866
|
+
const detail = cause instanceof Error && cause.message ? `
|
|
77867
|
+
|
|
77868
|
+
Original error: ${cause.message}` : "";
|
|
77869
|
+
return new OptionalSqliteDriverError([
|
|
77870
|
+
"`ck content` requires the optional native package `better-sqlite3`, but it is not available in this CLI install.",
|
|
77871
|
+
"Most ClaudeKit CLI commands do not need it and should continue to work.",
|
|
77872
|
+
"",
|
|
77873
|
+
"To use `ck content`, reinstall the CLI with optional dependencies for your active Node.js runtime:",
|
|
77874
|
+
" npm install -g claudekit-cli --include=optional",
|
|
77875
|
+
"",
|
|
77876
|
+
"If npm attempts a source build on Windows, install Visual Studio Build Tools with the Desktop development with C++ workload."
|
|
77877
|
+
].join(`
|
|
77878
|
+
`) + detail, { cause });
|
|
77879
|
+
}
|
|
77880
|
+
function resolveBetterSqlite3Constructor(sqliteModule) {
|
|
77881
|
+
if (typeof sqliteModule === "function") {
|
|
77882
|
+
return sqliteModule;
|
|
77883
|
+
}
|
|
77884
|
+
if (sqliteModule.default && typeof sqliteModule.default === "function") {
|
|
77885
|
+
return sqliteModule.default;
|
|
77886
|
+
}
|
|
77887
|
+
throw new OptionalSqliteDriverError("`better-sqlite3` loaded, but did not expose a database constructor.");
|
|
77888
|
+
}
|
|
77889
|
+
function loadBetterSqlite3Driver(loadModule = () => require2("better-sqlite3")) {
|
|
77890
|
+
try {
|
|
77891
|
+
return resolveBetterSqlite3Constructor(loadModule());
|
|
77892
|
+
} catch (error) {
|
|
77893
|
+
if (error instanceof OptionalSqliteDriverError) {
|
|
77894
|
+
throw error;
|
|
77895
|
+
}
|
|
77896
|
+
throw createMissingSqliteDriverError(error);
|
|
77897
|
+
}
|
|
77898
|
+
}
|
|
77847
77899
|
function openDatabase(dbPath) {
|
|
77900
|
+
const BetterSqlite3 = cachedBetterSqlite3 ?? loadBetterSqlite3Driver();
|
|
77901
|
+
cachedBetterSqlite3 = BetterSqlite3;
|
|
77848
77902
|
return new BetterSqlite3(dbPath);
|
|
77849
77903
|
}
|
|
77850
|
-
var
|
|
77904
|
+
var require2, cachedBetterSqlite3 = null, OptionalSqliteDriverError;
|
|
77905
|
+
var init_sqlite_client = __esm(() => {
|
|
77906
|
+
require2 = createRequire2(import.meta.url);
|
|
77907
|
+
OptionalSqliteDriverError = class OptionalSqliteDriverError extends Error {
|
|
77908
|
+
constructor(message, options2) {
|
|
77909
|
+
super(message, options2);
|
|
77910
|
+
this.name = "OptionalSqliteDriverError";
|
|
77911
|
+
}
|
|
77912
|
+
};
|
|
77913
|
+
});
|
|
77851
77914
|
|
|
77852
77915
|
// src/commands/content/phases/db-manager.ts
|
|
77853
77916
|
import { existsSync as existsSync83, mkdirSync as mkdirSync8 } from "node:fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudekit-cli",
|
|
3
|
-
"version": "4.4.0-dev.
|
|
3
|
+
"version": "4.4.0-dev.3",
|
|
4
4
|
"description": "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@clack/prompts": "^0.7.0",
|
|
72
72
|
"@octokit/rest": "^22.0.0",
|
|
73
|
-
"better-sqlite3": "^12.6.2",
|
|
74
73
|
"cac": "^6.7.14",
|
|
75
74
|
"chokidar": "^5.0.0",
|
|
76
75
|
"cli-progress": "^3.12.0",
|
|
@@ -95,6 +94,9 @@
|
|
|
95
94
|
"ws": "^8.19.0",
|
|
96
95
|
"zod": "^3.23.8"
|
|
97
96
|
},
|
|
97
|
+
"optionalDependencies": {
|
|
98
|
+
"better-sqlite3": "^12.6.2"
|
|
99
|
+
},
|
|
98
100
|
"devDependencies": {
|
|
99
101
|
"@biomejs/biome": "^1.9.4",
|
|
100
102
|
"@playwright/test": "^1.59.1",
|