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

claudegate

v1.0.1

Published

Terminal utility to switch between AI provider configurations for Claude CLI

Readme

ClaudeGate


ClaudeGate is a terminal utility that wraps Claude CLI, enabling you to switch between multiple AI providers (Anthropic, OpenRouter, DeepSeek, Z.AI, MiniMax, Kimi K2, and more) without modifying your Claude configuration. Select your provider, choose your models, and start coding.

Why ClaudeGate?

Claude CLI is powerful, but switching between different AI providers requires manually setting environment variables or editing config files. ClaudeGate solves this by providing:

  • One-click provider switching — Interactive menu to select your AI backend
  • Dynamic model selection — Fetch and select models directly from provider APIs
  • Three-tier model mapping — Configure Haiku, Sonnet, and Opus alternatives
  • Profile management — Save multiple configurations for different use cases
  • Zero config pollution — Never modifies your ~/.claude/settings.json
  • Full CLI passthrough — All Claude arguments work exactly as expected

Supported Providers

| Provider | Description | Live Model Fetching | |----------|-------------|:-------------------:| | Anthropic | Native Claude CLI configuration | — | | Z.AI | Cost-effective GLM-4.6/4.7 models | ✓ | | OpenRouter | Access 320+ models through single API | ✓ | | Kimi K2 | Up to 90% cost savings with Moonshot AI | ✓ | | MiniMax | Agent-native M2/M2.1 models for coding | ✓ | | DeepSeek | 128K context models with reasoning | ✓ | | Novita AI | Novita AI provider support | ✓ | | Custom | LiteLLM, HuggingFace TGI, any compatible endpoint | — |

Get Started

Prerequisites

  • Node.js >= 18.0.0
  • Claude CLI installed and configured
  • API keys for your desired providers

Installation

npm install -g claudegate

Quick Start

# Launch ClaudeGate - shows profile selector, then starts Claude
claudegate

# Or use the short alias
cc

# All Claude CLI arguments work as expected
claudegate -p "explain this code"
claudegate --resume
cc -p "help me debug this"

How It Works

┌─────────────────────────────────────────────────────────────┐
│                        CLAUDEGATE                           │
└─────────────────────────────────────────────────────────────┘

? Select active profile:
❯ ● work-anthropic (Anthropic) [current]
    zai-dev (Z.AI - GLM Models)
    openrouter-gpt4 (OpenRouter)
    deepseek-v3 (DeepSeek)
    minimax-m2 (MiniMax)
  ─────────────────────────────────────
    + Add new profile
    ⚙ Manage profiles
  1. Select Profile — Choose which AI provider to use
  2. Launch Claude — Claude CLI starts with the correct environment
  3. Work normally — All your usual Claude workflows just work

Features

Dynamic Model Selection

ClaudeGate fetches available models live from provider APIs. When creating or editing a profile, you can select models for each tier:

? Select model for HAIKU (fast/cheap tasks):
  ○ Skip (use provider default)
  ○ deepseek-chat (Recommended)
  ○ deepseek-reasoner
  ○ Enter custom model ID...

? Select model for SONNET (balanced tasks):
  ○ Skip (use provider default)
  ○ deepseek-chat (Recommended)
  ○ deepseek-reasoner
  ○ Enter custom model ID...

? Select model for OPUS (complex reasoning):
  ○ Skip (use provider default)
  ○ deepseek-reasoner (Recommended)
  ○ deepseek-chat
  ○ Enter custom model ID...

Three-tier model mapping: | Tier | Use Case | |------|----------| | Haiku | Fast/cheap tasks (quick edits, simple queries) | | Sonnet | Balanced tasks (most common usage) | | Opus | Complex reasoning (architecture, debugging) |

Models are saved with your profile—no need to reselect every time.

Profile Management

Adding a Profile

Select "+ Add new profile" from the menu:

  1. Choose a provider (Z.AI, OpenRouter, DeepSeek, MiniMax, etc.)
  2. Enter a profile name (e.g., work-deepseek)
  3. Enter required credentials (API keys, endpoints)
  4. Select models for Haiku, Sonnet, and Opus tiers
  5. Profile is saved and ready to use

Managing Profiles

Select "⚙ Manage profiles" to:

| Action | Description | |--------|-------------| | Edit | Update profile name or credentials | | Change Models | Select different models for each tier | | Delete | Remove a profile | | Test | Verify configuration and view current models |

Provider Setup

  • Models: GLM-4.7, GLM-4.6, GLM-4.5-air
  • Endpoint: https://api.z.ai/api/anthropic
  • Get API key: z.ai/manage-apikey
  • Models: deepseek-chat (V3), deepseek-reasoner (thinking mode)
  • Endpoint: https://api.deepseek.com
  • Get API key: platform.deepseek.com
  • 128K context window, extremely cost-effective
  • Models: MiniMax-M2.1 (230B), MiniMax-M2
  • Endpoint: https://api.minimax.io/anthropic
  • Get API key: platform.minimax.io
  • Optimized for coding and agentic workflows
  • Access 320+ models from multiple providers
  • Endpoint: https://openrouter.ai/api
  • Get API key: openrouter.ai/keys
  • Models: kimi-k2-0711-preview
  • Endpoint: https://api.moonshot.ai/anthropic
  • Get API key: platform.moonshot.ai

Configuration

Profiles are stored in ~/.claudegate/config.json:

{
  "version": "1.0.0",
  "activeProfileId": "abc-123",
  "profiles": [
    {
      "id": "abc-123",
      "name": "deepseek-dev",
      "providerId": "deepseek",
      "envVars": {
        "ANTHROPIC_AUTH_TOKEN": "sk-xxx",
        "ANTHROPIC_BASE_URL": "https://api.deepseek.com"
      },
      "selectedModels": {
        "haiku": { "id": "deepseek-chat", "name": "DeepSeek Chat V3" },
        "sonnet": { "id": "deepseek-chat", "name": "DeepSeek Chat V3" },
        "opus": { "id": "deepseek-reasoner", "name": "DeepSeek Reasoner" }
      }
    }
  ]
}

Environment Variables

ClaudeGate sets these environment variables based on your profile:

| Variable | Description | |----------|-------------| | ANTHROPIC_BASE_URL | Provider API endpoint | | ANTHROPIC_AUTH_TOKEN | API authentication token | | ANTHROPIC_DEFAULT_HAIKU_MODEL | Model for Haiku-tier requests | | ANTHROPIC_DEFAULT_SONNET_MODEL | Model for Sonnet-tier requests | | ANTHROPIC_DEFAULT_OPUS_MODEL | Model for Opus-tier requests |

Security

  • Config stored with 0600 permissions (owner read/write only)
  • API keys stored locally, never transmitted except to configured providers
  • Sensitive values masked during input

Troubleshooting

which claude  # Should show Claude CLI path

If not found, install Claude CLI first: docs.anthropic.com/en/docs/claude-code

chmod 700 ~/.claudegate
chmod 600 ~/.claudegate/config.json

Use the "Test" option in profile management to verify credentials.

If live model fetching fails:

  1. Check your API key is valid
  2. Fallback models will be shown
  3. You can always enter a custom model ID

Uninstall

npm uninstall -g claudegate
rm -rf ~/.claudegate

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

This project uses Conventional Commits for automatic versioning.

Star History

License

MIT