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

claude-code-profiles

v0.1.4

Published

Manage Claude Code auth profiles from the command line.

Downloads

463

Readme

claude-code-profiles

Small CLI for switching Claude Code auth profiles by managing ~/.claude.json as a symlink.

On macOS, it also saves and restores Claude Code's Keychain credential so account switching actually changes the active login.

Commands

npx claude-code-profiles init default
npx claude-code-profiles save work
npx claude-code-profiles use work
npx claude-code-profiles current
npx claude-code-profiles list
npx claude-code-profiles whoami
npx claude-code-profiles verify

How it works

  • Managed profiles live under ~/.claude-code-profiles/profiles/<name>/.claude.json
  • The active Claude auth file stays at ~/.claude.json
  • Claude's real OAuth token lives in secure storage, not just ~/.claude.json
  • On macOS, the live secure-storage entry is the same keychain item Claude Code uses internally
  • use switches the active file by updating that path to a symlink
  • If the active auth file is unmanaged, use first backs it up under ~/.claude-code-profiles/backups/
  • current reports the active profile from the symlink target, not a separate state flag
  • Existing ~/.claude-profiles directories are still detected so older saved profiles keep working

Important

  • Versions before 0.1.3 only switched ~/.claude.json, not the Keychain credential.
  • If you saved profiles with an older version, re-auth into each account once and run save <name> again to capture its Keychain credential.
  • claude auth status is not sufficient to prove which OAuth token is live. Claude Code reads account metadata from ~/.claude.json, but live requests use the OAuth token from secure storage.
  • Use claude-code-profiles verify [name] to ask Claude's /api/oauth/profile endpoint which account a saved or live token actually belongs to.

Notes

  • This tool only manages Claude Code auth state, not chat history or other ~/.claude data.
  • Saved profile files contain sensitive auth state and are written with 0600 permissions.
  • Profile names are limited to letters, numbers, ., _, and -.

Local development

npm test
node ./bin/claude-code-profiles.js help