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

@wilson_janet/claude-code-model-switch

v1.6.0

Published

A CLI tool to manage Claude Code model switching with multiple configurations

Readme

Claude Code Model Manager

A CLI tool to manage multiple Claude Code model configurations with easy switching.

中文文档: README-zh.md | Chinese Documentation: README-zh.md

Features

  • ✅ Multiple model configuration management
  • ✅ Quick model switching
  • ✅ Configuration change history
  • ✅ Cross-platform support (Windows, Mac, Linux)
  • ✅ Local data storage
  • ✅ Track last selected model
  • ✅ Interactive mode available
  • ✅ Direct claude launcher (run cm to launch claude with current model)
  • ✅ Automatic --dangerously-skip-permissions flag for seamless file access

Installation

Prerequisites

Install Globally (Recommended)

npm install -g @wilson_janet/claude-code-model-switch

# Verify installation
cm --version

Quick Start

  1. Add your first model configuration:

    cm add -n my-config -t YOUR_TOKEN -b https://api.anthropic.com -d "My config"
  2. Run claude with your model:

    cm

Advanced Model Configuration

You can optionally specify default models for each Claude model tier:

cm add -n production \
  -t sk-ant-xxx \
  -b https://api.anthropic.com \
  -d "Production environment" \
  --opus-model claude-opus-4-5-20251101 \
  --sonnet-model claude-sonnet-4-5-20250929 \
  --haiku-model claude-haiku-4-5-20251001

These optional model configurations will be passed to Claude Code as environment variables:

  • ANTHROPIC_DEFAULT_OPUS_MODEL
  • ANTHROPIC_DEFAULT_SONNET_MODEL
  • ANTHROPIC_DEFAULT_HAIKU_MODEL

If not specified, Claude Code will use its official default values.

Common Commands

| Command | Description | Example | |---------|-------------|---------| | cm | Launch claude with current model | cm | | cm add | Add new model config | cm add -n dev -t sk-ant-xxx -b https://api.anthropic.com | | cm update [name] | Update model config (interactive if no name) | cm update dev -n "dev-new" -d "Updated" | | cm use [name] | Switch model and launch Claude (interactive if no name) | cm use or cm use dev | | cm current | Show current model | cm current | | cm history | Show change history | cm history -l 20 | | cm interactive | Menu-driven mode | cm interactive |

Examples

Managing Multiple Environments

# Add different environments
cm add -n dev -t sk-dev-xxx -b https://api.anthropic.com -d "Development"
cm add -n staging -t sk-staging-xxx -b https://api.anthropic.com -d "Staging"
cm add -n production -t sk-prod-xxx -b https://api.anthropic.com -d "Production"

# Switch between them
cm use dev
cm use production

# Update a model
cm update dev -n staging -d "Moved to staging"

Interactive Mode

For a user-friendly menu interface:

cm interactive

Interactive mode now supports configuring default models per tier when adding a new model. Select "Add a new model" and you can optionally set default models for Opus, Sonnet, and Haiku.

In addition to adding, interactive mode also supports updating model configurations (Update a model), allowing you to modify model names, descriptions, tokens, base URLs, and default configurations for each model tier.

Safety Notes

  • API tokens are stored in plain text in your local config file
  • Configurations are stored locally at:
    • macOS/Linux: ~/.config/claude-model-manager/
    • Windows: %APPDATA%\claude-model-manager\
  • Keep your config directory secure

Development

For developers who want to contribute or understand the technical details, see DEVELOPMENT.md.

License

MIT