claude-depester 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ominiverdi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # claude-depester
2
+
3
+ [![npm version](https://img.shields.io/npm/v/claude-depester.svg)](https://www.npmjs.com/package/claude-depester)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Remove silly thinking words from Claude Code.
7
+
8
+ Instead of seeing "Flibbertigibbeting", "Discombobulating", "Clauding", etc., you'll see a clean "Thinking".
9
+
10
+ > **Last updated:** 2026-01-11 | **Tested with:** Claude Code 2.1.4
11
+
12
+ ![Thinking... instead of silly words](img/screenshot1.png)
13
+
14
+ ## The Problem
15
+
16
+ Claude Code displays random silly words while thinking:
17
+
18
+ ```
19
+ Flibbertigibbeting...
20
+ Discombobulating...
21
+ Smooshing...
22
+ Wibbling...
23
+ Clauding...
24
+ ```
25
+
26
+ This tool replaces them with a simple "Thinking".
27
+
28
+ ## Quick Start
29
+
30
+ ```bash
31
+ # Preview changes first (recommended)
32
+ npx claude-depester --dry-run
33
+
34
+ # Patch Claude Code
35
+ npx claude-depester
36
+
37
+ # Auto-patch after updates (recommended)
38
+ npx claude-depester --install-hook
39
+ ```
40
+
41
+ That's it! Restart Claude Code for changes to take effect.
42
+
43
+ ## Features
44
+
45
+ - Works with native binaries (Bun-compiled) and npm installations
46
+ - Auto-detects your Claude Code installation
47
+ - Creates backup before patching (can restore anytime)
48
+ - Optional SessionStart hook for auto-patching after updates
49
+ - Content-based detection survives version updates
50
+
51
+ ## Commands
52
+
53
+ | Command | Description |
54
+ |---------|-------------|
55
+ | `npx claude-depester` | Patch Claude Code |
56
+ | `npx claude-depester --dry-run` | Preview changes (no modifications) |
57
+ | `npx claude-depester --check` | Check patch status |
58
+ | `npx claude-depester --restore` | Restore original from backup |
59
+ | `npx claude-depester --verbose` | Show detailed info |
60
+ | `npx claude-depester --install-hook` | Auto-patch after updates |
61
+ | `npx claude-depester --remove-hook` | Remove auto-patch hook |
62
+ | `npx claude-depester --hook-status` | Check hook status |
63
+ | `npx claude-depester --help` | Show help |
64
+
65
+ ## Supported Installation Methods
66
+
67
+ | Method | Path | Status |
68
+ |--------|------|--------|
69
+ | Native binary | `~/.local/bin/claude` -> `~/.local/share/claude/versions/X.Y.Z` | Fully supported |
70
+ | Local npm | `~/.claude/local/node_modules/@anthropic-ai/claude-code/` | Fully supported |
71
+ | Global npm | `npm root -g`/@anthropic-ai/claude-code/ | Fully supported |
72
+ | Homebrew | `/opt/homebrew/Caskroom/claude-code/` | Fully supported |
73
+
74
+ The tool auto-detects your installation.
75
+
76
+ ## After Claude Code Updates
77
+
78
+ With the hook installed (`--install-hook`), patching happens automatically on startup.
79
+
80
+ Otherwise, just run `npx claude-depester` again after updating.
81
+
82
+ ## Restore Original
83
+
84
+ ```bash
85
+ npx claude-depester --restore
86
+ ```
87
+
88
+ This restores from the backup created during patching.
89
+
90
+ ## How the Hook Works
91
+
92
+ The `--install-hook` command adds a SessionStart hook to `~/.claude/settings.json`:
93
+
94
+ ```json
95
+ {
96
+ "hooks": {
97
+ "SessionStart": [
98
+ {
99
+ "hooks": [
100
+ {
101
+ "type": "command",
102
+ "command": "npx claude-depester --silent"
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ }
109
+ ```
110
+
111
+ Every time Claude Code starts, it checks and re-applies the patch if needed.
112
+
113
+ ## Troubleshooting
114
+
115
+ ### "Could not find Claude Code installation"
116
+
117
+ Make sure Claude Code is installed:
118
+ - Check with `claude --version`
119
+ - Run with `--verbose` to see searched paths
120
+
121
+ ### Patch not working after update
122
+
123
+ The detection uses content-based matching, so it should survive version updates.
124
+ If the patch fails:
125
+ 1. Open an issue with your Claude Code version (`claude --version`)
126
+ 2. Include the output of `npx claude-depester --dry-run --verbose`
127
+
128
+ ### Want to undo everything
129
+
130
+ ```bash
131
+ npx claude-depester --restore # Restore original file
132
+ npx claude-depester --remove-hook # Remove auto-patch hook
133
+ ```
134
+
135
+ ## Technical Details
136
+
137
+ ### How it works
138
+
139
+ 1. **Detection**: Finds the silly words array by unique content markers (e.g., "Flibbertigibbeting", "Discombobulating") rather than variable names (which change every version due to minification)
140
+
141
+ 2. **Extraction**: For native binaries (Bun-compiled), uses [node-lief](https://www.npmjs.com/package/node-lief) to properly extract the embedded JavaScript - the same approach used by [tweakcc](https://github.com/Piebald-AI/tweakcc)
142
+
143
+ 3. **Patching**: Replaces the array `["Accomplishing",...,"Zigzagging"]` with `["Thinking"]`
144
+
145
+ 4. **Repacking**: Rebuilds the binary with the modified JavaScript
146
+
147
+ ### File locations
148
+
149
+ - **Backup**: `<original-file>.depester.backup`
150
+ - **Hook config**: `~/.claude/settings.json`
151
+
152
+ ## Requirements
153
+
154
+ - Node.js >= 18.0.0
155
+ - Claude Code installed
156
+
157
+ ## Contributing
158
+
159
+ If Claude Code updates and the patch stops working:
160
+
161
+ 1. Check if the array still contains marker words like `"Flibbertigibbeting"`
162
+ 2. Update `lib/patcher.js` if the pattern changed
163
+ 3. Submit a PR
164
+
165
+ Issues and PRs welcome!
166
+
167
+ ## Related Projects
168
+
169
+ - [tweakcc](https://github.com/Piebald-AI/tweakcc) - Full Claude Code customization (themes, prompts, and more)
170
+ - [claude-code-thinking-patch](https://github.com/aleks-apostle/claude-code-thinking-patch) - Thinking visibility patch
171
+
172
+ ## Acknowledgments
173
+
174
+ This project builds upon work by:
175
+ - [tweakcc](https://github.com/Piebald-AI/tweakcc) - For the proper Bun binary extraction/repacking approach
176
+ - [vemv's gist](https://gist.github.com/vemv/c6333d53ede16198a23eb95425051b7b) - Original simple patch idea
177
+ - [heromantf's bun extractor](https://gist.github.com/heromantf/7db88edcb7b1c0c35067244584a01afc) - Bun binary structure documentation
178
+
179
+ ## License
180
+
181
+ MIT - see [LICENSE](LICENSE)
182
+
183
+ ---
184
+
185
+ ## Appendix: Full List of Silly Words
186
+
187
+ These are all 184 "thinking words" that Claude Code displays while processing. This tool replaces all of them with "Thinking":
188
+
189
+ > Accomplishing, Actioning, Actualizing, Architecting, Baking, Beaming, Beboppin', Befuddling, Billowing, Blanching, Bloviating, Boogieing, Boondoggling, Booping, Bootstrapping, Brewing, Burrowing, Calculating, Canoodling, Caramelizing, Cascading, Catapulting, Cerebrating, Channeling, Channelling, Choreographing, Churning, Clauding, Coalescing, Cogitating, Combobulating, Composing, Computing, Concocting, Considering, Contemplating, Cooking, Crafting, Creating, Crunching, Crystallizing, Cultivating, Deciphering, Deliberating, Determining, Dilly-dallying, Discombobulating, Doing, Doodling, Drizzling, Ebbing, Effecting, Elucidating, Embellishing, Enchanting, Envisioning, Evaporating, Fermenting, Fiddle-faddling, Finagling, Flambeing, Flibbertigibbeting, Flowing, Flummoxing, Fluttering, Forging, Forming, Frolicking, Frosting, Gallivanting, Galloping, Garnishing, Generating, Germinating, Gitifying, Grooving, Gusting, Harmonizing, Hashing, Hatching, Herding, Honking, Hullaballooing, Hyperspacing, Ideating, Imagining, Improvising, Incubating, Inferring, Infusing, Ionizing, Jitterbugging, Julienning, Kneading, Leavening, Levitating, Lollygagging, Manifesting, Marinating, Meandering, Metamorphosing, Misting, Moonwalking, Moseying, Mulling, Mustering, Musing, Nebulizing, Nesting, Noodling, Nucleating, Orbiting, Orchestrating, Osmosing, Perambulating, Percolating, Perusing, Philosophising, Photosynthesizing, Pollinating, Pondering, Pontificating, Pouncing, Precipitating, Prestidigitating, Processing, Proofing, Propagating, Puttering, Puzzling, Quantumizing, Razzle-dazzling, Razzmatazzing, Recombobulating, Reticulating, Roosting, Ruminating, Sauteing, Scampering, Schlepping, Scurrying, Seasoning, Shenaniganing, Shimmying, Simmering, Skedaddling, Sketching, Slithering, Smooshing, Sock-hopping, Spelunking, Spinning, Sprouting, Stewing, Sublimating, Swirling, Swooping, Symbioting, Synthesizing, Tempering, Thinking, Thundering, Tinkering, Tomfoolering, Topsy-turvying, Transfiguring, Transmuting, Twisting, Undulating, Unfurling, Unravelling, Vibing, Waddling, Wandering, Warping, Whatchamacalliting, Whirlpooling, Whirring, Whisking, Wibbling, Working, Wrangling, Zesting, Zigzagging
190
+
191
+ <sub>**Keywords:** claude code thinking words, claude code spinner, claude code flibbertigibbeting, claude code discombobulating, claude code clauding, claude code smooshing, claude code wibbling, anthropic claude code patch, remove silly words claude, claude code customization</sub>
@@ -0,0 +1,215 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * claude-depester CLI
5
+ * Remove silly thinking words from Claude Code
6
+ */
7
+
8
+ const { findCliJs, getSearchedPaths } = require('../lib/detector');
9
+ const { patch, checkStatus, restoreBackup } = require('../lib/patcher');
10
+ const { installHook, removeHook, getHookStatus } = require('../lib/hooks');
11
+
12
+ const VERSION = require('../package.json').version;
13
+
14
+ // Parse arguments
15
+ const args = process.argv.slice(2);
16
+ const flags = {
17
+ help: args.includes('--help') || args.includes('-h'),
18
+ version: args.includes('--version') || args.includes('-v'),
19
+ check: args.includes('--check') || args.includes('-c'),
20
+ restore: args.includes('--restore') || args.includes('-r'),
21
+ dryRun: args.includes('--dry-run') || args.includes('-n'),
22
+ installHook: args.includes('--install-hook'),
23
+ removeHook: args.includes('--remove-hook'),
24
+ hookStatus: args.includes('--hook-status'),
25
+ silent: args.includes('--silent') || args.includes('-s'),
26
+ verbose: args.includes('--verbose')
27
+ };
28
+
29
+ function log(...msg) {
30
+ if (!flags.silent) {
31
+ console.log(...msg);
32
+ }
33
+ }
34
+
35
+ function error(...msg) {
36
+ console.error(...msg);
37
+ }
38
+
39
+ function showHelp() {
40
+ console.log(`
41
+ claude-depester v${VERSION}
42
+
43
+ Remove silly thinking words from Claude Code (like "Flibbertigibbeting",
44
+ "Discombobulating", etc.) and replace them with "Thinking".
45
+
46
+ USAGE:
47
+ npx claude-depester [options]
48
+
49
+ OPTIONS:
50
+ (no options) Patch Claude Code now
51
+ -c, --check Check if Claude Code is patched
52
+ -r, --restore Restore original file from backup
53
+ -n, --dry-run Preview changes without applying
54
+
55
+ --install-hook Add SessionStart hook (auto-patch after updates)
56
+ --remove-hook Remove SessionStart hook
57
+ --hook-status Check if hook is installed
58
+
59
+ -s, --silent Suppress output (for hook use)
60
+ --verbose Show detailed information
61
+ -v, --version Show version
62
+ -h, --help Show this help
63
+
64
+ EXAMPLES:
65
+ npx claude-depester # Patch now
66
+ npx claude-depester --check # Check status
67
+ npx claude-depester --install-hook # Auto-patch after updates
68
+ npx claude-depester --restore # Undo patch
69
+
70
+ MORE INFO:
71
+ https://github.com/ominiverdi/claude-depester
72
+ `);
73
+ }
74
+
75
+ function showVersion() {
76
+ console.log(`claude-depester v${VERSION}`);
77
+ }
78
+
79
+ function showSearchedPaths() {
80
+ error('\nSearched paths:');
81
+ for (const { method, path } of getSearchedPaths()) {
82
+ error(` [${method}]`);
83
+ error(` ${path}`);
84
+ }
85
+ }
86
+
87
+ async function main() {
88
+ // Handle help/version first
89
+ if (flags.help) {
90
+ showHelp();
91
+ process.exit(0);
92
+ }
93
+
94
+ if (flags.version) {
95
+ showVersion();
96
+ process.exit(0);
97
+ }
98
+
99
+ // Handle hook management (doesn't require finding cli.js)
100
+ if (flags.hookStatus) {
101
+ const status = getHookStatus();
102
+ log(`Hook installed: ${status.installed ? 'yes' : 'no'}`);
103
+ log(`Settings file: ${status.settingsPath}`);
104
+ process.exit(0);
105
+ }
106
+
107
+ if (flags.installHook) {
108
+ const result = installHook();
109
+ log(result.message);
110
+ process.exit(result.success ? 0 : 1);
111
+ }
112
+
113
+ if (flags.removeHook) {
114
+ const result = removeHook();
115
+ log(result.message);
116
+ process.exit(result.success ? 0 : 1);
117
+ }
118
+
119
+ // Find Claude Code installation
120
+ const cliInfo = findCliJs();
121
+
122
+ if (!cliInfo) {
123
+ error('Could not find Claude Code installation.');
124
+ if (flags.verbose) {
125
+ showSearchedPaths();
126
+ } else {
127
+ error('Run with --verbose to see searched paths.');
128
+ }
129
+ error('\nMake sure Claude Code is installed:');
130
+ error(' https://code.claude.com/docs/en/setup');
131
+ process.exit(1);
132
+ }
133
+
134
+ if (flags.verbose) {
135
+ log(`Found Claude Code: ${cliInfo.path}`);
136
+ log(`Detection method: ${cliInfo.method}`);
137
+ }
138
+
139
+ // Handle check
140
+ if (flags.check) {
141
+ const status = checkStatus(cliInfo.path);
142
+
143
+ if (status.error) {
144
+ error(`Error: ${status.error}`);
145
+ process.exit(1);
146
+ }
147
+
148
+ if (status.patched) {
149
+ log('Status: PATCHED');
150
+ log('Silly words have been replaced with "Thinking"');
151
+ } else if (status.hasSillyWords) {
152
+ log('Status: NOT PATCHED');
153
+ log('Silly words are present. Run without --check to patch.');
154
+ } else {
155
+ log('Status: UNKNOWN');
156
+ log('Could not find silly words array. Version may not be supported.');
157
+ }
158
+
159
+ if (status.hasBackup) {
160
+ log('Backup: available (can restore with --restore)');
161
+ }
162
+
163
+ const hookStatus = getHookStatus();
164
+ log(`Auto-patch hook: ${hookStatus.installed ? 'installed' : 'not installed'}`);
165
+
166
+ process.exit(status.patched ? 0 : 1);
167
+ }
168
+
169
+ // Handle restore
170
+ if (flags.restore) {
171
+ const success = restoreBackup(cliInfo.path);
172
+ if (success) {
173
+ log('Restored original file from backup.');
174
+ log('Restart Claude Code for changes to take effect.');
175
+ } else {
176
+ error('No backup found. Cannot restore.');
177
+ process.exit(1);
178
+ }
179
+ process.exit(0);
180
+ }
181
+
182
+ // Default action: patch
183
+ const result = patch(cliInfo.path, { dryRun: flags.dryRun });
184
+
185
+ if (result.success) {
186
+ if (result.alreadyPatched) {
187
+ log('Already patched. Nothing to do.');
188
+ } else if (result.dryRun) {
189
+ log('DRY RUN - no changes made:');
190
+ log(result.message);
191
+ } else {
192
+ log('Patched successfully!');
193
+ log('Silly words replaced with "Thinking".');
194
+ log('Restart Claude Code for changes to take effect.');
195
+
196
+ // Suggest installing hook
197
+ const hookStatus = getHookStatus();
198
+ if (!hookStatus.installed) {
199
+ log('\nTip: Run with --install-hook to auto-patch after updates.');
200
+ }
201
+ }
202
+ process.exit(0);
203
+ } else {
204
+ error(`Failed: ${result.message}`);
205
+ if (flags.verbose) {
206
+ showSearchedPaths();
207
+ }
208
+ process.exit(1);
209
+ }
210
+ }
211
+
212
+ main().catch(err => {
213
+ error(`Unexpected error: ${err.message}`);
214
+ process.exit(1);
215
+ });