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

kc-switcher

v0.1.0

Published

Cross-platform CLI to switch Claude Code between the Claude subscription and a local Anthropic-compatible Kiro gateway, with safe backup/restore.

Readme

KC-Switcher

KC-Switcher is a cross-platform CLI for instantly switching Claude Code between the normal Claude subscription and a local Kiro gateway — with safe, automatic backup and restore of your Claude configuration.

Run it with npx, no install required:

npx kc-switcher use kiro      # switch Claude Code to the local Kiro gateway
npx kc-switcher use claude    # restore your normal Claude subscription

How it works

The tool does not assume Claude Code's private configuration format. It:

  1. Discovers likely Claude config/auth locations (~/.claude, ~/.claude.json, %APPDATA%\Claude, …).
  2. Captures them once in a timestamped original backup before making any change.
  3. Sets or clears the ANTHROPIC_BASE_URL / ANTHROPIC_API_KEY user environment variables.
  4. Restores the original backup when you switch back to claude.

Environment-variable changes apply to newly started processes — restart Claude Code after switching.

Commands

npx kc-switcher use <kiro|claude>   # switch active provider
npx kc-switcher status              # show current provider + config status
npx kc-switcher list                # list supported and planned providers
npx kc-switcher doctor              # environment / gateway diagnostics
npx kc-switcher backup              # create a manual backup
npx kc-switcher restore             # restore the most recent backup
npx kc-switcher version             # print version

Global flags

| Flag | Effect | | --- | --- | | --dry-run | Show what would change without writing anything | | --verbose | Enable debug logging | | --no-color | Disable colored output | | --yes, -y | Assume yes for confirmation prompts |

Examples:

npx kc-switcher --dry-run use kiro
npx kc-switcher --yes restore
npx kc-switcher --verbose status

What changes

use kiro

  • Verifies http://127.0.0.1:9000 is reachable (aborts with no changes if not).
  • Creates the original backup if one does not already exist.
  • Sets ANTHROPIC_BASE_URL=http://127.0.0.1:9000 and ANTHROPIC_API_KEY=anything.
  • Records the active provider as kiro.

use claude

  • Creates a pre-restore safety backup of the current state.
  • Restores the original Claude configuration backup.
  • Removes ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY.
  • Records the active provider as claude.

Backup location

Backups live outside Claude's own config directory:

  • Windows: %APPDATA%\kc-switcher\backups
  • Linux/macOS: ~/.config/kc-switcher/backups

Each backup contains a manifest.json describing every discovered path, whether it existed, and where it was captured.

Platform notes

  • Windows: persistent user environment variables are written to HKCU\Environment and a WM_SETTINGCHANGE broadcast tells new processes to reload them.
  • macOS / Linux: the switch updates the current process and prints the export/removal you should add to your shell profile — persistent writes are not automated.

Local development

Requires Node.js >= 16.7 (for fs.cpSync). No runtime dependencies.

npm test           # run the node:test suite
node bin/kc-switcher.js status   # run the CLI from source

Tests use isolated temp home/config directories and never touch your real Claude configuration or the registry.

Extending

Providers are defined as profiles in src/providers.js. kiro and claude are implemented today; additional gateways (Anthropic API, OpenRouter, LiteLLM, Azure OpenAI, Ollama, LM Studio, OpenAI-compatible endpoints) are registered as planned and surface in kc-switcher list. Add a new provider by registering another profile rather than special-casing the CLI.