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

@nogataka/cloud-code-switcher

v0.0.3

Published

Switch Claude Code providers via CLI and Web UI

Readme

cloud-code-switcher

Claude Code のプロバイダーを CLI / Web UI から切り替えるツールです。

Cloud Code Switcher

対応プロバイダー

| ID | プロバイダー | 認証 | |----|-------------|------| | claude | Claude (Default) | 不要 | | azure | Azure Anthropic (Foundry) | 必要 | | glm | GLM (Zhipu AI) | 必要 | | ollama | Ollama (Local) | 不要 | | kimi | Kimi (Moonshot) | 必要 | | custom | Custom Provider | 必要 |

インストール

npm install -g cloud-code-switcher

使い方

現在の設定を表示

cc-switch show
provider: claude
default_tier: sonnet
model: claude-opus-4-1
model_opus: claude-opus-4-1
model_sonnet: claude-opus-4-1
model_haiku: claude-opus-4-1
base_url: -
auth: missing
updated_at: 2025-01-01T00:00:00.000Z

シェル環境変数をエクスポート

eval "$(cc-switch env)"

現在の設定に基づいた export / unset コマンドを出力します。 .bashrc / .zshrc に追加すれば、シェル起動時に自動適用できます。

# ~/.bashrc or ~/.zshrc
eval "$(cc-switch env)"

Web UI を起動

cc-switch ui

ブラウザが開き、GUI でプロバイダーやモデルを切り替えられます。

| 環境変数 | 説明 | デフォルト | |---------|------|-----------| | CC_SWITCH_HOST | リッスンアドレス | 127.0.0.1 | | CC_SWITCH_PORT | リッスンポート | 8787 |

プロバイダー環境で claude を起動

cc-switch run

設定済みの環境変数を付与して claude を起動します。 引数はそのまま claude に渡されます。

# claude を起動
cc-switch run

# オプション付きで起動
cc-switch run --dangerously-skip-permissions
cc-switch run --model sonnet

設定ファイル

状態は ~/.config/cloud-code-switcher/state.json に保存されます。

{
  "provider": "claude",
  "default_tier": "sonnet",
  "model": "claude-opus-4-1",
  "model_opus": "claude-opus-4-1",
  "model_sonnet": "claude-opus-4-1",
  "model_haiku": "claude-opus-4-1",
  "base_url": null,
  "auth_token": "",
  "updated_at": "2025-01-01T00:00:00.000Z"
}

開発

セットアップ

# リポジトリをクローン
git clone https://github.com/your-name/cloud-code-switcher.git
cd cloud-code-switcher

# 依存関係のインストール
npm install

# ビルド (esbuild)
npm run build

開発時の実行方法

グローバルインストールせずにローカルで動作確認するには npm run dev を使います。 cc-switch コマンドの代わりに npm run dev の後にサブコマンドを指定してください。

# ヘルプを表示
npm run dev

# 現在の設定を表示
npm run dev show

# シェル環境変数をエクスポート
npm run dev env

# Web UI を起動
npm run dev ui

# プロバイダー環境で claude を起動
npm run dev run
npm run dev run -- --dangerously-skip-permissions

プロジェクト構成

src/          TypeScript ソースコード
bin/          エントリポイント (bin/cc-switch.js)
dist/         ビルド出力 (esbuild)
static/       Web UI の静的ファイル

設定ファイルの場所

開発時もグローバルインストール時も、設定は同じパスに保存されます。

| ファイル | 内容 | |---------|------| | ~/.config/cloud-code-switcher/state.json | プロバイダー設定・モデル情報 | | ~/.config/cloud-code-switcher/processes.json | run で起動したプロセスの管理 |

ライセンス

MIT