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

@jjuidev/cs

v0.0.6

Published

cs (claude switch) is helper CLI to switch claude code provider

Readme

@jjuidev/cs

cs (claude switch) - CLI tool for switching between different Claude API providers.

Features

  • 🔧 Provider Management: Switch between Claude, Claudible, jjuidev, Kimi, and z providers
  • 📝 Configuration Management: Configure tokens, URLs, and models for each provider
  • 🖥️ Shell Integration: Automatically exports environment variables to your shell
  • 🎯 Quick Switching: Instant provider switching with cs <provider>
  • 📊 Provider Listing: View all configured providers and their settings

Quick Start

# Install the CLI
npm install -g @jjuidev/cs

# Or with other package managers
yarn global add @jjuidev/cs
pnpm add -g @jjuidev/cs

Commands

cs <provider> - Switch to Provider

Switch to a configured provider immediately.

# Switch to official Claude
cs claude

# Switch to z provider
cs z

# Switch to Claudible
cs claudible

# Switch to jjuidev
cs jjuidev

# Switch to Kimi
cs kimi

# Switch to MiniMax
cs minimax

cs config -p <provider> - Configure Provider

Configure provider settings including tokens, URLs, and models.

# Set authentication token
cs config -p claude -t sk-ant-api03-...

# Set custom base URL
cs config -p z -u https://api.z.ai/api/anthropic

# Set specific models
cs config -p claude -o claude-opus-4.5 -s claude-sonnet-4.5 -h claude-haiku-4.5

# Configure Kimi provider
cs config -p kimi -t sk-ant-api03-your-token

# Load default configuration
cs config -p claude

Options:

  • -p, --provider <provider> - Provider name (required)
  • -t, --token <token> - Authentication token
  • -u, --url <url> - Custom base URL
  • -o, --opus <model> - Opus model name
  • -s, --sonnet <model> - Sonnet model name
  • -h, --haiku <model> - Haiku model name

cs list - List Providers

List all available providers and their current configurations.

cs list
# or
cs ls

Output:

→ claude:
    URL: https://api.anthropic.com
    Token: sk-ant-****1234
    Opus: claude-opus-4.5
    Sonnet: claude-sonnet-4.5
    Haiku: claude-haiku-4.5

  z:
    URL: https://api.z.ai/api/anthropic
    Token: not set
    Opus: GLM-4.7
    Sonnet: GLM-4.7
    Haiku: GLM-4.5-Air

Current provider: claude

cs current - Show Current Provider

Display the currently active provider.

cs current

Supported Providers

| Provider | Base URL | Default Models | | --------- | ------------------------------ | -------------------------------------------------------------------------------------------- | | claude | https://api.anthropic.com | claude-opus-4.5, claude-sonnet-4.5, claude-haiku-4.5 | | claudible | https://claudible.io | claude-opus-4.5, claude-sonnet-4.5, claude-haiku-4.5 | | jjuidev | https://ai.jjuidev.com | gemini-claude-opus-4-5-thinking, gemini-claude-sonnet-4-5-thinking, gemini-claude-sonnet-4-5 | | kimi | https://api.kimi.com/coding | kimi-k2.5, kimi-k2.5, kimi-k2.5 | | z | https://api.z.ai/api/anthropic | GLM-4.7, GLM-4.7, GLM-4.5-Air | | minimax | https://api.minimax.io/anthropic | MiniMax-M2.1, MiniMax-M2.1, MiniMax-M2.1 |

Configuration

Storage Location

Configuration is stored in ~/.cs/settings.json:

