tweakcc 3.2.3 → 3.2.5
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 +31 -26
- package/dist/index.mjs +33 -33
- package/dist/nativeInstallation-DBmBL-fs.mjs +4 -0
- package/package.json +2 -2
- package/dist/nativeInstallation-D2TtDSDx.mjs +0 -4
package/README.md
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
<div align="left">
|
|
7
7
|
|
|
8
8
|
### Check out Piebald
|
|
9
|
+
|
|
9
10
|
We've released **Piebald**, the ultimate agentic AI developer experience. \
|
|
10
|
-
Download it and try it out for free!
|
|
11
|
+
Download it and try it out for free! **https://piebald.ai/**
|
|
11
12
|
|
|
12
13
|
<a href="https://piebald.ai/discord"><img src="https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=flat&logo=discord&logoColor=white" alt="Join our Discord"></a>
|
|
13
14
|
<a href="https://x.com/PiebaldAI"><img src="https://img.shields.io/badge/Follow%20%40PiebaldAI-000000?style=flat&logo=x&logoColor=white" alt="X"></a>
|
|
@@ -33,7 +34,7 @@ Download it and try it out for free! **https://piebald.ai/**
|
|
|
33
34
|
[](https://github.com/hesreallyhim/awesome-claude-code)
|
|
34
35
|
[](https://claudelog.com/)
|
|
35
36
|
|
|
36
|
-
**tweakcc is a CLI tool that upgrades your Claude Code experience.**
|
|
37
|
+
**tweakcc is a CLI tool that upgrades your Claude Code experience.** Customize its system prompts, add custom themes, create toolsets, and personalize the UI. From the team behind [<img src="https://github.com/Piebald-AI/piebald/raw/main/assets/logo.svg" width="15"> **Piebald.**](https://piebald.ai/)
|
|
37
38
|
|
|
38
39
|
<!--
|
|
39
40
|
> [!note]
|
|
@@ -53,13 +54,16 @@ With tweakcc, you can
|
|
|
53
54
|
- Style the **user messages in the chat history** beyond the default plain gray text
|
|
54
55
|
- Remove the **ASCII border** from the input box
|
|
55
56
|
- Expand **thinking blocks** by default, so that you don't need to use the transcript (<kbd>Ctrl+O</kbd>) to see them
|
|
57
|
+
- Configure which Claude **model** each **subagent** (Plan, Explore, and general-purpose) uses
|
|
56
58
|
|
|
57
59
|
tweakcc also
|
|
60
|
+
|
|
58
61
|
- 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))
|
|
59
62
|
- 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`
|
|
60
63
|
- Adds a message to Claude Code's startup banner indicating that you're running the patched version of CC (configurable)
|
|
61
64
|
|
|
62
65
|
Additionally, we're working on features that will allow you to
|
|
66
|
+
|
|
63
67
|
- Pick from over **70+ spinning/thinking animations** from [`cli-spinners`](https://github.com/sindresorhus/cli-spinners)
|
|
64
68
|
- Apply **custom styling** to the markdown elements in Claude's responses like code, bold, headers, etc
|
|
65
69
|
|
|
@@ -76,9 +80,9 @@ $ pnpm dlx tweakcc
|
|
|
76
80
|
|
|
77
81
|
## How it works
|
|
78
82
|
|
|
79
|
-
tweakcc works by patching Claude Code's minified `cli.js` file.
|
|
83
|
+
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`.
|
|
80
84
|
|
|
81
|
-
tweakcc is verified to work with Claude Code **2.0.
|
|
85
|
+
tweakcc is verified to work with Claude Code **2.1.2.** In newer or earlier versions various patches might not work. However, if we have the system prompts for your version (check [here](https://github.com/Piebald-AI/tweakcc/tree/main/data/prompts)) then system prompt patching is guaranteed to work with that version, even if it's significantly different from the verified CC version. We get the latest system prompts within minutes of each new CC release, so unless you're using a CC version older than 2.0.14, your version is supported.
|
|
82
86
|
|
|
83
87
|
### Configuration directory
|
|
84
88
|
|
|
@@ -89,7 +93,7 @@ tweakcc stores its configuration files in one of the following locations, in ord
|
|
|
89
93
|
3. **`~/.claude/tweakcc`** if it exists, or
|
|
90
94
|
4. **`$XDG_CONFIG_HOME/tweakcc`** if the `XDG_CONFIG_HOME` environment variable is set.
|
|
91
95
|
|
|
92
|
-
If none of the above exist, `~/.tweakcc` will be created and used.
|
|
96
|
+
If none of the above exist, `~/.tweakcc` will be created and used. If you version control `~/.claude` for Claude Code configuration and want your tweakcc config and system prompts there too, then manually create the directory first, or move your existing `~/.tweakcc` directory there:
|
|
93
97
|
|
|
94
98
|
```bash
|
|
95
99
|
# For new users
|
|
@@ -101,7 +105,7 @@ mv ~/.tweakcc ~/.claude/tweakcc
|
|
|
101
105
|
|
|
102
106
|
## Building from source
|
|
103
107
|
|
|
104
|
-
You can use tweakcc by running `npx tweakcc`, or `npm install -g tweakcc` and then `tweakcc`.
|
|
108
|
+
You can use tweakcc by running `npx tweakcc`, or `npm install -g tweakcc` and then `tweakcc`. Or build and run it locally:
|
|
105
109
|
|
|
106
110
|
```bash
|
|
107
111
|
git clone https://github.com/Piebald-AI/tweakcc.git
|
|
@@ -113,6 +117,8 @@ node dist/index.js
|
|
|
113
117
|
|
|
114
118
|
## Related projects
|
|
115
119
|
|
|
120
|
+
- [**cc-mirror**](https://github.com/numman-ali/cc-mirror) - Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, LiteLLM). Uses tweakcc to customize system prompts, themes, thinking styles, and toolsets.
|
|
121
|
+
|
|
116
122
|
Other tools for customizing Claude Code or adding functionality to it:
|
|
117
123
|
|
|
118
124
|
- [**clotilde**](https://github.com/fgrehm/clotilde) - Wrapper for Claude Code that adds powerful manual session naming, resuming, forking, and incognito (ephemeral) session management to Claude Code.
|
|
@@ -124,10 +130,10 @@ Forks:
|
|
|
124
130
|
|
|
125
131
|
- [**tweakgc-cli**](https://github.com/DanielNappa/tweakgc-cli) - CLI tool to extend the GitHub Copilot CLI to accept more selectable models.
|
|
126
132
|
|
|
127
|
-
|
|
128
133
|
## System prompts
|
|
129
134
|
|
|
130
135
|
tweakcc allows you to customize the various parts of Claude Code's system prompt, including
|
|
136
|
+
|
|
131
137
|
- the main system prompt and any conditional bits,
|
|
132
138
|
- descriptions for all 17 builtin tools like `Bash`, `TodoWrite`, `Read`, etc.,
|
|
133
139
|
- prompts for builtin Task/Plan/Explore subagents, and
|
|
@@ -135,24 +141,24 @@ tweakcc allows you to customize the various parts of Claude Code's system prompt
|
|
|
135
141
|
|
|
136
142
|
👉 See [**Claude Code System Prompts**](https://github.com/Piebald-AI/claude-code-system-prompts) for a breakdown of all the system prompt parts, as well as a changelog and diffs for each CC version.
|
|
137
143
|
|
|
138
|
-
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.
|
|
144
|
+
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.
|
|
139
145
|
|
|
140
146
|
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.
|
|
141
147
|
|
|
142
148
|
#### How the prompt files are created
|
|
143
149
|
|
|
144
|
-
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).
|
|
150
|
+
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.
|
|
145
151
|
|
|
146
152
|
Simply edit the markdown files in `~/.tweakcc/system-prompts` (or `$XDG_CONFIG_HOME/tweakcc/system-prompts`) and then run `npx tweakcc --apply`.
|
|
147
153
|
|
|
148
154
|
#### What happens when Anthropic changes the prompts?
|
|
149
155
|
|
|
150
|
-
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.
|
|
156
|
+
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.
|
|
151
157
|
|
|
152
|
-
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.
|
|
158
|
+
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.
|
|
153
159
|
|
|
154
160
|
> [!tip]
|
|
155
|
-
> Make sure to update the `ccVersion` field at the top of the file when you're done resolving the conflicts.
|
|
161
|
+
> 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.
|
|
156
162
|
|
|
157
163
|
Screenshot of the HTML file:
|
|
158
164
|
|
|
@@ -160,23 +166,23 @@ Screenshot of the HTML file:
|
|
|
160
166
|
|
|
161
167
|
#### Git for version control over your customized prompts
|
|
162
168
|
|
|
163
|
-
This is a great idea, and we recommend it; in fact, we have one ourselves [here.](https://github.com/bl-ue/tweakcc-system-prompts)
|
|
169
|
+
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).
|
|
164
170
|
|
|
165
171
|
## Toolsets
|
|
166
172
|
|
|
167
|
-
Toolsets are collections of built-in tools that Claude is allowed to call.
|
|
173
|
+
Toolsets are collections of built-in tools that Claude is allowed to call. Unlike Claude Code's builtin permission system, however, built-in tools that are not in the currently active toolset are not even sent to the model. As a result, Claude has no idea of tools that are not enabled in the current toolset (unless they happen to be mentioned in other parts of the system prompt), and it's not able to call them.
|
|
168
174
|
|
|
169
|
-
Toolsets can be helpful both for using Claude in different modes, e.g. a research mode where you might only include `WebFetch` and `WebSearch`, and for keeping the size of your system prompt by trimming out tools you don't ever want Claude to call.
|
|
175
|
+
Toolsets can be helpful both for using Claude in different modes, e.g. a research mode where you might only include `WebFetch` and `WebSearch`, and for keeping the size of your system prompt by trimming out tools you don't ever want Claude to call. The description of each tool call is placed in the system prompt (see [here](https://github.com/Piebald-AI/claude-code-system-prompts#builtin-tool-descriptions)), and if there are multiple tools you don't care about (like `Skill`, `SlashCommand`, `BashOutput`, etc.), the accumulated size of their descriptions and parameters can bloat the context by several thousand tokens.
|
|
170
176
|
|
|
171
|
-
To create a toolset, run `npx tweakcc`, go to `Toolsets`, and hit `n` to create a new toolset.
|
|
177
|
+
To create a toolset, run `npx tweakcc`, go to `Toolsets`, and hit `n` to create a new toolset. Set to apply your customizations, and then run `claude`. If you marked a toolset as the default in tweakcc, it will be automatically selected.
|
|
172
178
|
|
|
173
179
|
## Troubleshooting
|
|
174
180
|
|
|
175
|
-
tweakcc stores a backup of your Claude Code `cli.js`/binary for when you want to revert your customizations and for reapplying patches.
|
|
181
|
+
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.
|
|
176
182
|
|
|
177
|
-
In particular, you may run into a situation where you have a tweakcc-patched (or maybe a formatted) `claude` but no tweakcc backup.
|
|
183
|
+
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`.
|
|
178
184
|
|
|
179
|
-
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.
|
|
185
|
+
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.
|
|
180
186
|
|
|
181
187
|
## FAQ
|
|
182
188
|
|
|
@@ -185,24 +191,23 @@ To break out of this loop you can install a different version of Claude Code, wh
|
|
|
185
191
|
<details>
|
|
186
192
|
<summary>How can I customize my Claude Code system prompts?</summary>
|
|
187
193
|
|
|
188
|
-
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.
|
|
194
|
+
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.
|
|
189
195
|
|
|
190
196
|
</details>
|
|
191
197
|
|
|
192
198
|
<details>
|
|
193
199
|
<summary>Does tweakcc generate the prompt markdown files from my Claude Code installation?</summary>
|
|
194
200
|
|
|
195
|
-
No, it fetches them fresh from the [data/prompts](https://github.com/Piebald-AI/tweakcc/tree/main/data/prompts) folder in this (`tweakcc`) repo.
|
|
201
|
+
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.
|
|
196
202
|
|
|
197
203
|
</details>
|
|
198
204
|
|
|
199
|
-
|
|
200
205
|
#### Themes
|
|
201
206
|
|
|
202
207
|
<details>
|
|
203
208
|
<summary>How can I customize my Claude Code theme?</summary>
|
|
204
209
|
|
|
205
|
-
Run `npx tweakcc`, go to `Themes`, and modify existing themes or create a new one.
|
|
210
|
+
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`.
|
|
206
211
|
|
|
207
212
|
</details>
|
|
208
213
|
|
|
@@ -216,14 +221,14 @@ Some of the text Claude Code outputs has no coloring information at all, and unf
|
|
|
216
221
|
<details>
|
|
217
222
|
<summary>Is there a way to disable colored output in Claude Code altogether?</summary>
|
|
218
223
|
|
|
219
|
-
Yes!
|
|
224
|
+
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.
|
|
220
225
|
|
|
221
226
|
</details>
|
|
222
227
|
|
|
223
228
|
<details>
|
|
224
229
|
<summary>Why isn't my new theme being applied?</summary>
|
|
225
230
|
|
|
226
|
-
Could you have forgotten to actually set Claude Code's theme to your new theme?
|
|
231
|
+
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.
|
|
227
232
|
|
|
228
233
|
</details>
|
|
229
234
|
|
|
@@ -232,7 +237,7 @@ Could you have forgotten to actually set Claude Code's theme to your new theme?
|
|
|
232
237
|
<details>
|
|
233
238
|
<summary>tweakcc vs. tweakcn...?</summary>
|
|
234
239
|
|
|
235
|
-
[tweakcn](https://github.com/jnsahaj/tweakcn), though similarly named, is unrelated to tweakcc or Claude Code.
|
|
240
|
+
[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!
|
|
236
241
|
|
|
237
242
|
</details>
|
|
238
243
|
|