Skip to content
PluginStats

aihezu weekly downloads statistics

By aihezu · npm · Claude Code

AI 开发环境配置工具 - 支持 Claude Code, Codex, Google Gemini 的本地化配置、代理设置与缓存清理

View on npm Outdated · Nov 26, 2026

aihezu has 2,527 recorded weekly downloads on npm, a decrease of 7.0% over the past 30 days, ranking #1805 of 3,247 tracked listings.

Weekly downloads
2,527
Official API · Dec 5, 2026
7-day growth
+2.1%
+53 weekly downloads
30-day growth
-7.0%
-191 weekly downloads
90-day growth
-1.4%
-35 weekly downloads
Rank
#1805
▼ 85 in 7 days

About aihezu

aihezu - Claude Code CLI 工具集

快速配置或清理 Claude Code / Codex,本地修改 hosts 并提供企业独立域名支持。

功能特性

  • 🔑 一键配置 Claude(默认)或 Codex,支持企业独立域名(--api / --api-url)
  • 🧹 一键清理 Claude Code CLI 的所有本地数据
  • 🌐 自动修改 hosts 文件,将 Anthropic 域名指向本地
  • 📦 自动备份配置文件和 hosts 文件(带时间戳)
  • ✅ 安全可靠,不会丢失数据
  • 🚀 支持 npx 直接运行,无需安装
  • 🔄 自动刷新 DNS 缓存

命令列表

  • ccinstall / install:交互式配置 Claude(默认)或 Codex
    • Claude:默认 https://cc.aihezu.dev/api,企业可用 --api / --api-url 指定独立域名
    • Codex:默认 https://cc.aihezu.dev/openai,企业可用 --api / --api-url 指定独立域名;写入 ~/.codex/config.toml 和 auth.json,使用 OPENAI_API_KEY
  • ccclear:清理 Claude Code 缓存和配置
  • usage:查看 Claude Code / Codex / Gemini 用量统计(支持 --key 指定 API Key)

清理内容

该工具会执行以下操作:

1. 修改 hosts 文件
  • 将 statsig.anthropic.com 指向 127.0.0.1
  • 将 api.anthropic.com 指向 127.0.0.1
  • 如果已存在这些域名的解析,会先移除旧记录再添加新记录
  • 自动备份 hosts 文件(带时间戳)
  • 自动刷新 DNS 缓存
2. 清理 Claude Code 配置
  • ~/.claude/ - Claude Code 主数据目录(包括缓存、历史、项目等)
  • ~/.claude.json - Claude Code 全局配置文件

使用方法

⚠️ 重要提示:由于需要修改系统 hosts 文件,必须使用管理员权限运行!

macOS / Linux 用户

使用 sudo 命令运行:

sudo npx aihezu install
sudo npx aihezu ccclear
Windows 用户

需要以管理员身份运行 PowerShell 或命令提示符:

  1. 搜索 "PowerShell" 或 "命令提示符"
  2. 右键点击,选择 "以管理员身份运行"
  3. 在打开的窗口中运行命令(无需 sudo):
npx aihezu install
npx aihezu ccclear

Windows 特别说明:

  • hosts 文件位置:C:\Windows\System32\drivers\etc\hosts
  • 某些防病毒软件可能会保护 hosts 文件,需要临时禁用
  • 推荐使用 PowerShell 配置文件设置环境变量,而不是系统环境变量
配置 Claude Code(ccinstall / install)
  • 默认域名:
sudo npx aihezu install
  • 企业独立域名(支持传入域名或完整 URL,自动补全为 /api):
sudo npx aihezu install --api https://your-org.aihezu.dev
# 或
sudo npx aihezu install --api your-org.aihezu.dev

也可以全局安装后运行:

npm install -g aihezu
sudo ccinstall --api your-company.aihezu.dev
  • 直接选择 Codex(可在交互中选择,也可用参数指定):
sudo npx aihezu install --provider codex
# Codex 企业独立域名(自动补全为 /openai)
sudo npx aihezu install --provider codex --api your-org.aihezu.dev
清理 Claude Code(ccclear)
  • 使用 npx(推荐):
sudo npx aihezu ccclear
  • 全局安装后运行:
npm install -g aihezu
sudo ccclear
查看用量(usage)

无需管理员权限:

npx aihezu usage

指定服务:

npx aihezu usage cc

指定 API Key:

npx aihezu usage --key sk-xxx
npx aihezu usage cc --key sk-xxx

运行效果

🧹 Claude Code CLI 清理工具
🌐 Powered by https://aihezu.dev

=== 步骤 1: 修改 hosts 文件 ===

