# any-buddy patches a Claude Code companion into the Claude Code binary

> any-buddy is a small TypeScript CLI that restores the companion pet feature Claude Code dropped, by hashing a salt, searching for a matching value and patching the installed binary in place. It is fun, it is reversible, and it depends on Bun plus a writable Claude Code install.

**cpaczek/any-buddy** — Hack Claude Code to get any buddy you want

- Repository: https://github.com/cpaczek/any-buddy
- Stars: 611 · Forks: 53
- Language: TypeScript
- License: WTFPL
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/cpaczek-any-buddy

## A feature that Anthropic removed, patched back in

The premise of any-buddy is blunt. Claude Code had a buddy, a little companion character that lived in the terminal, and that feature was removed in version .97. The project describes the removal as a blast, thanks its contributors, and says that if the feature ever comes back it will be hacked again. What the tool does is reconstruct the feature by patching the Claude Code binary that is already installed on your machine. It is not a plugin, not a theme, and not an extension point, because Claude Code does not offer one that fits. It is a binary patcher with a personality generator attached, and understanding that difference is the whole evaluation. The npm package is called any-buddy, the CLI command is any-buddy, and the repository is TypeScript with a build step that produces a dist/ folder containing cli.js. The package manifest declares Node 20 or newer as the engine floor and lists @inquirer/prompts, @opentui/core and chalk as its three runtime dependencies, so the interactive layer is small and self-contained.

## The salt search: why this takes a progress bar

The technical core is a search, and the project is candid about it. The companion data is located by hashing a salt string and searching for a value that hashes to the right thing, which is why the flow shows a salt search with a progress bar. The README points at a separate HOW_IT_WORKS.md for the deep dive on hashing, binary patching, the salt search algorithm and the auto-patch hook, so the details live outside the front page. One hashing detail does surface in the README and it matters in practice: the tool computes a wyhash when Bun is present, and falls back to FNV-1a on Node-based installs. Those two functions do not agree, which is exactly why the tool warns that Bun is recommended for correct hash computation. Without Bun you get a different hash family, and the fallback path is documented as producing correct results only in the Node runtime case. The salt itself is a dependency on Anthropic, not on this project, and the README states the consequence plainly: if Anthropic changes the salt string, the tool will detect this and warn you rather than corrupting anything.

## Bun for the TUI, Node for the fallback

The single fastest path to a companion is one command.

```bash
npx any-buddy@latest
```

That runs without installing anything permanently. If Bun is on the machine you get the full interactive builder with a live preview. If Bun is missing you get sequential prompts and a note telling you to install Bun. The interactive builder is where the tool earns its keep: you browse species, eyes, rarity, hats and stats with a live ASCII art preview that updates as you scroll, move with arrow keys, advance with Tab or Enter and cancel with Esc. The start screen offers three paths, building your own, browsing 23 curated themed builds with animated preview, or switching between saved pets when you have saves. The requirement list names Bun as needed for the interactive builder TUI and for correct hash computation, and notes it is typically already installed alongside Claude Code. Installing globally works too.

```bash
npm install -g any-buddy
```

The requirements also list Claude Code itself, installed by any standard method, because the tool has nothing to patch without it.

## Command line flags for scripted builds

Everything the interactive builder can do is reachable as flags, which is what you want for reproducibility or for a script that regenerates a known companion. The species list has 18 entries including duck, goose, blob, cat, dragon, octopus, owl, penguin, turtle, snail, ghost, axolotl, capybara, cactus, robot, rabbit, mushroom and chonk. Rarity runs from common through uncommon, rare and epic to legendary. Hats include crown, tophat, propeller, halo, wizard, beanie and tinyduck. The --name flag renames the companion, --personality sets a description that controls the speech bubble, and --shiny requires a shiny result, which the documentation flags as roughly a hundred times longer search. The peak and dump flags choose your best and worst stat from DEBUGGING, PATIENCE, CHAOS, WISDOM and SNARK, with the caveat that the exact values are seed-determined rather than chosen. The --preset flag selects a curated build such as Arcane Dragon, and --yes skips confirmations. Non-interactive invocations bypass the start screen entirely.

## Applying, previewing and getting back out

The command set separates looking at a buddy from changing your install, and that separation is worth using. any-buddy preview browses without applying. any-buddy current shows the pet you have. any-buddy apply re-applies the patch, which is what you need after a Claude Code update overwrites the binary. any-buddy buddies lists your saved pets so you can switch between them, and any-buddy rehatch deletes the companion so it can be re-hatched through the /buddy slash command. The escape hatch is restore.

```bash
any-buddy restore
```

Restore patches the salt back to the original value and removes the auto-patch hook, and the README is explicit that your saved buddies are preserved, so you can reactivate one later with any-buddy buddies. That is a better recovery story than most binary patchers offer, and it is worth crediting. The trade is that restore also means the pet disappears until you re-apply, so a Claude Code update is a moment where you either run any-buddy apply or run any-buddy restore and accept the default.

## macOS re-signing and the Windows npm caveat

