summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-01-22 14:07:04 -0800
committerJesse Vincent <jesse@fsck.com>2026-01-22 14:07:04 -0800
commitc3d478dc47c1f5bcc4c8eb85ead8e5a537a9b68f (patch)
treee1137706cc1cea5586e58b41f6c5c35a97354dc9
parente147c303c00a5ca36f61cb8826b5cb72e0884aff (diff)
fix: add Windows launcher for Codex CLI (#243, #285)fix/windows-codex-launcher
Windows cannot execute extensionless scripts with shebangs. Added .cmd wrapper that invokes Node.js directly. Changes: - Add .codex/superpowers-codex.cmd (Windows shim) - Update docs/README.codex.md with Windows installation instructions - Add Windows troubleshooting section Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
-rw-r--r--.codex/superpowers-codex.cmd14
-rw-r--r--RELEASE-NOTES.md6
-rw-r--r--docs/README.codex.md42
3 files changed, 59 insertions, 3 deletions
diff --git a/.codex/superpowers-codex.cmd b/.codex/superpowers-codex.cmd
new file mode 100644
index 0000000..a214cbe
--- /dev/null
+++ b/.codex/superpowers-codex.cmd
@@ -0,0 +1,14 @@
+@echo off
+setlocal
+
+REM Windows shim for the extensionless Node.js launcher (superpowers-codex).
+REM
+REM Windows cannot execute extensionless scripts with shebangs, so this wrapper
+REM invokes Node.js directly.
+REM
+REM Usage:
+REM superpowers-codex.cmd bootstrap
+REM superpowers-codex.cmd use-skill superpowers:brainstorming
+REM superpowers-codex.cmd find-skills
+
+node "%~dp0superpowers-codex" %*
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index ea269f6..9751beb 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -44,6 +44,12 @@ Claude Code 2.1.x changed how hooks execute on Windows: it now auto-detects `.sh
Fix: hooks.json now calls session-start.sh directly. Claude Code 2.1.x handles the bash invocation automatically. Also added .gitattributes to enforce LF line endings for shell scripts (fixes CRLF issues on Windows checkout).
+**Fixed Windows Codex launcher (#243, #285)**
+
+Windows cannot execute extensionless scripts with shebangs, so the `superpowers-codex` script would either open an "Open with" dialog or produce no output in PowerShell.
+
+Fix: Added `.codex/superpowers-codex.cmd` wrapper that invokes Node.js directly. Updated docs with Windows-specific installation and usage instructions.
+
### Improvements
**Instruction priority clarified in using-superpowers**
diff --git a/docs/README.codex.md b/docs/README.codex.md
index e43004f..dbf3de4 100644
--- a/docs/README.codex.md
+++ b/docs/README.codex.md
@@ -19,13 +19,27 @@ Fetch and follow instructions from https://raw.githubusercontent.com/obra/superp
### Installation Steps
-#### 1. Clone Superpowers
+#### macOS / Linux
```bash
mkdir -p ~/.codex/superpowers
git clone https://github.com/obra/superpowers.git ~/.codex/superpowers
```
+#### Windows
+
+**Command Prompt:**
+```cmd
+mkdir "%USERPROFILE%\.codex\superpowers"
+git clone https://github.com/obra/superpowers.git "%USERPROFILE%\.codex\superpowers"
+```
+
+**PowerShell:**
+```powershell
+New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex\superpowers"
+git clone https://github.com/obra/superpowers.git "$env:USERPROFILE\.codex\superpowers"
+```
+
#### 2. Install Bootstrap
The bootstrap file is included in the repository at `.codex/superpowers-bootstrap.md`. Codex will automatically use it from the cloned location.
@@ -34,12 +48,20 @@ The bootstrap file is included in the repository at `.codex/superpowers-bootstra
Tell Codex:
+**macOS / Linux:**
```
Run ~/.codex/superpowers/.codex/superpowers-codex find-skills to show available skills
```
+**Windows:**
+```
+Run ~/.codex/superpowers/.codex/superpowers-codex.cmd find-skills to show available skills
+```
+
You should see a list of available skills with descriptions.
+> **Note:** On Windows, always use the `.cmd` extension when running superpowers-codex commands.
+
## Usage
### Finding Skills
@@ -126,12 +148,26 @@ git pull
2. Check CLI works: `~/.codex/superpowers/.codex/superpowers-codex find-skills`
3. Verify skills have SKILL.md files
-### CLI script not executable
+### CLI script not executable (macOS/Linux)
```bash
chmod +x ~/.codex/superpowers/.codex/superpowers-codex
```
+### Windows: "Open with" dialog or no output
+
+On Windows, you must use the `.cmd` wrapper:
+
+```cmd
+~/.codex/superpowers/.codex/superpowers-codex.cmd find-skills
+```
+
+Or invoke with Node directly:
+
+```cmd
+node "%USERPROFILE%\.codex\superpowers\.codex\superpowers-codex" find-skills
+```
+
### Node.js errors
The CLI script requires Node.js. Verify:
@@ -140,7 +176,7 @@ The CLI script requires Node.js. Verify:
node --version
```
-Should show v14 or higher (v18+ recommended for ES module support).
+Should show v14 or higher (v18+ recommended).
## Getting Help