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

@kio_ai/aicli-switch

v0.3.0

Published

CLI tool for switching AI CLI tool credentials (Claude Code OAuth, API Keys)

Readme

aicli-switch

Switch between multiple Claude Code accounts without re-authenticating.

When one account hits its usage limit, just aicli-switch another-account — no need to claude login again.

Install

npm (recommended)

npm install -g @kio_ai/aicli-switch

This downloads the pre-built binary for your platform automatically.

Manual download

Download the binary for your OS from Releases:

| Platform | File | |----------|------| | Windows x64 | aicli-switch-windows-amd64.exe | | macOS x64 | aicli-switch-darwin-amd64 | | macOS Apple Silicon | aicli-switch-darwin-arm64 | | Linux x64 | aicli-switch-linux-amd64 | | Linux ARM64 | aicli-switch-linux-arm64 |

Move it to a directory in your PATH:

# macOS / Linux
chmod +x aicli-switch-*
mv aicli-switch-* /usr/local/bin/aicli-switch

# Windows — move to any directory in your PATH
move aicli-switch-windows-amd64.exe %USERPROFILE%\.local\bin\aicli-switch.exe

Build from source

Requires Go 1.22+:

git clone https://github.com/killaragorn/aicli-switch.git
cd aicli-switch
go build -o aicli-switch .

Quick Start

# Step 1: You're logged into account A in Claude Code
# Save it as a profile
aicli-switch add work

# Step 2: Log into account B
claude login

# Step 3: Save account B
aicli-switch add personal

# Step 4: Now switch freely — no re-login needed
aicli-switch work        # → switches to work account
aicli-switch personal    # → switches to personal account

Commands

| Command | Description | |---------|-------------| | aicli-switch add <name> | Save current Claude Code session as a named profile | | aicli-switch add <name> -t apikey | Add an API Key profile (interactive) | | aicli-switch <name> | Switch to a profile | | aicli-switch ls | List all profiles with status | | aicli-switch status | Show active profile details | | aicli-switch refresh [name] | Manually refresh an OAuth token | | aicli-switch rm <name> | Delete a profile | | aicli-switch version | Show version |

What It Looks Like

$ aicli-switch ls
  NAME       TYPE   EMAIL                 STATUS   EXPIRY
▶ work       oauth  [email protected]      valid    6.9d
  personal   oauth  [email protected]          valid    4.2d
  relay      apikey -                     ready    n/a

$ aicli-switch personal
Switched to profile "personal" (oauth)
  Email: [email protected]

$ aicli-switch status
Active Profile: personal
  Type:    oauth
  Email:   [email protected]
  Token:   valid (expires in 4.2d)

How It Works

OAuth Profiles

  1. add — copies your encrypted OAuth credentials (~/.factory/auth.v2.*) into ~/.cc-profiles/<name>/
  2. switch — checks if the token is expired → refreshes if needed → restores credentials to ~/.factory/
  3. Token refresh — calls Claude's OAuth endpoint with the saved refresh_token, no browser needed

API Key Profiles

  1. add -t apikey — prompts for API Key and Base URL, saves to profile
  2. switch — updates ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL in ~/.claude/settings.json

Storage Layout

~/.cc-profiles/
├── _active                # Name of the currently active profile
├── work/
│   ├── auth.v2.file       # AES-256-GCM encrypted OAuth tokens
│   ├── auth.v2.key        # Encryption key
│   └── profile.json       # Metadata (name, type, email, timestamps)
└── personal/
    └── ...

Security

  • Credentials are always encrypted (AES-256-GCM), same as Claude Code itself
  • Each profile has its own encryption key
  • No plaintext tokens anywhere on disk
  • The _active file only stores the profile name

Update Detection

aicli-switch checks for new versions once per day (non-blocking). When an update is available:

Update available: 0.1.0 → 0.2.0
  Run: npm update -g aicli-switch
  Or:  https://github.com/killaragorn/aicli-switch/releases/tag/v0.2.0

Roadmap

  • [ ] OpenAI Codex CLI credential switching
  • [ ] Gemini CLI credential switching
  • [ ] Automatic failover on rate-limit
  • [ ] Profile import/export

License

MIT