The platform table is where the friction shows. Linux is tested and auto-detects the Claude Code versions directory at ~/.local/share/claude/versions/. macOS is tested as well, and auto-detects, but additionally ad-hoc re-signs the binary after patching. Windows is tested and works with npm-based installs through cli.js. If auto-detection fails on any platform, the README points at an environment variable override, CLAUDE_BINARY set to the path of the binary you want patched. The macOS caveat is the important one and the project does not hide it: the binary is ad-hoc re-signed after patching, and if Claude Code will not launch, the answer is to run any-buddy restore. In other words, on macOS the tool can leave you with an unsigned or differently signed binary, and a failed launch is a documented outcome with a documented fix. That is a narrower risk than an installer that writes to system directories, but it is a real one, and it is the reason the restore command deserves to be in your shell history before you need it.

## The auto-patch hook and a Claude Code update

Because a Claude Code update replaces the binary, a patched companion would vanish on the next upgrade, which would make the tool a one-shot joke. The auto-patch hook exists to handle that, and it is optional, since the --no-hook flag stops the tool from offering it. When the hook is set up, the patch is reapplied after an update, which is what makes any-buddy apply a fallback rather than a routine. The hook is also something restore removes, so opting out means you are responsible for reapplying. If you patch the binary and also let Claude Code manage its own updates, you are running two agents over the same file, and the tool's design assumes you want the patch to survive. From a maintenance point of view, the last push to the repository was on 2026-04-14 and the most recent release listed is v2.2.0 on 2026-04-06, after v2.1.4 on 2026-04-04 and v2.1.3 on 2026-04-03. The three rapid releases around a feature that Anthropic has already removed tell you where the energy went, and the readme's own line about hacking it again if the feature returns says the same thing.

## How this differs from a theme or an extension

The comparison worth making is with the alternatives people reach for first. A shell theme or a prompt customization changes how the terminal looks and leaves the application binary alone, so it survives updates and carries no signing problem, but it cannot add a character that the application does not know how to draw. A Claude Code plugin or extension point, if one existed for this, would be the clean approach, but the project exists precisely because the feature was not exposed that way. any-buddy's approach is to reach into the running program: find the salt, compute a hash that lands on the companion data, and write the result into the binary, then re-sign on macOS so the OS still loads it. That approach can restore a feature the vendor removed, which no theme can do, and it carries the corresponding costs: it depends on internal details of the installed binary, it breaks when those details change, and it needs a restore path to stay usable. The project ships a HOW_IT_WORKS.md, CONTRIBUTING.md, tests run through vitest, and a package that publishes dist/ and assets/ to npm, so it is a structured tool rather than a single script, but its lifespan is tied to a feature Anthropic has no obligation to keep out of the binary.

## Conclusion

Adopt any-buddy if you want the Claude Code companion pet back and you are willing to patch a binary in your local install, on a platform it lists as tested, with Bun installed. Do not adopt it if your Claude Code install is managed by an updater you do not control, if your organisation blocks unsigned binary modification on macOS, or if you need the feature to survive a Claude Code update without your involvement. Verify two things first: run any-buddy preview to confirm the builder works without touching your install, and check the salt warning, because if Anthropic changes the salt string the tool detects that and warns rather than silently patching. Then keep any-buddy restore within reach, since that command is the only clean way back to the original binary and it also removes the auto-patch hook.

## FAQ

### What does any-buddy do to Claude Code?

It patches the installed Claude Code binary to bring back the companion pet feature that was removed in version .97. The patch works by hashing a salt and searching for a matching value, then writing it into the binary.

### How do I install any-buddy?

Run npx any-buddy@latest for a one-off use, or install it globally with npm install -g any-buddy. You can also clone the repository and link it with pnpm install followed by pnpm link --global.

### Do I need Bun to use any-buddy?

Bun is needed for the interactive builder TUI and for correct wyhash computation. Without it the tool falls back to sequential prompts and uses FNV-1a hashing on Node-based installs, and Node 20 or newer is the stated requirement.

### How do I undo the patch any-buddy applied?

Run any-buddy restore. It patches the salt back to the original value and removes the auto-patch hook, while your saved buddies are preserved for later reactivation with any-buddy buddies.

### What happens on macOS after patching?

The binary is ad-hoc re-signed after patching, and the documentation notes that if Claude Code will not launch you should run any-buddy restore. Linux auto-detects the versions directory under ~/.local/share/claude/versions/ and Windows works with npm-based installs through cli.js.

### What licence is any-buddy released under?

It is released under the WTFPL, the licence identifier recorded both in the repository and in the package manifest. The licence file itself is named LICENSE at the top of the repository.

## Sources

- [cpaczek/any-buddy on GitHub](https://github.com/cpaczek/any-buddy)
- [Issues](https://github.com/cpaczek/any-buddy/issues)
- [License: WTFPL](https://github.com/cpaczek/any-buddy/blob/main/LICENSE)
- [README](https://github.com/cpaczek/any-buddy/blob/main/README.md)
- [Releases](https://github.com/cpaczek/any-buddy/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/cpaczek-any-buddy
