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

@feijiclaudecodex/claude-proxy

v11.0.1

Published

Claude CLI 代理客户端 - 零配置,开箱即用

Readme

Claude Proxy Client v10.0.5

Windows .cmd 文件执行问题修复

问题描述

之前的版本在 Windows 上执行时会出现以下错误:

SyntaxError: missing ) after argument list
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

这是因为 Node.js 错误地将 Windows 的 .cmd 批处理文件当作 JavaScript 执行。

解决方案

v10.0.2 版本完全重写了 Claude CLI 的查找和启动逻辑:

  1. 智能查找 JS 文件:通过 npm list 和解析 package.json 直接定位到实际的 JavaScript 文件
  2. 避免 .cmd 执行:使用 node 直接执行 JS 文件,而不是通过 .cmd 包装器
  3. 改进的路径解析:正确处理 Windows 路径中的空格和特殊字符

安装使用

1. 安装官方 Claude CLI(必需)

# Windows
npm install -g @anthropic-ai/claude-code

# Linux/Mac
sudo npm install -g @anthropic-ai/claude-code

2. 安装代理客户端(v10.0.5 完整修复 Windows 首启向导)

npm install -g @feijiclaudecodex/[email protected]

3. 使用

# 直接使用
claude-proxy

# 或使用短命令
claude-p
cproxy

核心改进

  1. 新的查找算法

    • 优先通过 npm list 查找全局包位置
    • 解析 package.json 获取准确的入口文件
    • 智能解析 .cmd 文件提取 JS 路径
  2. 直接执行 JS

    spawn('node', [
      '--require', interceptorPath,
      claudePath,  // 直接的 .js 文件路径
      ...args
    ], {
      shell: false  // 关键:不使用 shell
    });
  3. Windows 兼容性

    • windowsVerbatimArguments: true 保持参数原样
    • 正确处理路径分隔符
    • 支持包含空格的路径

验证修复

运行以下命令验证是否正常工作:

claude-proxy --version

如果看到版本信息且未出现“需要登录/选择主题”提示,说明修复成功。 若仍出现,请执行一次:claude-proxy-fix-auth,它会在 Windows 的 APPDATA 目录同步写入配置后再重试。

技术细节

关键文件:claude-windows-fix.js

  • 完全避免执行 .cmd 文件
  • 直接定位并执行 Claude CLI 的 JavaScript 入口
  • 使用 --require 注入请求拦截器
  • 自动设置所有必要的环境变量
  • 采用官方约定的 ~/.claude/.credentials.json 字段(claudeAiOauth + camelCase),并设置 CLAUDE_TOKEN_CACHE,避免首次运行登录/主题选择

问题反馈

如果仍然遇到问题,请提供以下信息:

  1. 操作系统版本
  2. Node.js 版本 (node --version)
  3. NPM 版本 (npm --version)
  4. 错误信息截图或完整输出