npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

buddy-gacha

v1.0.3

Published

A small Bun CLI for rolling and selecting Claude Code buddy profiles.

Readme

buddy-gacha

A small CLI for rolling a new Claude Code buddy profile by generating candidate userID values and writing the chosen one into ~/.claude.json.

What It Does

  • Generates deterministic buddy results from random userID candidates.
  • Lets you pick from a sorted list in interactive mode.
  • Supports auto-roll mode for an exact target rarity, optional shiny, optional species filters, and optional --min-rare matching.
  • Clears cached companion-related fields so the new buddy can take effect after restart.

Install

No global install is required. Run it directly with npx:

npx buddy-gacha --help

If you prefer, you can still install it globally:

npm install -g buddy-gacha

Requirements

  • Node.js 18+
  • Claude Code launched at least once on the machine
  • Access to ~/.claude.json

Usage

Run the CLI:

npx buddy-gacha

Show help:

npx buddy-gacha --help

Interactive mode with more candidates:

npx buddy-gacha --count 50

Auto-roll for an exact target rarity:

npx buddy-gacha --rare 5

Auto-roll for the target rarity or higher:

npx buddy-gacha --rare 4 --min-rare

Auto-roll for a shiny dragon:

npx buddy-gacha --rare 5 --shiny --species dragon --max-attempts 100000

Rarity Table

| Level | Rarity | Weight | | --- | --- | --- | | 1 | common | 60% | | 2 | uncommon | 25% | | 3 | rare | 10% | | 4 | epic | 4% | | 5 | legendary | 1% |

Shiny is an independent 1% roll.

By default, --rare means an exact rarity match. Add --min-rare if you want to accept higher rarities too.

Important Notes

  • You must fully restart Claude Code after writing a new userID.
  • If you are using OAuth login, changing userID may not take effect because Claude Code can derive the buddy from accountUuid.
  • The tool warns before writing in OAuth scenarios, but the safest path is still logging out and using API key mode if you want deterministic resets.
  • This tool edits your local Claude Code config file. Review the script before using it on a machine you care about.

What Changing userID Affects

If you manually delete or modify ~/.claude.json and change the userID field:

  • Session history is not affected. You can still access conversations by project path.
  • Permission records are not affected. They are stored in project-level config.
  • OAuth account information is not affected. It is stored in the oauthAccount field.
  • Your buddy will change completely. Species, rarity, and appearance are regenerated.
  • Your buddy's "soul" can be lost or mismatched. Data stored in config.companion, such as name, level, and experience, may no longer match the new buddy shell.

Development

This repo uses Bun for local development and testing.

Install dependencies:

npm install

Build the publishable CLI:

npm run build

Run tests:

npm test

Show CLI help through the package script:

npm run help

Run the CLI:

npm start