tweakcc 4.0.7 → 4.0.9
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 +26 -2
- package/dist/config-C5h_ncCn.mjs +669 -0
- package/dist/content-UKHa3BXT.mjs +29 -0
- package/dist/index.mjs +2 -2
- package/dist/lib/index.mjs +1 -1
- package/dist/nativeInstallation-N5ddObOc.mjs +4 -0
- package/package.json +1 -1
- package/dist/config-DgwUVWSR.mjs +0 -669
- package/dist/content-BXv52A0Y.mjs +0 -29
- package/dist/nativeInstallation-Bvj6S6Xh.mjs +0 -4
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ tweakcc also
|
|
|
90
90
|
- Adds a message to Claude Code's startup banner indicating that you're running the patched version of CC (configurable)
|
|
91
91
|
- Speeds up Claude Code startup by **~50%** with non-blocking MCP connections and configurable parallel connection batch size ([#406](https://github.com/Piebald-AI/tweakcc/issues/406))
|
|
92
92
|
|
|
93
|
-
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
|
|
93
|
+
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, nodenv, and **Nix** (including [NixOS](https://nixos.org/) and [nix-darwin](https://github.com/LnL7/nix-darwin)), as well as custom locations.
|
|
94
94
|
|
|
95
95
|
tweakcc supports Claude Code's **native installation**, which is a large platform-specific native executable containing the same minified/compiled JavaScript code from npm, just packaged up in a [Bun](https://github.com/oven-sh/bun) binary. We support patching the native binary on macOS, Windows, and Linux, including ad-hoc signing on Apple Silicon, via [**node-lief**](https://github.com/Piebald-AI/node-lief), our Node.js bindings for [LIEF (Library to Instrument Executables)](https://github.com/lief-project/LIEF).
|
|
96
96
|
|
|
@@ -161,7 +161,7 @@ $ pnpm dlx tweakcc
|
|
|
161
161
|
|
|
162
162
|
tweakcc works by patching Claude Code's minified `cli.js` file, reading customizations from `~/.tweakcc/config.json`. For npm-based installations `cli.js` is modified directly, but for native installations it's extracted from the binary using [node-lief](https://github.com/Piebald-AI/node-lief), 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`.
|
|
163
163
|
|
|
164
|
-
tweakcc is verified to work with Claude Code **2.1.
|
|
164
|
+
tweakcc is verified to work with Claude Code **2.1.55.** In newer or earlier versions various patches might not work. However, if we have the [system prompts for your version](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—the version number stated above is only relevant for the non-system-prompt patches. 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.
|
|
165
165
|
|
|
166
166
|
You can also create custom patches using tweakcc without having to fork it or open a PR. [`tweakcc adhoc-patch`](#cli-commands) supports using custom scripts that work with native and npm-based installs and that automatically detect your Claude Code installation.
|
|
167
167
|
|
|
@@ -1231,6 +1231,30 @@ Could you have forgotten to actually set Claude Code's theme to your new theme?
|
|
|
1231
1231
|
|
|
1232
1232
|
</details>
|
|
1233
1233
|
|
|
1234
|
+
#### Nix / NixOS
|
|
1235
|
+
|
|
1236
|
+
<details>
|
|
1237
|
+
<summary>Does tweakcc work with Claude Code installed via Nix?</summary>
|
|
1238
|
+
|
|
1239
|
+
**Yes.** tweakcc automatically detects and resolves Nix [`makeBinaryWrapper`](https://nixos.org/manual/nixpkgs/stable/#fun-makeBinaryWrapper) wrappers. When your `claude` binary is a Nix wrapper (a tiny compiled C shim that sets environment variables and calls `execv`), tweakcc sees through it to find the real Bun-compiled binary (typically named `.claude-unwrapped`) and operates on that instead.
|
|
1240
|
+
|
|
1241
|
+
However, because the Nix store (`/nix/store/...`) is read-only, writing the patched binary back requires `sudo`:
|
|
1242
|
+
|
|
1243
|
+
```bash
|
|
1244
|
+
sudo npx tweakcc --apply
|
|
1245
|
+
```
|
|
1246
|
+
|
|
1247
|
+
To undo your changes and restore the original binary:
|
|
1248
|
+
|
|
1249
|
+
```bash
|
|
1250
|
+
sudo nix store repair /nix/store/<hash>-claude-code-<version>
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
> [!WARNING]
|
|
1254
|
+
> **Modifying the Nix store directly is fragile.** Your changes will be lost if you run `nix-collect-garbage`, `nix store repair`, or rebuild the package (e.g., via `nixos-rebuild switch` or `home-manager switch`). After any of those operations, simply re-run `sudo npx tweakcc --apply` to re-patch. Your customizations are always preserved in `~/.tweakcc/config.json`.
|
|
1255
|
+
|
|
1256
|
+
</details>
|
|
1257
|
+
|
|
1234
1258
|
#### Other
|
|
1235
1259
|
|
|
1236
1260
|
<details>
|