🔧 开始修改 hosts 文件...
📦 已备份 hosts 文件到 /etc/hosts.backup-20250113120000
✅ hosts 文件修改成功!
   已添加/更新以下域名解析:
   - statsig.anthropic.com -> 127.0.0.1
   - api.anthropic.com -> 127.0.0.1
🔄 DNS 缓存已刷新

=== 步骤 2: 清理 Claude Code 配置 ===

📦 备份 ~/.claude 到 .claude-20250113120000
📦 备份 ~/.claude.json 到 .claude.json-20250113120000

✅ Claude Code CLI 配置和缓存已清理完成!
💡 下次启动 Claude Code 时将重新初始化
📁 备份文件保存在 /Users/yourname/ 目录下

=== 全部完成 ===
更多服务请访问 AI 合租官网:https://aihezu.dev

恢复备份

恢复 Claude Code 配置

如需恢复之前的配置,只需将备份文件重命名:

# 恢复目录
mv ~/.claude-20250113120000 ~/.claude

# 恢复配置文件
mv ~/.claude.json-20250113120000 ~/.claude.json
恢复 hosts 文件
# macOS/Linux
sudo mv /etc/hosts.backup-20250113120000 /etc/hosts

# Windows (以管理员身份运行)
move C:\Windows\System32\drivers\etc\hosts.backup-20250113120000 C:\Windows\System32\drivers\etc\hosts

使用场景

  • Claude Code CLI 出现异常需要重置
  • 需要通过本地代理使用 Claude API
  • 清理大量累积的缓存和日志
  • 切换不同的配置环境
  • 重新初始化 Claude Code CLI

工作原理

  1. hosts 文件修改:将 Anthropic 相关域名指向本地 127.0.0.1,配合本地代理使用
  2. 配置清理:备份并清理 Claude Code 的配置和缓存
  3. 安全备份:所有修改前都会创建带时间戳的备份文件

系统要求

  • Node.js >= 14.0.0
  • macOS / Linux / Windows (完整跨平台支持)
  • 需要管理员/root 权限(用于修改 hosts 文件)

平台支持:

  • ✅ macOS - 完整支持,包括权限修复和 DNS 刷新
  • ✅ Linux - 完整支持,支持多种 DNS 服务(systemd-resolve, nscd)
  • ✅ Windows - 完整支持,提供平台特定的指导和错误提示

更多 Windows 安装和配置信息,请参阅 Windows 设置指南。

许可证

MIT

问题反馈

如有问题或建议,欢迎提 Issue。

Description from the npm listing.

  • ai
  • cli
  • proxy
  • claude
  • claude-code
  • codex
  • gemini
  • configuration
  • hosts
  • cross-platform
  • windows
  • macos
  • linux

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

aihezu weekly downloads on npm, last 90 days: 2,527 weekly downloads as of Dec 5, 2026, -1.4% over 90 days.aihezuWeekly downloads on npm · Last 90 days2,527downloads / week-1.4% over 90 days1K1.5K2K2.5K3KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
aihezu weekly downloads on npm, last 90 days: 2,527 weekly downloads as of Dec 5, 2026, -1.4% over 90 days.

7/30/90-day growth

aihezu weekly downloads growth on npm: +2.1% over 7 days, -7.0% over 30 days, -1.4% over 90 days.aihezuWeekly downloads growth on npm2,527downloads / week now7-day growth+53 weekly downloads+2.1%30-day growth-191 weekly downloads-7.0%90-day growth-35 weekly downloads-1.4%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
aihezu weekly downloads growth on npm: +2.1% over 7 days, -7.0% over 30 days, -1.4% over 90 days.

Ranking history

aihezu npm ranking history: currently #1805 (by weekly downloads).aihezunpm ranking · by weekly downloads · Last 90 days#1805current rank#400#600#800#1000#1200#1400#1600#1800#2000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 30 observations · Updated Dec 5, 2026pluginstats.com
aihezu npm ranking history: currently #1805 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 91, #5 (overall #1,805)
All npm: every listing in weekly downloads order

Listing placement

Claude Code614 listings · 31 pages · page 16, #9 (overall #309)
Claude Code: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for aihezu
Date (UTC)Weekly downloadsChange vs. previous
2,527-406
2,933+4
2,929+153
2,776+54
2,722-13
2,735-48
2,783+309
2,474-387
2,861-6
2,867+7
2,860+12
2,848+10
2,838+40
2,798—

Similar npm Claude Code plugins

All 20 aihezu alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/aihezu. First seen Oct 16, 2026; last successful collection Nov 26, 2026. See the methodology.