MCPcopy Index your code
hub / github.com/Piebald-AI/tweakcc

github.com/Piebald-AI/tweakcc @v4.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.3.0 ↗ · + Follow
581 symbols 1,577 edges 145 files 51 documented · 9% updated todayv4.3.0 · 2026-06-29★ 2,29444 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Check out Piebald

We've released Piebald, the ultimate agentic AI developer experience. \ Download it and try it out for free! https://piebald.ai/

Join our Discord X

Scroll down for tweakcc. :point_down:

hero

tweakcc

tweakcc on npm Mentioned in Awesome Claude Code ClaudeLog - A comprehensive knowledge base for Claude.

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 Piebald.

Animated GIF demonstrating running <code>npx tweakcc</code>, creating a new theme, changing all of Claude Code's UI colors to purple, changing the thinking format from '\<verb>ing...' to 'Claude is \<verb>ing', changing the generating spinner style to a 50ms glow animation, applying the changes, running Claude, and using '/config' to switch to the new theme, and sending a message to see the new thinking verb format.

[!IMPORTANT] NEW in 4.0.0: tweakcc now has an API; use npm i tweakcc to add to your project and see API!

NEW in 4.0.0: You can now create custom patches via sandboxed scripts! Works with native installations. No need to fork tweakcc just to make a quick patch! See tweakcc adhoc-patch.

NEW in 4.0.0: You can also apply customizations from a remote URL to a config file. See Remote Config.

Also see tweakcc --restore, tweakcc unpack, and tweakcc repack.

[!NOTE] NEW: tweakcc 4.0.0 also introduces several new patches:

With tweakcc, you can

  • Customize all of Claude Code's system prompts (NEW: also see all of Claude Code's system prompts)
  • Create custom toolsets that can be used in Claude Code with the new /toolset command
  • Highlight custom patterns while you type in the CC input box with custom colors and styling, like how ultrathink used to be rainbow-highlighted.
  • Manually name sessions in Claude Code with /title my chat name or /rename (see our blog post for implementation details)
  • Create custom themes with a graphical HSL/RGB color picker
  • Add custom thinking verbs that will show while Claude's working
  • Create custom thinking spinner animations with different speeds and phases
  • Style the user messages in the chat history beyond the default plain gray text
  • Remove the ASCII border from the input box
  • Expand thinking blocks by default, so that you don't need to use the transcript (Ctrl+O) to see them
  • Configure which Claude model each subagent (Plan, Explore, and general-purpose) uses
  • Switch between table formats - Claude Code default, Unicode (┌─┬─┐), ASCII/markdown (|---|), Unicode without top/bottom borders.

