codexkit 1.0.4 → 1.0.5

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 CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.5] — 2026-03-18
11
+
12
+ ### Fixed
13
+
14
+ - **Windows compatibility**: CLI entry point changed from bash script (`bin/codexkit`) to Node.js wrapper (`bin/codexkit.js`), fixing `The term '/bin/bash.exe' is not recognized` error when installing via `npm install -g`, `pnpm add -g`, or `bun add -g` on Windows
15
+ - Node.js wrapper auto-detects bash from Git for Windows, MSYS2, WSL, or PATH; provides clear error message with install links if bash is not found
16
+ - Works cross-platform with all major package managers (npm, pnpm, bun, yarn)
17
+
10
18
  ## [1.0.4] — 2026-03-18
11
19
 
12
20
  ### Added
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execFileSync, execSync } = require("child_process");
5
+ const path = require("path");
6
+ const fs = require("fs");
7
+ const os = require("os");
8
+
9
+ const BASH_SCRIPT = path.join(__dirname, "codexkit");
10
+
11
+ function findBash() {
12
+ if (os.platform() !== "win32") {
13
+ return "/bin/bash";
14
+ }
15
+
16
+ // On Windows, try common bash locations in order
17
+ const candidates = [];
18
+
19
+ // Git for Windows (most common)
20
+ const programFiles = process.env.ProgramFiles || "C:\\Program Files";
21
+ const programFilesX86 =
22
+ process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)";
23
+ candidates.push(
24
+ path.join(programFiles, "Git", "bin", "bash.exe"),
25
+ path.join(programFilesX86, "Git", "bin", "bash.exe"),
26
+ path.join(programFiles, "Git", "usr", "bin", "bash.exe")
27
+ );
28
+
29
+ // MSYS2
30
+ candidates.push("C:\\msys64\\usr\\bin\\bash.exe");
31
+
32
+ // WSL
33
+ const system32 = path.join(
34
+ process.env.SystemRoot || "C:\\Windows",
35
+ "System32"
36
+ );
37
+ candidates.push(path.join(system32, "bash.exe"));
38
+
39
+ // Check PATH via where
40
+ try {
41
+ const result = execSync("where bash.exe", {
42
+ encoding: "utf8",
43
+ stdio: ["pipe", "pipe", "pipe"],
44
+ }).trim();
45
+ if (result) {
46
+ const first = result.split(/\r?\n/)[0];
47
+ if (first && fs.existsSync(first)) {
48
+ return first;
49
+ }
50
+ }
51
+ } catch (_) {
52
+ // not found via where
53
+ }
54
+
55
+ for (const candidate of candidates) {
56
+ if (fs.existsSync(candidate)) {
57
+ return candidate;
58
+ }
59
+ }
60
+
61
+ console.error(
62
+ "Error: bash not found. Codexkit requires bash to run.\n\n" +
63
+ "On Windows, install one of the following:\n" +
64
+ " - Git for Windows: https://git-scm.com/download/win\n" +
65
+ " - WSL: wsl --install\n" +
66
+ " - MSYS2: https://www.msys2.org/\n"
67
+ );
68
+ process.exit(1);
69
+ }
70
+
71
+ const bash = findBash();
72
+ const args = process.argv.slice(2);
73
+
74
+ try {
75
+ const result = execFileSync(bash, [BASH_SCRIPT, ...args], {
76
+ stdio: "inherit",
77
+ env: { ...process.env },
78
+ windowsHide: false,
79
+ });
80
+ process.exit(0);
81
+ } catch (err) {
82
+ if (err.status != null) {
83
+ process.exit(err.status);
84
+ }
85
+ console.error(err.message);
86
+ process.exit(1);
87
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codexkit",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Professional configuration kit for OpenAI Codex CLI",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -11,7 +11,7 @@
11
11
  "installer"
12
12
  ],
13
13
  "bin": {
14
- "codexkit": "bin/codexkit"
14
+ "codexkit": "bin/codexkit.js"
15
15
  },
16
16
  "files": [
17
17
  "bin",