@rse/claudex 0.9.15 → 0.9.17

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
@@ -2,11 +2,27 @@
2
2
  ChangeLog
3
3
  =========
4
4
 
5
+ 0.9.17 (2026-05-09)
6
+ -------------------
7
+
8
+ - BUGFIX: fix tool finding under Windows
9
+
10
+ 0.9.16 (2026-05-09)
11
+ -------------------
12
+
13
+ - CLEANUP: cleanup descriptions
14
+
5
15
  0.9.15 (2026-05-09)
6
16
  -------------------
7
17
 
8
- - CLEANUP: recolor lazygit only under global option -R, too
18
+ - FEATURE: add `-A`/`--ase` global option to make ASE features conditional
19
+ - FEATURE: add `CHANGELOG.md` file
9
20
  - IMPROVEMENT: apply ANSI recoloring to `lazygit` only when global `-R` option is given
21
+ - IMPROVEMENT: apply tmux-specific settings only under option `-T`
22
+ - IMPROVEMENT: take over more useful settings from dotfiles
23
+ - IMPROVEMENT: improve portability across platforms
24
+ - UPDATE: switch license to GPL
25
+ - CLEANUP: various code cleanups
10
26
 
11
27
  0.9.14 (2026-05-09)
12
28
  -------------------
package/README.md CHANGED
@@ -64,23 +64,33 @@ Installation
64
64
  ------------
65
65
 
66
66
  ```sh
67
+ # initially
67
68
  $ npm install -h @rse/claudex
68
- $ claudex install
69
+ $ claudex [-C/--capsula] install
70
+
71
+ # regularly
72
+ $ claudex [-C/--capsula] update
69
73
  ```
70
74
 
71
75
  Usage
72
76
  -----
73
77
 
74
78
  ```sh
75
- $ claudex -T # tmux session (formerly: claudex session)
76
- $ claudex # plain claude (formerly: claudex naked)
77
- $ claudex -R # claude wrapped with ansi-recolor
78
- $ claudex -C -T # tmux session inside a Capsula sandbox
79
+ $ claudex
80
+ [-C|--capsula] # execute Claude Code inside a Capsula sandbox container")
81
+ [-T|--tmux [session]] # wrap Claude Code in a Tmux terminal multiplexing session (optional session name)")
82
+ [-R|--recolor] # wrap Claude Code with ANSI recoloing for improved theming")
83
+ [-A|--ase] # enable ASE-specific Claude Code statusline and ASE_* environment variables")
84
+ [...options...] # arbitrary Claude Code options
79
85
  ```
80
86
 
81
87
  See Also
82
88
  --------
83
89
 