{
	"providers": {
		"claude": {
			"ANTHROPIC_BASE_URL": "https://api.anthropic.com",
			"ANTHROPIC_AUTH_TOKEN": "sk-ant-api03-...",
			"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4.5",
			"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4.5",
			"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5"
		},
		"kimi": {
			"ANTHROPIC_BASE_URL": "https://api.kimi.com/coding",
			"ANTHROPIC_AUTH_TOKEN": "",
			"ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k2.5",
			"ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k2.5",
			"ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k2.5"
		},
		"z": {
			"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
			"ANTHROPIC_AUTH_TOKEN": "",
			"ANTHROPIC_DEFAULT_OPUS_MODEL": "GLM-4.7",
			"ANTHROPIC_DEFAULT_SONNET_MODEL": "GLM-4.7",
			"ANTHROPIC_DEFAULT_HAIKU_MODEL": "GLM-4.5-Air"
		}
	},
	"current": "claude"
}

Claude Code Integration

The CLI automatically updates ~/.claude/settings.json for Claude Code integration:

{
	"env": {
		"ANTHROPIC_BASE_URL": "https://api.anthropic.com",
		"ANTHROPIC_AUTH_TOKEN": "sk-ant-api03-...",
		"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4.5",
		"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4.5",
		"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5"
	}
}

Shell Integration

The CLI automatically updates your shell configuration file (.zshrc, .bashrc, or .config/fish/config.fish):

# cs marker - do not edit
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_AUTH_TOKEN="sk-ant-api03-..."
# cs end marker

After switching providers, run source ~/.zshrc (or your shell equivalent) or restart your shell.

Usage Examples

Complete Setup Flow

  1. Install the CLI
npm install -g @jjuidev/cs
  1. Configure a provider
# Set up Claude provider
cs config -p claude -t sk-ant-api03-your-token-here

# Set up z provider
cs config -p z -t sk-ant-api03-another-token -u https://api.z.ai/api/anthropic
  1. List providers to verify
cs list
  1. Switch providers
# Switch to Claude
cs claude

# Switch to z
cs z

Working with Multiple Providers

# Configure multiple providers
cs config -p claude -t sk-ant-api03-... -o claude-opus-4.5
cs config -p claudible -t sk-ant-api03-... -o claude-sonnet-4.5
cs config -p jjuidev -t sk-ant-api03-... -o gemini-claude-opus-4-5-thinking
cs config -p kimi -t sk-ant-api03-... -o kimi-k2.5
cs config -p minimax -t sk-ant-api03-... -o MiniMax-M2.1

# View all configurations
cs list

# Quickly switch between them
cs claude      # Use Claude
cs jjuidev     # Switch to jjuidev
cs claudible   # Switch to Claudible
cs kimi        # Switch to Kimi
cs minimax     # Switch to MiniMax

Troubleshooting

Common Issues

Provider not found

cs invalid-provider
# Error: Invalid provider: invalid-provider
# Info: Valid providers: claude, claudible, jjuidev, kimi, z, minimax

Missing token

cs z
# Warning: No auth token set for provider "z"
# Info: Set token with: cs config -p z -t <your-token>

Shell integration not working

# After switching providers, restart your shell or run:
source ~/.zshrc  # for zsh
source ~/.bashrc # for bash

Debug Mode

Enable debug logging for troubleshooting:

# Set debug environment variable
export DEBUG=cs:*

# Run commands with debug output
cs list
cs current

Development

Building from Source

# Clone the repository
git clone https://github.com/jjuidev/cs.git
cd cs

# Install dependencies
npm install

# Build the project
npm run build

# Test the build
node dist/cli/cs-cli.cjs --help

Project Structure

src/
├── cli/                    # CLI interface
│   ├── actions/           # Command handlers
│   └── cs-cli.ts         # Main entry point
├── config/                # Configuration management
├── shell/                 # Shell integration
├── types/                 # TypeScript types
└── index.ts               # Library entry point

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Quick Start for Contributors

# Make your changes
npm run build

# Test your changes
npm install -g .
cs --help

# Create a changeset
npm run changeset

# Commit your changes
git commit -m "feat: your feature"

Changelog

See CHANGELOG.md for release history.

License

MIT

Author

jjuidev [email protected]