tweakcc also

  • Fixes a bug where the spinner animation is frozen if you have the CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC environment variable set (#46)
  • 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
  • Adds the opusplan[1m] model alias, combining Opus for planning with Sonnet's 1M context for execution—reducing "context anxiety" (#108)
  • Adds a message to Claude Code's startup banner indicating that you're running the patched version of CC (configurable)
  • Speeds up Claude Code startup by ~50% with non-blocking MCP connections and configurable parallel connection batch size (#406)

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 and nix-darwin), as well as custom locations.

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 binary. We support patching the native binary on macOS, Windows, and Linux, including ad-hoc signing on Apple Silicon, via node-lief, our Node.js bindings for LIEF (Library to Instrument Executables).

While tweakcc has a large library of built-in patches, you can create custom patches by using tweakcc's API. If you don't want to create an npm package, you can use tweakcc adhoc-patch, which applies a custom Node.js script to your default Claude Code installation. Because adhoc-patch supports running scripts from an HTTP URL, you can even host a script on a GitHub Gist or pastebin for easy distribution.

Run without installation:

$ npx tweakcc

# Or use pnpm:
$ pnpm dlx tweakcc

Table of contents

How it works

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, 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.

tweakcc is verified to work with Claude Code 2.1.162. In newer or earlier versions various patches might not work. However, if we have the system prompts for your version 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.

You can also create custom patches using tweakcc without having to fork it or open a PR. tweakcc adhoc-patch supports using custom scripts that work with native and npm-based installs and that automatically detect your Claude Code installation.

Remote Config

While tweakcc usually works by applying customizations from your local ~/.tweakcc/config.json, you can optionally pass the --config-url <http URL> flag when you use tweakcc --apply to have tweakcc fetch config from a remote URL and apply it to your local Claude Code installation. This is useful for testing someone else's config when shared via a Gist or pastebin, for example.

Example:

npx tweakcc@latest --apply --config-url https://gist.githubusercontent.com/bl-ue/27323f9bfd4c18aaab51cad11c1148dc/raw/b24b5fe08874ce50f4be6c093d9589d184f91a70/config.json

Your local config will not be overwritten; the remote config will be copied into your config.json under remoteConfig.settings.

CLI Commands

In addition to the interactive TUI (npx tweakcc) and the --apply flag, tweakcc provides three subcommands for advanced use: unpack, repack, and adhoc-patch.

unpack

Extract the embedded JavaScript from a native Claude Code binary and write it to a file. This is useful for inspecting Claude Code's source, writing custom patches, or making manual edits before repacking. Note that unpack only works with native/binary installations; it will error if pointed at an npm-based installation (cli.js), because it can already be read directly from disk. unpack takes the path to the JS file to write to, and an optional path to a native binary, which if omitted will default to the current installation.

npx tweakcc unpack <output-js-path> [binary-path]

repack

Read a JavaScript file and embed it back into a native Claude Code binary. This is the counterpart to unpack — after inspecting or modifying the extracted JS, use repack to write it back. Like unpack, this only works with native installations. repack takes a path to a JS file to read from, and an optional path to a native binary, which if omitted, as above, will default to the current installation.

npx tweakcc repack <input-js-path> [binary-path]

Example:

# Extract, edit, and repack
npx tweakcc unpack ./claude-code.js
# ... make your edits to claude-code.js ...
npx tweakcc repack ./claude-code.js

adhoc-patch

Apply a one-off or ad-hoc patch to a Claude Code installation without going through the tweakcc UI or config system. It supports three modes and works with both native and npm-based installations.

3 modes of patching are supported.

--string

A fixed/static old string is replaced with a fixed/static new string, analogous to grep -F.

  • By defau

Extension points exported contracts — how you extend this code

ResolvedVars (Interface)
* Pre-resolved minified variable names from Claude Code's JS content. * These are passed into adhoc-patch scripts as `v
src/commands.ts
PatchImplementation (Interface)
Patch implementation with function and optional condition
src/patches/index.ts
StringPointer (Interface)
(no doc)
src/nativeInstallation.ts
StartupCheckResult (Interface)
(no doc)
src/startup.ts
FormatDiffHunk (Interface)
(no doc)
src/formatAndDiff.ts
StringsPrompt (Interface)
(no doc)
src/systemPromptSync.ts
SearchPathInfo (Interface)
(no doc)
src/installationPaths.ts
HashIndex (Interface)
(no doc)
src/systemPromptHashIndex.ts

Core symbols most depended-on inside this repo

debug
called by 181
src/utils.ts
showDiff
called by 119
src/patches/patchDiffing.ts
addPath
called by 75
src/installationPaths.ts
createEnoent
called by 48
src/tests/testHelpers.ts
ensureMisc
called by 37
src/ui/components/MiscView.tsx
deepMergeWithDefaults
called by 27
src/utils.ts
findClaudeCodeInstallation
called by 26
src/installationDetection.ts
applySystemPrompts
called by 24
src/patches/systemPrompts.ts

Shape

Function 499
Interface 77
Class 2
Enum 2
Method 1

Languages

TypeScript100%
Python1%

Modules by API surface

src/systemPromptSync.ts39 symbols
src/nativeInstallation.ts29 symbols
src/utils.ts27 symbols
src/installationDetection.ts27 symbols
src/patches/toolsets.ts25 symbols
src/ui/components/ColorPicker.tsx20 symbols
src/commands.ts19 symbols
src/types.ts17 symbols
src/systemPromptHashIndex.ts17 symbols
src/patches/index.ts13 symbols
src/patches/helpers.ts13 symbols
src/index.tsx12 symbols

For agents

$ claude mcp add tweakcc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact