tweakcc 2.0.3 → 3.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.
Files changed (3) hide show
  1. package/README.md +101 -27
  2. package/dist/index.js +300 -63
  3. package/package.json +5 -4
package/README.md CHANGED
@@ -1,12 +1,15 @@
1
- # 🎨 tweakcc
1
+ # tweakcc
2
2
 
3
- [![tweakcc on npm](https://img.shields.io/npm/v/tweakcc?color=yellow")](https://www.npmjs.com/package/tweakcc)
3
+ [![tweakcc on npm](https://img.shields.io/npm/v/tweakcc?color)](https://www.npmjs.com/package/tweakcc)
4
4
  [![Mentioned in Awesome Claude Code](https://awesome.re/mentioned-badge.svg)](https://github.com/hesreallyhim/awesome-claude-code)
5
5
  [![ClaudeLog - A comprehensive knowledge base for Claude.](https://claudelog.com/img/claude_log_badge.svg)](https://claudelog.com/)
6
6
 
7
- `tweakcc` is a lightweight, interactive CLI tool that lets you personalize your Claude Code experience.
7
+ tweakcc is a CLI tool that upgrades your Claude Code experience. Customize its system prompts, add custom themes, create toolsets, and personalize the UI.
8
8
 
9
9
  > [!important]
10
+ > **NEW in 3.0.0:** tweakcc now supports Claude Code native installations! It also adds a new feature to CC called **toolsets**—try them out in Claude Code with the `/toolsets` command after you create them in tweakcc. Lastly it makes Claude Code's native LSP server support work.
11
+
12
+ > [!tip]
10
13
  > **NEW in 2.0.0:** tweakcc can now customize all of Claude Code's system prompts!
11
14
 
12
15
  <!--
@@ -19,23 +22,24 @@
19
22
  With tweakcc, you can
20
23
 
21
24
  - Customize all of Claude Code's **system prompts**
25
+ - Create custom **toolsets** that can be used in Claude Code with the new **`/toolset`** command
22
26
  - Create **custom themes** with a graphical HSL/RGB color picker
23
27
  - Add custom **thinking verbs** that will show while Claude's working
24
28
  - Create custom **thinking spinner animations** with different speeds and phases
25
- - Change the "CLAUDE CODE" banner text to your own text with your own [figlet](http://www.figlet.org/) fonts
26
29
  - Style the **user messages in the chat history** beyond the default plain gray text
27
30
  - Remove the **ASCII border** from the input box
31
+ - Expand **thinking blocks** by default, so that you don't need to use the transcript (<kbd>Ctrl+O</kbd>) to see them
28
32
 
29
33
  tweakcc also
30
34
  - Fixes a bug where the **spinner animation** is frozen if you have the `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` environment variable set ([#46](https://github.com/Piebald-AI/tweakcc/issues/46))
31
35
  - Allows you to **change the context limit** (default: 200k tokens) used with models from custom Anthropic-compatible APIs with a new environment variable, `CLAUDE_CODE_CONTEXT_LIMIT`
36
+ - Adds a message to Claude Code's startup banner indicating that you're running the patched version of CC (configurable)
32
37
 
33
38
  Additionally, we're working on features that will allow you to
34
39
  - Pick from over **70+ spinning/thinking animations** from [`cli-spinners`](https://github.com/sindresorhus/cli-spinners)
35
40
  - Apply **custom styling** to the markdown elements in Claude's responses like code, bold, headers, etc
36
- - Customize the **shimmering effect** on the thinking verb: disable it; change its speed, width, and colors
37
41
 
38
- tweakcc supports Claude Code installed on **Windows, macOS, and Linux**, using npm, yarn, pnpm, bun, Homebrew, nvm, fnm, n, volta, nvs, and nodenv, or a custom location. (Note: it does **not** support native installations yet; see [#29](https://github.com/Piebald-AI/tweakcc/issues/29).)
42
+ tweakcc supports Claude Code installed on **Windows, macOS, and Linux**, both **native/binary installations** and those installed via npm, yarn, pnpm, bun, Homebrew/Linuxbrew, nvm, fnm, n, volta, nvs, and nodenv, as well as custom locations.
39
43
 
40
44
  Run without installation:
41
45
 
@@ -48,19 +52,18 @@ $ pnpm dlx tweakcc
48
52
 
49
53
  ## How it works
50
54
 
51
- `tweakcc` works by patching the Claude Code's minified `cli.js` file. When you update your Claude Code installation, your customizations will be overwritten, but they're remembered in your configuration file, so they can be reapplied by just re-running the tool.
55
+ tweakcc works by patching Claude Code's minified `cli.js` file. For npm-based installations this file is modified directly, but for native installation it's extracted from the binary, patched, and then the binary is repacked. When you update your Claude Code installation, your customizations will be overwritten, but they're remembered in your configuration file, so they can be reapplied by just running `npx tweakcc --apply`.
56
+
57
+ tweakcc is verified to work with Claude Code **2.0.36**.
52
58
 
53
59
  ### Configuration directory
54
60
 
55
- `tweakcc` stores its configuration files in one of the following locations, in order of priority:
61
+ tweakcc stores its configuration files in one of the following locations, in order of priority:
56
62
 
57
63
  1. **`~/.tweakcc/`** - If this directory already exists, it will always be used for backward compatibility; or if `XDG_CONFIG_HOME` is not set
58
64
  2. **`$XDG_CONFIG_HOME/tweakcc`** - If `~/.tweakcc/` doesn't exist and `$XDG_CONFIG_HOME` is set
59
65
 
60
-
61
- `tweakcc` is verified to work with Claude Code **2.0.31.**
62
-
63
- ## Running
66
+ ## Building from source
64
67
 
65
68
  You can use tweakcc by running `npx tweakcc`, or `npm install -g tweakcc` and then `tweakcc`. Or build and run it locally:
66
69
 
@@ -74,46 +77,117 @@ node dist/index.js
74
77
 
75
78
  ## Related projects
76
79
 
80
+ Other tools for customizing Claude Code:
81
+
77
82
  - [**ccstatusline**](https://github.com/sirmalloc/ccstatusline) - Highly customizable status line formatter for Claude Code CLI that displays model info, git branch, token usage, and other metrics in your terminal.
78
83
  - [**claude-powerline**](https://github.com/Owloops/claude-powerline) - Vim-style powerline statusline for Claude Code with real-time usage tracking, git integration, and custom themes.
79
84
  - [**CCometixLine**](https://github.com/Haleclipse/CCometixLine) - A high-performance Claude Code statusline tool written in Rust with Git integration, usage tracking, interactive TUI configuration, and Claude Code enhancement utilities.
80
- - [**cc-statuslines**](https://github.com/chongdashu/cc-statusline) - Transform your Claude Code experience with a beautiful, informative statusline. One command. Three questions. Custom statusline.
81
85
 
82
- ## Troubleshooting
86
+ Forks:
87
+
88
+ - [**tweakgc-cli**](https://github.com/DanielNappa/tweakgc-cli) - CLI tool to extend the GitHub Copilot CLI to accept more selectable models.
89
+
90
+
91
+ ## System prompts
92
+
93
+ tweakcc allows you to customize the various parts of Claude Code's system prompt, including
94
+ - the main system prompt and any conditional bits,
95
+ - descriptions for all 17 builtin tools like `Bash`, `TodoWrite`, `Read`, etc.,
96
+ - prompts for builtin Task/Plan/Explore subagents, and
97
+ - prompts for utilities such as conversation compaction, WebFetch summarization, Bash command analysis, CLAUDE.md/output style/statusline creation, and many more.
98
+
99
+ Because the system prompt is **dynamically composed** based on several factors, **it's not one string** that can be simply modified in a text editor. It's a bunch of smaller strings sprinkled throughout Claude Code's source code.
100
+
101
+ tweakcc's method for modifying involves maintaining one markdown file for each individual portion of the prompt, resulting in a file for each tool description, each agent/utility prompt, and one for the main system prompt and a few more for various large notes inserted into other prompt parts.
102
+
103
+ #### How the prompt files are created
104
+
105
+ When tweakcc starts up, it downloads a list of system prompt parts for your Claude Code installation from GitHub (the [`data/prompts`](https://github.com/Piebald-AI/tweakcc/tree/main/data/prompts) folder in the tweakcc repo). It then checks if each prompt part has a corresponding markdown file on disk, creating ones that don't exist and populating them with the default text for the version.
106
+
107
+ Simply edit the markdown files in `~/.tweakcc/system-prompts` (or `$XDG_CONFIG_HOME/tweakcc/system-prompts`) and then run `npx tweakcc --apply`.
108
+
109
+ #### What happens when Anthropic changes the prompts?
110
+
111
+ When your Claude Code installation is updated, tweakcc will automatically update all of your markdown files that correspond to parts of the system prompt that were changed in the new version, unless you've modified any of them. But if you _did_ modify ones that Anthropic has also modified, then tweakcc will leave the ones you modified unchanged, and rely on you to resolve the conflict.
112
+
113
+ To assist you with resolving the conflicts, tweakcc will generate an HTML file that shows on the left, the diff of the change you've made, and on the right, the diff of Anthropic's changes. That way you can recall at a glance what you've changed in the prompt, and easily see what's changed in the new prompt. Then you can modify the markdown file for the prompt, incorporate or ignore new changes as you see fit.
114
+
115
+ > [!tip]
116
+ > Make sure to update the `ccVersion` field at the top of the file when you're done resolving the conflicts. If you don't, tweakcc won't know that you've resolved the conflicts and will continue to report conflicts and generate the HTML diff file. **Important:** Also note that the version you update `ccVersion` to is **not** necessarily the new version of CC that you installed; rather, it's the most recent version this particular system prompt was updated in. Different prompt files have different most-recently-modified versions.
83
117
 
84
- tweakcc stores a backup of your Claude Code `cli.js` file for when you want to revert your customimzations, and also to reapply patches. Before it applies your customizations, it restores the original `cli.js` so that it can start from a clean slate. Sometimes things can get confused and your `cli.js` can be corrupted. In particular, you may run into a situation where you have a modified `cli.js`, and then tweakcc takes makes a backup of that modified `cli.js`. If you then try to reinstall Claude Code and apply your customizations, tweakcc will restore its backup of the old _modified_ `cli.js`.
118
+ Screenshot of the HTML file:
85
119
 
86
- To break out of this loop you can install a different version of Claude Code, which will cause tweakcc to make a new backup of the new `cli.js` file. Or you can simply delete tweakcc's backup file (located at `~/.tweakcc/cli.backup.js` or `$XDG_CONFIG_HOME/tweakcc/cli.backup.js`). If you do delete `cli.backup.js`, make sure you reinstall Claude Code before you run tweakcc again, or else if `cli.js` is the modified version it, will again get into the loop described above.
120
+ <img width="2525" height="1310" alt="tweakcc_html_diff" src="https://github.com/user-attachments/assets/52b02f2c-7846-4313-90bf-9ff97dae47f7" />
87
121
 
88
- ### System prompts
122
+ #### Git for version control over your customized prompts
89
123
 
90
- tweakcc tracks changes to your system prompt markdown files in its config directory (see [Configuration directory](#configuration-directory) above). It stores tracking data in `systemPromptAppliedHashes.json` and caches the hashes of the original system prompt text in `systemPromptOriginalHashes.json`. If you'd like to reset your system prompt markdown files to their original values, you can delete those JSON files and the `system-prompts` directory in your config directory. Running `npx tweakcc` will then generate new markdown files.
124
+ This is a great idea, and we recommend it; in fact, we have one ourselves [here.](https://github.com/bl-ue/tweakcc-system-prompts) It allows you to keep your modified prompt safe in GitHub or elsewhere, and you can also switch from one set of prompts to another via branches, for example. In the future we plan to integrate git repo management for the system prompt markdown files into tweakcc. For now you'll need to manually initialize a git repository in `~/.tweakcc` directory. tweakcc automatically generates a recommended `.gitignore` file in that directory (which you can modify if you'd like).
125
+
126
+ ## Troubleshooting
127
+
128
+ tweakcc stores a backup of your Claude Code `cli.js`/binary for when you want to revert your customizations and for reapplying patches. Before it applies your customizations, it restores the original `cli.js`/binary so that it can start from a clean slate. Sometimes things can get confused and your `claude` can be corrupted.
129
+
130
+ In particular, you may run into a situation where you have a tweakcc-patched (or maybe a formatted) `claude` but no tweakcc backup. And then it makes a backup of that modified `claude`. If you then try to reinstall Claude Code and apply your customizations, tweakcc will restore its backup of the old _modified_ `claude`.
131
+
132
+ To break out of this loop you can install a different version of Claude Code, which will cause tweakcc to discard its existing backup and take a fresh backup of the new `claude` file. Or you can simply delete tweakcc's backup file (located at `~/.tweakcc/cli.backup.js` or `~/.tweakcc/native-binary.backup`). If you do delete `cli.backup.js` or `native-binary.backup`, make sure you reinstall Claude Code _before_ you run tweakcc again, because if your `claude` is still the modified version, it will get into the same loop again.
91
133
 
92
134
  ## FAQ
93
135
 
94
- #### How can I customize my Claude Code system prompts?
136
+ #### System prompts
137
+
138
+ <details>
139
+ <summary>How can I customize my Claude Code system prompts?</summary>
95
140
 
96
141
  Run `npx tweakcc` first, and then navigate to the `system-prompts` directory in your config directory (see [Configuration directory](#configuration-directory)), which will have just been created, in your file browser. Each markdown file contains parts of prompts, such as the main system prompt, built-in tool descriptions, and various agent and utility prompts. Modify any of them, and then run `tweakcc --apply` or the tweakcc UI to apply your changes.
97
142
 
98
- #### How can I customize my Claude Code theme?
143
+ </details>
144
+
145
+ <details>
146
+ <summary>Does tweakcc generate the prompt markdown files from my Claude Code installation?</summary>
147
+
148
+ No, it fetches them fresh from the [data/prompts](https://github.com/Piebald-AI/tweakcc/tree/main/data/prompts) folder in this (`tweakcc`) repo. There is one JSON file for each Claude Code version. When a new CC version is released, we generate a prompts file for it as soon as possible.
149
+
150
+ </details>
99
151
 
100
- Run `npx tweakcc`, go to `Themes`, and modify existing themes or create a new one. Then go back to the main menu and choose `Apply customizations to cli.js`.
101
152
 
102
- #### Why isn't all the text in Claude Code is getting its color changed?
153
+ #### Themes
154
+
155
+ <details>
156
+ <summary>How can I customize my Claude Code theme?</summary>
157
+
158
+ Run `npx tweakcc`, go to `Themes`, and modify existing themes or create a new one. Then go back to the main menu and choose `Apply customizations`.
159
+
160
+ </details>
161
+
162
+ <details>
163
+ <summary>Why isn't all the text in Claude Code getting its color changed?</summary>
103
164
 
104
165
  Some of the text Claude Code outputs has no coloring information at all, and unfortunately, that text is rendered using your terminal's default text foreground color and can't be customized.
105
166
 
106
- #### Is there a way to disable colored output in Claude Code altogether?
167
+ </details>
168
+
169
+ <details>
170
+ <summary>Is there a way to disable colored output in Claude Code altogether?</summary>
107
171
 
108
172
  Yes! You can use the [`FORCE_COLOR`](https://force-color.org/) environment variable, a convention which many CLI tools including Claude Code respect. Set it to `0` to disable colors entirely in Claude Code.
109
173
 
110
- #### Why isn't my new theme being applied?
174
+ </details>
175
+
176
+ <details>
177
+ <summary>Why isn't my new theme being applied?</summary>
178
+
179
+ Could you have forgotten to actually set Claude Code's theme to your new theme? Run `claude` and then use `/theme` to switch to your new theme if so.
180
+
181
+ </details>
182
+
183
+ #### Other
111
184
 
112
- Could you have have forgotten to actually set Claude Code's theme to your new theme? Run `claude` and then use `/theme` to switch to your new theme if so.
185
+ <details>
186
+ <summary>tweakcc vs. tweakcn...?</summary>
113
187
 
114
- #### `tweakcc` vs. `tweakcn`...?
188
+ [tweakcn](https://github.com/jnsahaj/tweakcn), though similarly named, is unrelated to tweakcc or Claude Code. It's a tool for editing your [shadcn/ui](https://github.com/shadcn-ui/ui) themes. Check it out!
115
189
 
116
- [`tweakcn`](https://github.com/jnsahaj/tweakcn), though similarly named, is unrelated to `tweakcc` or Claude Code. It's a tool for editing your [shadcn/ui](https://github.com/shadcn-ui/ui) themes. Check it out!
190
+ </details>
117
191
 
118
192
  ## License
119
193