90
+ - [Claude Code](https://code.claude.com)
91
+ - [Capsula](https://github.com/rse/capsula)
92
+ - [Tmux](https://github.com/tmux/tmux)
93
+ - [ANSI Recolor](https://github.com/rse/ansi-recolor)
84
94
  - [Agentic Software Engineering (ASE)](https://github.com/rse/ase)
85
95
 
86
96
  License
package/claudex.js CHANGED
@@ -39,9 +39,30 @@ const fatal = (msg) => {
39
39
  process.stderr.write(`${chalk.red("claudex: ")}${chalk.red.bold("ERROR:")}${chalk.red(` ${msg}`)}\n`);
40
40
  process.exit(1);
41
41
  };
42
+ /* helper to locate a tool in $PATH (cross-platform).
43
+ On Windows, `which.sync` can fail to find App Execution Aliases
44
+ (zero-byte reparse-point stubs under %LOCALAPPDATA%\Microsoft\WindowsApps,
45
+ e.g. winget.exe, python.exe), because the `stat()` check inside the
46
+ `which` package may not classify them as regular files. As a fallback
47
+ we therefore also consult the native `where` command on Windows. */
48
+ const findTool = (tool) => {
49
+ const r = which.sync(tool, { nothrow: true });
50
+ if (r !== null)
51
+ return r;
52
+ if (process.platform === "win32") {
53
+ const r2 = execaSync("where", [tool], { reject: false, windowsHide: true });
54
+ if ((r2.exitCode ?? 1) === 0) {
55
+ const line = (r2.stdout ?? "").toString().split(/\r?\n/)[0].trim();
56
+ if (line !== "")
57
+ return line;
58
+ }
59
+ }
60
+ return null;
61
+ };
42
62
  /* helper for detecting the platform and package manager combination */
43
63
  const detectPlatform = () => {
44
- const has = (tool) => which.sync(tool, { nothrow: true }) !== null;
64
+ /* helper function for finding a tool in PATH */
65
+ const has = (tool) => findTool(tool) !== null;
45
66
  /* honor explicit override via CLAUDEX_PKG (e.g. "brew", "ports", "apt", ...)
46
67
  to disambiguate hosts where multiple package managers are installed */
47
68
  const override = process.env.CLAUDEX_PKG ?? "";
@@ -111,7 +132,7 @@ const executeCommand = (config) => {
111
132
  const ensureTool = (tool, options = {}) => {
112
133
  const tools = typeof tool === "string" ? [tool] : tool;
113
134
  for (const tool of tools) {
114
- let r = which.sync(tool, { nothrow: true });
135
+ let r = findTool(tool);
115
136
  if (r === null && options.install) {
116
137
  const rc = executeCommand(options.install);
117
138
  if (rc !== 0) {
@@ -120,7 +141,7 @@ const ensureTool = (tool, options = {}) => {
120
141
  fatal(`failed to install required tool "${tool}" (exit ${rc})` +
121
142
  (options.hint !== undefined ? ` -- hint: ${options.hint}` : ""));
122
143
  }
123
- r = which.sync(tool, { nothrow: true });
144
+ r = findTool(tool);
124
145
  }
125
146
  if (r !== null)
126
147
  continue;
@@ -828,10 +849,10 @@ const actionHelp = () => {
828
849
  /* append our claudeX extension information */
829
850
  process.stdout.write("\n" +
830
851
  "claudeX extension options (honored before claude):\n" +
831
- " -A, --ase enable ASE-specific Claude Code statusline and ASE_* environment variables\n" +
832
852
  " -C, --capsula execute Claude Code inside a Capsula sandbox container\n" +
833
- " -R, --recolor wrap Claude Code with ANSI recoloring for improved theming\n" +
834
853
  " -T, --tmux [session] wrap Claude Code in a Tmux terminal multiplexing session (optional session name)\n" +
854
+ " -R, --recolor wrap Claude Code with ANSI recoloring for improved theming\n" +
855
+ " -A, --ase enable ASE-specific Claude Code statusline and ASE_* environment variables\n" +
835
856
  "\n" +
836
857
  "claudeX extension subcommands (honored before claude):\n" +
837
858
  " install install host-side or in-container dependencies\n" +
@@ -860,10 +881,10 @@ const main = async () => {
860
881
  .passThroughOptions()
861
882
  .allowUnknownOption()
862
883
  .helpOption(false)
863
- .option("-A, --ase", "enable ASE-specific Claude Code statusline and ASE_* environment variables")
864
884
  .option("-C, --capsula", "execute Claude Code inside a Capsula sandbox container")
865
- .option("-R, --recolor", "wrap Claude Code with ANSI recoloing for improved theming")
866
885
  .option("-T, --tmux [session]", "wrap Claude Code in a Tmux terminal multiplexing session (optional session name)")
886
+ .option("-R, --recolor", "wrap Claude Code with ANSI recoloing for improved theming")
887
+ .option("-A, --ase", "enable ASE-specific Claude Code statusline and ASE_* environment variables")
867
888
  .argument("[args...]", "arguments passed unparsed to Claude Code")
868
889
  .action((args, opts) => {
869
890
  actionDefault(opts, args);
package/claudex.ts CHANGED
@@ -48,9 +48,33 @@ const fatal = (msg: string): never => {
48
48
  process.exit(1)
49
49
  }
50
50
 
51
+ /* helper to locate a tool in $PATH (cross-platform).
52
+ On Windows, `which.sync` can fail to find App Execution Aliases
53
+ (zero-byte reparse-point stubs under %LOCALAPPDATA%\Microsoft\WindowsApps,
54
+ e.g. winget.exe, python.exe), because the `stat()` check inside the
55
+ `which` package may not classify them as regular files. As a fallback
56
+ we therefore also consult the native `where` command on Windows. */
57
+ const findTool = (tool: string): string | null => {
58
+ const r = which.sync(tool, { nothrow: true })
59
+ if (r !== null)
60
+ return r
61
+ if (process.platform === "win32") {
62
+ const r2 = execaSync("where", [ tool ], { reject: false, windowsHide: true })
63
+ if ((r2.exitCode ?? 1) === 0) {
64
+ const line = (r2.stdout ?? "").toString().split(/\r?\n/)[0].trim()
65
+ if (line !== "")
66
+ return line
67
+ }
68
+ }
69
+ return null
70
+ }
71
+
51
72
  /* helper for detecting the platform and package manager combination */
52
73
  const detectPlatform = (): string => {
53
- const has = (tool: string): boolean => which.sync(tool, { nothrow: true }) !== null
74
+ /* helper function for finding a tool in PATH */
75
+ const has = (tool: string): boolean =>
76
+ findTool(tool) !== null
77
+
54
78
  /* honor explicit override via CLAUDEX_PKG (e.g. "brew", "ports", "apt", ...)
55
79
  to disambiguate hosts where multiple package managers are installed */
56
80
  const override = process.env.CLAUDEX_PKG ?? ""
@@ -127,7 +151,7 @@ const ensureTool = (tool: string | string[], options: {
127
151
  } = {}): void => {
128
152
  const tools = typeof tool === "string" ? [ tool ] : tool
129
153
  for (const tool of tools) {
130
- let r = which.sync(tool, { nothrow: true })
154
+ let r = findTool(tool)
131
155
  if (r === null && options.install) {
132
156
  const rc = executeCommand(options.install)
133
157
  if (rc !== 0) {
@@ -136,7 +160,7 @@ const ensureTool = (tool: string | string[], options: {
136
160
  fatal(`failed to install required tool "${tool}" (exit ${rc})` +
137
161
  (options.hint !== undefined ? ` -- hint: ${options.hint}` : ""))
138
162
  }
139
- r = which.sync(tool, { nothrow: true })
163
+ r = findTool(tool)
140
164
  }
141
165
  if (r !== null)
142
166
  continue
@@ -919,10 +943,10 @@ const actionHelp = (): never => {
919
943
  process.stdout.write(
920
944
  "\n" +
921
945
  "claudeX extension options (honored before claude):\n" +
922
- " -A, --ase enable ASE-specific Claude Code statusline and ASE_* environment variables\n" +
923
946
  " -C, --capsula execute Claude Code inside a Capsula sandbox container\n" +
924
- " -R, --recolor wrap Claude Code with ANSI recoloring for improved theming\n" +
925
947
  " -T, --tmux [session] wrap Claude Code in a Tmux terminal multiplexing session (optional session name)\n" +
948
+ " -R, --recolor wrap Claude Code with ANSI recoloring for improved theming\n" +
949
+ " -A, --ase enable ASE-specific Claude Code statusline and ASE_* environment variables\n" +
926
950
  "\n" +
927
951
  "claudeX extension subcommands (honored before claude):\n" +
928
952
  " install install host-side or in-container dependencies\n" +
@@ -954,10 +978,10 @@ const main = async (): Promise<void> => {
954
978
  .passThroughOptions()
955
979
  .allowUnknownOption()
956
980
  .helpOption(false)
957
- .option("-A, --ase", "enable ASE-specific Claude Code statusline and ASE_* environment variables")
958
981
  .option("-C, --capsula", "execute Claude Code inside a Capsula sandbox container")
959
- .option("-R, --recolor", "wrap Claude Code with ANSI recoloing for improved theming")
960
982
  .option("-T, --tmux [session]", "wrap Claude Code in a Tmux terminal multiplexing session (optional session name)")
983
+ .option("-R, --recolor", "wrap Claude Code with ANSI recoloing for improved theming")
984
+ .option("-A, --ase", "enable ASE-specific Claude Code statusline and ASE_* environment variables")
961
985
  .argument("[args...]", "arguments passed unparsed to Claude Code")
962
986
  .action((args: string[], opts: TopOpts) => {
963
987
  actionDefault(opts, args)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rse/claudex",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "0.9.15",
4
+ "version": "0.9.17",
5
5
  "description": "Claude Code eXtended",
6
6
  "type": "module",
7
7
  "keywords": [ "claude", "code", "extension", "wrapper" ],