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

galaxycodeswitch

v3.10.0

Published

一键配置 Claude Code、Codex 和 GalaxyCode 的命令行工具,支持 YOLO 全自动模式,兼容 Linux/macOS/Windows/Termux

Readme

Galaxy Code Switch 🌌

一键配置 Claude Code、Codex 和 GalaxyCode 的命令行工具

功能特性

一键安装配置 - 自动安装和配置 AI 编码工具 🚀 快速便捷 - 简单的命令行交互界面 🌐 网络检测 - 自动检测服务器延迟 🔧 多工具支持 - 支持 Claude Code、Codex 和 GalaxyCode 💰 余额查询 - 自动显示 API 余额和用户信息 🖥️ 跨平台支持 - 支持 Linux、macOS、Windows、Termux

安装

npm install -g galaxycodeswitch

使用

安装后,运行以下命令启动配置向导:

galaxy

或使用完整命令:

galaxycodeswitch

平台支持

Linux / macOS / Termux

  • 直接运行 galaxy 命令
  • 配置文件保存在 ~/.bashrc~/.zshrc

Windows (Git Bash / WSL / PowerShell)

  • Git Bash / WSL: 直接运行 galaxy 命令
  • cmd: 运行 claude-relay.bat
  • PowerShell: 运行 claude-relay.ps1
  • 环境变量会保存在用户配置中

支持的工具

1. Claude Code

  • URL: https://relay.nf.video
  • 购买订阅: https://nf.video/?gid=102
  • 启动命令:
    • Linux/macOS/Termux: claude-relayclaude
    • Windows cmd: claude-relay.batclaude
    • Windows PowerShell: claude-relay.ps1claude

2. Codex

  • URL: https://relay.nf.video/v1
  • 购买订阅: https://nf.video/?gid=105
  • 启动命令: codex

3. GalaxyCode

  • 功能: 在 Claude Code 中实时查看套餐额度
  • 启动命令: galaxycode

配置选项

运行工具后,你可以选择:

  • [1] 配置 Claude Code - 单独配置 Claude Code
  • [2] 配置 Codex - 单独配置 Codex
  • [3] 安装/更新 GalaxyCode - 安装套餐额度查询工具
  • [4] 配置 Claude Code + Codex 🚀 - 同时配置两个工具
  • [5] 全部安装/更新 ⭐ - 一次性安装所有工具
  • [6] 自定义选择 - 自由选择要安装的工具
  • [7] 更新 galaxycodeswitch - 更新到最新版本(如有可用)
  • [0] 退出

新功能:API 余额查询

版本 3.3.0+ 新增功能:

  • 启动时自动显示 - 如果已配置 API Key,启动时自动显示余额和用户信息
  • 配置后即时反馈 - 配置完成后立即显示账户信息
  • 详细信息展示
    • 💰 每日限额、已使用、剩余额度
    • 📊 使用百分比
    • 🔢 请求次数
    • 👤 用户 ID 和显示名称

相关链接

  • 🌐 银河录像局: https://nf.video/
  • 💻 CC独立站: https://cc.yhlxj.com

系统要求

  • Node.js >= 14.0.0
  • npm >= 6.0.0
  • 操作系统:
    • Linux
    • macOS
    • Windows (Git Bash / WSL / PowerShell)
    • Termux (Android)

配置文件

工具会自动创建以下配置:

Claude Code

  • Linux/macOS/Termux:

    • 环境变量位置: ~/.bashrc~/.zshrc
    • 快捷脚本: /usr/local/bin/claude-relay$PREFIX/bin/claude-relay
  • Windows:

    • 快捷脚本 (cmd): <npm_prefix>/claude-relay.bat
    • 快捷脚本 (PowerShell): <npm_prefix>/claude-relay.ps1

Codex

  • 配置目录: ~/.codex/
  • 配置文件: ~/.codex/config.toml
  • 认证文件: ~/.codex/auth.json

常见问题

如何重新加载配置?

Linux/macOS/Termux:

source ~/.bashrc
# 或
source ~/.zshrc

Windows: 重新启动终端窗口

如何更新 API Key?

重新运行配置工具即可:

galaxy

选择对应的配置选项(如 [1] 或 [2]),输入新的 API Key。

网络连接失败怎么办?

工具会自动检测网络延迟,如果连接失败,请检查:

  1. 网络连接是否正常
  2. relay.nf.video 是否可访问
  3. 防火墙设置
  4. 代理设置(如有)

Windows 上如何使用?

  1. 使用 Git Bash: 直接运行 galaxy 命令,操作与 Linux 相同
  2. 使用 PowerShell: 运行 galaxy,配置后使用 claude-relay.ps1 启动
  3. 使用 cmd: 运行 galaxy,配置后使用 claude-relay.bat 启动

如何查看 API 余额?

  • 方法 1: 配置了 API Key 后,直接运行 galaxy 会自动显示余额信息
  • 方法 2: 重新运行配置流程,完成后会显示当前余额

更新日志

v3.4.0

  • ✨ 新增 Windows cmd 和 PowerShell 支持
  • 🔧 创建 .bat 和 .ps1 快捷脚本
  • 📝 优化跨平台提示信息

v3.3.0

  • ✨ 新增 API 余额查询功能
  • 💰 启动时自动显示账户信息
  • 📊 配置后显示余额和用户信息

v3.2.0

  • 🔧 修复 Termux 环境路径问题
  • 📝 改进菜单提示文字

许可证

MIT

支持

如有问题,请访问 银河录像局 获取帮助。