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

@pterchan/clap

v0.2.7

Published

Multi-Tool Profile Manager — A lightweight TUI for managing Claude Code, Codex, Gemini CLI & OpenCode configs. 17+ built-in provider presets, MCP management, tab-based tool switching.

Readme

clap

English | 简体中文 | 繁體中文 | 한국어 | 日本語 | Español

⚡️ 在 Claude Code 中一鍵切換 DeepSeek、Anthropic、矽基流動!

輕量級光速 TUI 設定 & MCP 伺服器管理器,支援 Claude Code、Codex、Gemini CLI 和 OpenCode。告別手動編輯 .json.env 檔案。

License: MIT

✨ 特性

  • 🚀 零設定切換: 一鍵在 Claude Code、Gemini CLI 等多個工具間切換設定。
  • 🐳 內建 17+ 供應商預設: 預先配置了 DeepSeek V4、Kimi、OpenRouter、矽基流動、AWS Bedrock、Azure、Groq、Together AI 等。
  • 🔌 即時 MCP 管理: 隨時新增/刪除 Model Context Protocol 伺服器,原子寫入保障安全。
  • 🛡️ 安全優先: 智慧啟用警告,防止覆蓋未備份的憑據。
  • 🖱️ 終端機滑鼠支援: 終端機內完整滑鼠導覽、點擊和捲動。
  • 🌐 多語言: English, 简体中文, 繁體中文, 日本語 — 自動偵測或一鍵切換。

安裝

透過 npm

npm install -g @pterchan/clap

透過 curl

curl -fsSL https://raw.githubusercontent.com/pterchan/Clap/main/install.sh | bash

或者在本機安裝:

./install.sh

用法

clap                   # 開啟 TUI
clap ls                # 列出目前工具的預設
clap use <name>        # 啟用預設
clap current           # 顯示目前啟用的預設
clap backup <name>     # 將目前設定儲存為預設
clap diff <name>       # 比對預設與目前設定
clap backups           # 列出備份
clap restore <name>    # 復原備份
clap apps              # 列出支援的工具
clap app <name>        # 切換預設工具(claude/codex/gemini/opencode)
clap lang [code]       # 顯示/設定語言(zh-CN, zh-TW, ja, en)

支援的工具

| 工具 | 設定檔 | 格式 | |-----|---------|------| | Claude Code | ~/.claude/settings.json | JSON | | Codex | ~/.codex/auth.json + ~/.codex/config.toml | JSON + TOML | | Gemini CLI | ~/.gemini/.env | KEY=VALUE | | OpenCode | ~/.config/opencode/opencode.json | JSON |

TUI 快捷鍵

| 按鍵 | 功能 | 按鍵 | 功能 | |------|------|------|------| | / / j / k | 移動 | Enter | 啟用 | | e | 編輯 | n | 新增 | | d | 複製 | R | 重新命名 | | D | 刪除 | / | 篩選 | | = | 比對 | b | 查看備份 | | r | 重新整理 | o | 開啟預設資料夾 | | Tab | 切換工具 | p | 內建預設庫 | | m | MCP 管理 | q | 離開 |

滑鼠支援

TUI 支援滑鼠操作:

  • 點擊 Tab 標籤(第 1 行)切換工具
  • 點擊 預設列表中的項目來啟用
  • 點擊 底部的快捷鍵標籤觸發對應操作(endD/=bropmq
  • 滾輪 滾動預設列表

在搜尋、文字輸入和確認提示期間,滑鼠輸入會被禁用,以防止誤操作。

啟用警告

啟用預設時,clap 會將其憑證(API key、Base URL、模型)與所有已儲存的預設進行比對:

  • 無需警告 — 目前 live config 的憑證已被任意一個已儲存的預設覆蓋(可安全切換)。
  • 部分匹配 — 相同的供應商或 Base URL,但憑證不同(例如不同帳戶)。提醒你考慮先將目前設定儲存為新預設。
  • 無匹配 — 全新的供應商,Base URL 和 API key 均不匹配。提醒你在遺失前儲存目前設定。

y 繼續,其他鍵取消。

內建供應商預設

在 TUI 中按 p 瀏覽 17+ 個內建供應商預設,包括:

  • Claude Code: Anthropic 官方、DeepSeek、Kimi、矽基流動、OpenRouter、AWS Bedrock、Azure、Groq、Together AI
  • Codex: OpenAI 官方、OpenRouter、DeepSeek
  • Gemini CLI: Google 官方、OpenRouter
  • OpenCode: Anthropic 官方、DeepSeek

選擇一個即可自動填入範本——只需填入 API key。

MCP 管理

在 TUI 中按 m(Claude Code 模式)管理 MCP 伺服器:

  • a — 新增 MCP 伺服器(名稱 → 指令 → 參數)
  • D — 刪除選中的 MCP 伺服器

修改以原子寫入方式儲存至 ~/.claude/settings.json