claudekit-cli 2.5.2 → 2.6.0
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/bin/ck.js +4 -2
- package/dist/index.js +32 -14
- package/package.json +1 -1
package/bin/ck.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
|
-
import { fileURLToPath } from "node:url";
|
|
12
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
13
|
|
|
14
14
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
15
|
|
|
@@ -39,8 +39,10 @@ const runWithNode = async (showWarning = false) => {
|
|
|
39
39
|
console.error("⚠️ Native binary failed, using Node.js fallback (slower startup)");
|
|
40
40
|
}
|
|
41
41
|
// The CLI module handles process.exit() internally after command execution
|
|
42
|
+
// Convert to file:// URL for cross-platform ESM compatibility (Windows paths require this)
|
|
43
|
+
const distUrl = pathToFileURL(distPath).href;
|
|
42
44
|
try {
|
|
43
|
-
await import(
|
|
45
|
+
await import(distUrl);
|
|
44
46
|
} catch (importErr) {
|
|
45
47
|
throw new Error(`Failed to load CLI module: ${getErrorMessage(importErr)}`);
|
|
46
48
|
}
|
package/dist/index.js
CHANGED
|
@@ -4997,7 +4997,8 @@ var init_types2 = __esm(() => {
|
|
|
4997
4997
|
installSkills: exports_external.boolean().default(false),
|
|
4998
4998
|
prefix: exports_external.boolean().default(false),
|
|
4999
4999
|
beta: exports_external.boolean().default(false),
|
|
5000
|
-
dryRun: exports_external.boolean().default(false)
|
|
5000
|
+
dryRun: exports_external.boolean().default(false),
|
|
5001
|
+
refresh: exports_external.boolean().default(false)
|
|
5001
5002
|
});
|
|
5002
5003
|
UpdateCommandOptionsSchema = exports_external.object({
|
|
5003
5004
|
dir: exports_external.string().default("."),
|
|
@@ -5012,7 +5013,8 @@ var init_types2 = __esm(() => {
|
|
|
5012
5013
|
beta: exports_external.boolean().default(false),
|
|
5013
5014
|
dryRun: exports_external.boolean().default(false),
|
|
5014
5015
|
forceOverwrite: exports_external.boolean().default(false),
|
|
5015
|
-
skipSetup: exports_external.boolean().default(false)
|
|
5016
|
+
skipSetup: exports_external.boolean().default(false),
|
|
5017
|
+
refresh: exports_external.boolean().default(false)
|
|
5016
5018
|
});
|
|
5017
5019
|
VersionCommandOptionsSchema = exports_external.object({
|
|
5018
5020
|
kit: KitType.optional(),
|
|
@@ -11708,6 +11710,10 @@ var init_help_commands = __esm(() => {
|
|
|
11708
11710
|
{
|
|
11709
11711
|
flags: "--beta",
|
|
11710
11712
|
description: "Show beta versions in selection prompt"
|
|
11713
|
+
},
|
|
11714
|
+
{
|
|
11715
|
+
flags: "--refresh",
|
|
11716
|
+
description: "Bypass release cache to fetch latest versions from GitHub"
|
|
11711
11717
|
}
|
|
11712
11718
|
]
|
|
11713
11719
|
},
|
|
@@ -11789,6 +11795,10 @@ var init_help_commands = __esm(() => {
|
|
|
11789
11795
|
{
|
|
11790
11796
|
flags: "--beta",
|
|
11791
11797
|
description: "Show beta versions in selection prompt"
|
|
11798
|
+
},
|
|
11799
|
+
{
|
|
11800
|
+
flags: "--refresh",
|
|
11801
|
+
description: "Bypass release cache to fetch latest versions from GitHub"
|
|
11792
11802
|
}
|
|
11793
11803
|
]
|
|
11794
11804
|
},
|
|
@@ -13035,7 +13045,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
13035
13045
|
// package.json
|
|
13036
13046
|
var package_default = {
|
|
13037
13047
|
name: "claudekit-cli",
|
|
13038
|
-
version: "2.
|
|
13048
|
+
version: "2.6.0",
|
|
13039
13049
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
13040
13050
|
type: "module",
|
|
13041
13051
|
repository: {
|
|
@@ -14044,6 +14054,9 @@ Need help? Run with: ck new --verbose`, 404);
|
|
|
14044
14054
|
const { limit = 10, includePrereleases = false, forceRefresh = false } = options;
|
|
14045
14055
|
const cacheKey = `${kit.repo}-${limit}-${includePrereleases}`;
|
|
14046
14056
|
try {
|
|
14057
|
+
if (forceRefresh) {
|
|
14058
|
+
logger.debug("Bypassing cache (--refresh flag) - fetching from GitHub API");
|
|
14059
|
+
}
|
|
14047
14060
|
if (!forceRefresh) {
|
|
14048
14061
|
const cachedReleases = await this.releaseCache.get(cacheKey);
|
|
14049
14062
|
if (cachedReleases) {
|
|
@@ -28523,7 +28536,8 @@ class VersionSelector {
|
|
|
28523
28536
|
includePrereleases = false,
|
|
28524
28537
|
limit = 10,
|
|
28525
28538
|
defaultValue,
|
|
28526
|
-
allowManualEntry = false
|
|
28539
|
+
allowManualEntry = false,
|
|
28540
|
+
forceRefresh = false
|
|
28527
28541
|
} = options;
|
|
28528
28542
|
try {
|
|
28529
28543
|
const loadingSpinner = de();
|
|
@@ -28531,7 +28545,7 @@ class VersionSelector {
|
|
|
28531
28545
|
const releases = await this.githubClient.listReleasesWithCache(kit, {
|
|
28532
28546
|
limit: limit * 2,
|
|
28533
28547
|
includePrereleases,
|
|
28534
|
-
forceRefresh
|
|
28548
|
+
forceRefresh
|
|
28535
28549
|
});
|
|
28536
28550
|
loadingSpinner.stop();
|
|
28537
28551
|
if (releases.length === 0) {
|
|
@@ -28677,12 +28691,12 @@ This could be due to:
|
|
|
28677
28691
|
allowManualEntry
|
|
28678
28692
|
});
|
|
28679
28693
|
}
|
|
28680
|
-
async getLatestVersion(kit, includePrereleases = false) {
|
|
28694
|
+
async getLatestVersion(kit, includePrereleases = false, forceRefresh = false) {
|
|
28681
28695
|
try {
|
|
28682
28696
|
const releases = await this.githubClient.listReleasesWithCache(kit, {
|
|
28683
28697
|
limit: 5,
|
|
28684
28698
|
includePrereleases,
|
|
28685
|
-
forceRefresh
|
|
28699
|
+
forceRefresh
|
|
28686
28700
|
});
|
|
28687
28701
|
if (releases.length === 0) {
|
|
28688
28702
|
return null;
|
|
@@ -30349,7 +30363,8 @@ async function initCommand(options) {
|
|
|
30349
30363
|
kit: kitConfig,
|
|
30350
30364
|
includePrereleases: validOptions.beta,
|
|
30351
30365
|
limit: 10,
|
|
30352
|
-
allowManualEntry: true
|
|
30366
|
+
allowManualEntry: true,
|
|
30367
|
+
forceRefresh: validOptions.refresh
|
|
30353
30368
|
});
|
|
30354
30369
|
if (!versionResult) {
|
|
30355
30370
|
logger.warning("Version selection cancelled by user");
|
|
@@ -30661,7 +30676,8 @@ async function newCommand(options) {
|
|
|
30661
30676
|
kit: kitConfig,
|
|
30662
30677
|
includePrereleases: validOptions.beta,
|
|
30663
30678
|
limit: 10,
|
|
30664
|
-
allowManualEntry: true
|
|
30679
|
+
allowManualEntry: true,
|
|
30680
|
+
forceRefresh: validOptions.refresh
|
|
30665
30681
|
});
|
|
30666
30682
|
if (!versionResult) {
|
|
30667
30683
|
logger.warning("Version selection cancelled by user");
|
|
@@ -31060,7 +31076,7 @@ import { promisify as promisify5 } from "node:util";
|
|
|
31060
31076
|
// package.json
|
|
31061
31077
|
var package_default2 = {
|
|
31062
31078
|
name: "claudekit-cli",
|
|
31063
|
-
version: "2.
|
|
31079
|
+
version: "2.6.0",
|
|
31064
31080
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
31065
31081
|
type: "module",
|
|
31066
31082
|
repository: {
|
|
@@ -32023,7 +32039,8 @@ var NewCommandOptionsSchema2 = exports_external.object({
|
|
|
32023
32039
|
installSkills: exports_external.boolean().default(false),
|
|
32024
32040
|
prefix: exports_external.boolean().default(false),
|
|
32025
32041
|
beta: exports_external.boolean().default(false),
|
|
32026
|
-
dryRun: exports_external.boolean().default(false)
|
|
32042
|
+
dryRun: exports_external.boolean().default(false),
|
|
32043
|
+
refresh: exports_external.boolean().default(false)
|
|
32027
32044
|
});
|
|
32028
32045
|
var UpdateCommandOptionsSchema2 = exports_external.object({
|
|
32029
32046
|
dir: exports_external.string().default("."),
|
|
@@ -32038,7 +32055,8 @@ var UpdateCommandOptionsSchema2 = exports_external.object({
|
|
|
32038
32055
|
beta: exports_external.boolean().default(false),
|
|
32039
32056
|
dryRun: exports_external.boolean().default(false),
|
|
32040
32057
|
forceOverwrite: exports_external.boolean().default(false),
|
|
32041
|
-
skipSetup: exports_external.boolean().default(false)
|
|
32058
|
+
skipSetup: exports_external.boolean().default(false),
|
|
32059
|
+
refresh: exports_external.boolean().default(false)
|
|
32042
32060
|
});
|
|
32043
32061
|
var VersionCommandOptionsSchema2 = exports_external.object({
|
|
32044
32062
|
kit: KitType2.optional(),
|
|
@@ -32412,13 +32430,13 @@ async function displayVersion() {
|
|
|
32412
32430
|
var cli = cac("ck");
|
|
32413
32431
|
cli.option("--verbose", "Enable verbose logging for debugging");
|
|
32414
32432
|
cli.option("--log-file <path>", "Write logs to file");
|
|
32415
|
-
cli.command("new", "Bootstrap a new ClaudeKit project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use (engineer, marketing)").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--prefix", "Add /ck: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").action(async (options) => {
|
|
32433
|
+
cli.command("new", "Bootstrap a new ClaudeKit project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use (engineer, marketing)").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--prefix", "Add /ck: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").action(async (options) => {
|
|
32416
32434
|
if (options.exclude && !Array.isArray(options.exclude)) {
|
|
32417
32435
|
options.exclude = [options.exclude];
|
|
32418
32436
|
}
|
|
32419
32437
|
await newCommand(options);
|
|
32420
32438
|
});
|
|
32421
|
-
cli.command("init", "Initialize or update ClaudeKit project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use (engineer, marketing)").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Completely remove .claude directory before downloading (requires confirmation)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--prefix", "Add /ck: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--dry-run", "Preview changes without applying them (requires --prefix)").option("--force-overwrite", "Override ownership protections and delete user-modified files (requires --prefix)").option("--skip-setup", "Skip interactive configuration wizard").action(async (options) => {
|
|
32439
|
+
cli.command("init", "Initialize or update ClaudeKit project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use (engineer, marketing)").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Completely remove .claude directory before downloading (requires confirmation)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--prefix", "Add /ck: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--dry-run", "Preview changes without applying them (requires --prefix)").option("--force-overwrite", "Override ownership protections and delete user-modified files (requires --prefix)").option("--skip-setup", "Skip interactive configuration wizard").action(async (options) => {
|
|
32422
32440
|
if (options.exclude && !Array.isArray(options.exclude)) {
|
|
32423
32441
|
options.exclude = [options.exclude];
|
|
32424
32442
|
}
|