@rse/claudex 0.9.13

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 ADDED
@@ -0,0 +1,106 @@
1
+
2
+ claudeX — Claude Code eXtended
3
+ ====================================
4
+
5
+ This is *Dr. Ralf S. Engelschall* (RSE)'s opinionated [Claude Code](https://code.claude.com)
6
+ environment for macOS and Linux. It mainly provides a thin `claudex` (claude eXtended)
7
+ wrapper command which provides the following distinct features on top of the regular
8
+ Claude Code command:
9
+
10
+ - **Encapsulated Runtime**: It uses the companion tool
11
+ [capsula](https://github.com/rse/capsula), also from RSE, for
12
+ executing `claude` inside a cleverly established Docker container,
13
+ which mimicks the host environment (filesystem layout, user/group
14
+ name/id, etc) as close as possible.
15
+
16
+ *Rationale*: Prevents any programs `claude` spawns from
17
+ damaging more than the current working directory.
18
+
19
+ - **Adjusted Theme**: It uses the companion tool [ansi-recolor](https://github.com/rse/ansi-recolor),
20
+ also from RSE, to on-the-fly re-color Claude Code's terminal UI
21
+ (configured to run in regular light theme) into the RSE brown/blue
22
+ color theme, without having to patch Claude Code (with tools like
23
+ TweakCC, which regularly have to be updated to not fail on this task).
24
+
25
+ *Rationale*: RSE is obsessed from "distraction free coding", which,
26
+ for him, implies that everthing has to use his unobtrusive brown/blue
27
+ color theme.
28
+
29
+ - **Terminal Multiplexing**: It uses the companion tool [tmux](https://github.com/tmux/tmux)
30
+ to run Claude Code and its companion tools in an opinionated virtual
31
+ terminal environment, with multiple screens and multiple panes on each
32
+ screen.
33
+
34
+ *Rationale*: Allow one to easily run multiple Claude Code sessions in
35
+ parallel with full terminal interaction.
36
+
37
+ - **Companion Tools**: It allows you to execute (visually in a modal window on top
38
+ of Claude Code with the help of tmux popups) the companion tools
39
+ [LazyGit](https://github.com/jesseduffield/lazygit) (for Git version
40
+ control) and [Bash](https://www.gnu.org/software/bash/)
41
+ (for Shell).
42
+
43
+ *Rationale*: The most important companion tool is LazyGit, allowing
44
+ the easily partial backout of changes Claude Code made to source code.
45
+
46
+ Impressions
47
+ -----------
48
+
49
+ The following is a main view of the macOS Terminal with a **claudeX**
50
+ session running. Three Claude Code instances are running in separate
51
+ panes of the screen.
52
+
53
+ ![screenshot](screenshot-1.png)
54
+
55
+ This is with LazyGit opened in a modal window:
56
+
57
+ ![screenshot](screenshot-2.png)
58
+
59
+ This is with Bash opened in a modal window:
60
+
61
+ ![screenshot](screenshot-3.png)
62
+
63
+ Installation
64
+ ------------
65
+
66
+ ```sh
67
+ $ npm install -h @rse/claudex
68
+ $ claudex install
69
+ ```
70
+
71
+ Usage
72
+ -----
73
+
74
+ ```sh
75
+ $ claudex session
76
+ ```
77
+
78
+ See Also
79
+ --------
80
+
81
+ - [Agentic Software Engineering (ASE)](https://github.com/rse/ase)
82
+
83
+ License
84
+ -------
85
+
86
+ Copyright © 2025-2026 Dr. Ralf S. Engelschall (http://engelschall.com/)
87
+
88
+ Permission is hereby granted, free of charge, to any person obtaining
89
+ a copy of this software and associated documentation files (the
90
+ "Software"), to deal in the Software without restriction, including
91
+ without limitation the rights to use, copy, modify, merge, publish,
92
+ distribute, sublicense, and/or sell copies of the Software, and to
93
+ permit persons to whom the Software is furnished to do so, subject to
94
+ the following conditions:
95
+
96
+ The above copyright notice and this permission notice shall be included
97
+ in all copies or substantial portions of the Software.
98
+
99
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
100
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
101
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
102
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
103
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
104
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
105
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
106
+
@@ -0,0 +1,133 @@
1
+ ##
2
+ ## ansi-recolor.conf
3
+ ##
4
+
5
+ # ==== simplified RSE color theme ====
6
+
7
+ rse-white = 15
8
+
9
+ rse-grey-4 = 254
10
+ rse-grey-3 = 250
11
+ rse-grey-2 = 246
12
+ rse-grey-1 = 242
13
+
14
+ rse-brown-4 = 223
15
+ rse-brown-3 = 180
16
+ rse-brown-2 = 137
17
+ rse-brown-1 = 94
18
+
19
+ rse-blue-4 = 153
20
+ rse-blue-3 = 110
21
+ rse-blue-2 = 67
22
+ rse-blue-1 = 25
23
+
24
+ # ==== default color mapping ====
25
+
26
+ default:
27
+
28
+ # ==== Claude Code color mapping ====
29
+
30
+ claude:
31
+
32
+ 244/* -> rse-grey-2/*
33
+ 246/* -> rse-grey-2/*
34
+ 236/* -> rse-grey-1/*
35
+ 239/* -> rse-grey-1/*
36
+ 16/* -> default/*
37
+
38
+ 174/* -> red/*
39
+ 180/* -> red/*
40
+ 125/* -> red/*
41
+ 129/* -> red/*
42
+ 131/* -> red/*
43
+ 160/* -> red/*
44
+ 167/* -> red/*
45
+ 137/* -> red/*
46
+ 93/* -> red/*
47
+ 209/* -> red/*
48
+ 210/* -> red/*
49
+ 215/* -> red/*
50
+ 216/* -> red/*
51
+ 222/* -> red/*
52
+ 220/* -> red/*
53
+ 198/* -> red/*
54
+
55
+ 74/* -> blue/*
56
+ 21/* -> blue/*
57
+ 151/* -> blue/*
58
+ 146/* -> blue/*
59
+ 231/* -> blue/*
60
+ 153/* -> blue/*
61
+ 114/* -> blue/*
62
+ 29/* -> blue/*
63
+ 37/* -> blue/*
64
+ 147/* -> blue/*
65
+ 73/* -> blue/*
66
+ 24/* -> blue/*
67
+ 30/* -> blue/*
68
+ 31/* -> blue/*
69
+ 105/* -> blue/*
70
+ 97/* -> blue/*
71
+ 63/* -> blue/*
72
+ 23/* -> blue/*
73
+ 65/* -> blue/*
74
+
75
+ */37 -> rse-white/rse-blue-1
76
+ */63 -> rse-white/rse-blue-1
77
+ */153 -> rse-white/rse-blue-1
78
+ */172 -> rse-white/rse-brown-2
79
+
80
+ 173/173 -> rse-brown-2/rse-brown-2
81
+ 173/* -> rse-brown-2/*
82
+ 174/174 -> rse-brown-2/rse-brown-2
83
+ */173 -> */rse-brown-2
84
+ */174 -> */rse-brown-2
85
+ 231/174 -> rse-white/rse-brown-2
86
+
87
+ default/255 -> rse-white/rse-blue-1
88
+ 16/255 -> rse-white/rse-blue-1
89
+ 248/255 -> rse-blue-4/rse-blue-1
90
+ 145/255 -> rse-blue-4/rse-blue-1
91
+
92
+ */157 -> rse-white/rse-blue-1
93
+ */194 -> blue/rse-blue-4
94
+ 29/194 -> blue/rse-blue-4
95
+
96
+ */224 -> red/rse-grey-4
97
+ 236/224 -> red/rse-grey-4
98
+ 239/224 -> red/rse-grey-4
99
+ 29/224 -> red/rse-grey-4
100
+ 160/224 -> red/rse-grey-4
101
+
102
+ */194- -> */253
103
+ */157- -> */252
104
+ */224- -> */254
105
+ *-/* -> 245/*
106
+ 16/217 -> red/254
107
+ */217 -> */254
108
+ 16/78 -> blue/rse-blue-4
109
+
110
+ 199/* -> red/*
111
+ */231 -> rse-white/rse-brown-1
112
+ 199/231 -> rse-brown-4/rse-brown-1
113
+
114
+ */105 -> rse-white/rse-blue-1
115
+ */178 -> rse-white/rse-brown-1
116
+ */60 -> */rse-blue-4
117
+
118
+ */31 -> rse-white/rse-blue-1
119
+
120
+ magenta/* -> red/*
121
+ yellow/* -> red/*
122
+ cyan/* -> blue/*
123
+ green/* -> blue/*
124
+
125
+ # ==== LazyGit color mapping ====
126
+
127
+ lazygit:
128
+
129
+ magenta/* -> red/*
130
+ yellow/* -> red/*
131
+ cyan/* -> blue/*
132
+ green/* -> blue/*
133
+
package/claude ADDED
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+ if [ ".$CLAUDEX" != . ]; then
3
+ PATH="$CLAUDEX:$PATH"
4
+ fi
5
+ sandbox=""
6
+ if [ $# -ge 1 ] && [ ".$1" = ".-s" ]; then
7
+ shift
8
+ sandbox="-s"
9
+ fi
10
+ if [ ".$1" = .session ]; then
11
+ shift
12
+ exec claudex $sandbox session ${1+"$@"}
13
+ else
14
+ exec claudex $sandbox naked ${1+"$@"}
15
+ fi
@@ -0,0 +1,19 @@
1
+ {
2
+ "env": {
3
+ "DISABLE_TELEMETRY": "1",
4
+ "DISABLE_AUTOUPDATER": "1",
5
+ "DISABLE_BUG_COMMAND": "1",
6
+ "DISABLE_ERROR_REPORTING": "1",
7
+ "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
8
+ },
9
+ "statusLine": {
10
+ "type": "command",
11
+ "command": "ase statusline -w 0 -m 2 '<blue>%u</blue> <red>%p</red> <black>%T</black> %s' '%m %e %t' '%P %c'",
12
+ "padding": 0
13
+ },
14
+ "verbose": false,
15
+ "teammateMode": "tmux",
16
+ "preferences": {
17
+ "tmuxSplitPanes": true
18
+ }
19
+ }
package/claudex ADDED
@@ -0,0 +1,23 @@
1
+ #!/bin/sh
2
+ ##
3
+ ## claudeX -- Claude Code eXtended
4
+ ## Copyright (c) 2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
5
+ ## Licensed under MIT <https://spdx.org/licenses/MIT>
6
+ ##
7
+ ## Thin POSIX-sh launcher: resolve our own path (handling symlinks),
8
+ ## then exec the compiled Node.js program (claudex.js) next to it.
9
+ ##
10
+
11
+ # resolve our own path through any symlinks (e.g. ~/bin/claudex)
12
+ self="$0"
13
+ while [ -L "$self" ]; do
14
+ target=$(readlink "$self")
15
+ case "$target" in
16
+ /* ) self="$target" ;;
17
+ * ) self="$(dirname "$self")/$target" ;;
18
+ esac
19
+ done
20
+ basedir=$(cd "$(dirname "$self")" && pwd)
21
+
22
+ exec node "$basedir/claudex.js" "$@"
23
+