claudekit-cli 4.4.0-dev.1 → 4.4.0-dev.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/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
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.4.0-dev.1",
3
- "generatedAt": "2026-05-27T19:13:35.783Z",
2
+ "version": "4.4.0-dev.2",
3
+ "generatedAt": "2026-05-30T14:38:02.947Z",
4
4
  "commands": {
5
5
  "agents": {
6
6
  "name": "agents",
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.1",
63855
+ version: "4.4.0-dev.2",
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}
@@ -77843,11 +77860,56 @@ var init_content_logger = __esm(() => {
77843
77860
  });
77844
77861
 
77845
77862
  // src/commands/content/phases/sqlite-client.ts
77846
- import BetterSqlite3 from "better-sqlite3";
77863
+ import { createRequire as createRequire2 } from "node:module";
77864
+ function createMissingSqliteDriverError(cause) {
77865
+ const detail = cause instanceof Error && cause.message ? `
77866
+
77867
+ Original error: ${cause.message}` : "";
77868
+ return new OptionalSqliteDriverError([
77869
+ "`ck content` requires the optional native package `better-sqlite3`, but it is not available in this CLI install.",
77870
+ "Most ClaudeKit CLI commands do not need it and should continue to work.",
77871
+ "",
77872
+ "To use `ck content`, reinstall the CLI with optional dependencies for your active Node.js runtime:",
77873
+ " npm install -g claudekit-cli --include=optional",
77874
+ "",
77875
+ "If npm attempts a source build on Windows, install Visual Studio Build Tools with the Desktop development with C++ workload."
77876
+ ].join(`
77877
+ `) + detail, { cause });
77878
+ }
77879
+ function resolveBetterSqlite3Constructor(sqliteModule) {
77880
+ if (typeof sqliteModule === "function") {
77881
+ return sqliteModule;
77882
+ }
77883
+ if (sqliteModule.default && typeof sqliteModule.default === "function") {
77884
+ return sqliteModule.default;
77885
+ }
77886
+ throw new OptionalSqliteDriverError("`better-sqlite3` loaded, but did not expose a database constructor.");
77887
+ }
77888
+ function loadBetterSqlite3Driver(loadModule = () => require2("better-sqlite3")) {
77889
+ try {
77890
+ return resolveBetterSqlite3Constructor(loadModule());
77891
+ } catch (error) {
77892
+ if (error instanceof OptionalSqliteDriverError) {
77893
+ throw error;
77894
+ }
77895
+ throw createMissingSqliteDriverError(error);
77896
+ }
77897
+ }
77847
77898
  function openDatabase(dbPath) {
77899
+ const BetterSqlite3 = cachedBetterSqlite3 ?? loadBetterSqlite3Driver();
77900
+ cachedBetterSqlite3 = BetterSqlite3;
77848
77901
  return new BetterSqlite3(dbPath);
77849
77902
  }
77850
- var init_sqlite_client = () => {};
77903
+ var require2, cachedBetterSqlite3 = null, OptionalSqliteDriverError;
77904
+ var init_sqlite_client = __esm(() => {
77905
+ require2 = createRequire2(import.meta.url);
77906
+ OptionalSqliteDriverError = class OptionalSqliteDriverError extends Error {
77907
+ constructor(message, options2) {
77908
+ super(message, options2);
77909
+ this.name = "OptionalSqliteDriverError";
77910
+ }
77911
+ };
77912
+ });
77851
77913
 
77852
77914
  // src/commands/content/phases/db-manager.ts
77853
77915
  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.1",
3
+ "version": "4.4.0-dev.2",
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",