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

fogact

v1.2.23

Published

FogAct activation helper for Claude Code and Codex

Downloads

4,935

Readme

FogAct

FogAct 是一个简单的 Claude Code / Codex 激活工具。它的使用方式要和 npx fogact 一样:用户只运行一个命令,进入菜单,输入激活码,FogAct 自动识别 Codex / Claude 能力并写入本地配置。

English | 简体中文

开始使用

npx fogact

这是给用户看的主命令。运行后会打开交互菜单:

╭─────────────────────────────────────╮
│          FogAct 激活器              │
│    Claude Code / Codex 配置工具     │
╰─────────────────────────────────────╯

? 请选择操作:
  1. 激活服务
  2. 测试节点
  3. 恢复备份
  4. 退出

不要运行 npm fogact;npm 会把它当成 npm 子命令。正确方式是 npx fogact

FogAct 启动时会自动检查 npm 最新版本;检测到旧版本会先更新,再进入菜单。激活码默认连接公网面板 https://act.fogidc.com,旧域名 https://cliproxy.fogidc.com 继续兼容;需要切换测试后端时可设置 FOGACT_API_BASE。需要跳过更新检查时可设置 FOGACT_SKIP_UPDATE=1

一键安装

推荐命令:

bash <(curl -sL https://act.fogidc.com/fogact.sh)

安装完成后运行:

fogact

没有 bash 的精简系统可以使用兼容写法:

curl -fsSL https://act.fogidc.com/install.sh | sh

带激活参数的一键命令:

bash <(curl -sL https://act.fogidc.com/fogact.sh) --service codex --code YOUR_CODE

安装入口会自动判断网络区域:国内网络优先下载 Gitee 版安装脚本,再回退 GitHub;海外网络优先 GitHub,再回退 Gitee。安装时默认使用源码模式,git clone 也会在 GitHub/Gitee 间自动切换。镜像仓库不是 FogMaly/fogact 时,可以指定仓库或完整 URL:

FOGACT_GITEE_REPO=your/fogact bash <(curl -sL https://act.fogidc.com/fogact.sh)
bash <(curl -sL https://act.fogidc.com/fogact.sh) --code-host custom --git-url https://gitee.com/your/fogact.git

旧域名仍可使用:

bash <(curl -sL https://cliproxy.fogidc.com/fogact.sh)

macOS 上如果没有检测到 Codex.app,交互安装会询问是否安装 Codex Desktop DMG;非交互环境默认跳过,可用 FOGACT_INSTALL_CODEX_DMG=1--install-codex-dmg 强制安装。DMG 默认走当前域名缓存代理:

https://act.fogidc.com/downloads/codex/macos/arm64.dmg
https://act.fogidc.com/downloads/codex/macos/x64.dmg

服务端会把 OpenAI 官方最新 DMG 缓存在 data/codex-dmg-cache/,可用 FOGACT_CODEX_DMG_CACHE_DIRFOGACT_CODEX_DMG_CACHE_TTL_SECONDS 调整。

用户操作流程

  1. 运行 npx fogact
  2. 选择 1. 激活服务
  3. 输入激活码 / 兑换码。
  4. FogAct 自动识别 Codex / Claude 能力,并只展示可激活的平台。
  5. 确认激活后自动写入配置,然后重启对应工具。

FogAct 写入新配置前会自动备份旧配置。

支持目标

| 目标 | 默认行为 | | --- | --- | | Codex CLI | 写入 ~/.codex/config.toml~/.codex/auth.json | | Claude Code | 写入 ~/.claude/settings.json~/.claude.json | | OpenCode | 已安装或由向导选择时配置 | | OpenClaw | 已安装或由向导选择时配置 | | VSCode / Cursor Codex 插件 | 仅在检测到兼容插件文件时修补 |

高级入口

普通用户只需要 npx fogact。管理员仍可使用:

fogact web

Web UI 默认地址是 http://localhost:34020/。需要时可以设置 PORTADMIN_PASSWORDNEWAPI_BASE_URLNEWAPI_API_KEYFOGACT_API_BASEFOGACT_UPSTREAM_CONFIG

代理额度会真实对接上游 NewAPI 数据结算。FogAct 优先用响应头 x-oneapi-request-id 匹配 GET /api/log/token 的单次请求日志扣费,无法匹配时再回退到 GET /api/usage/tokentotal_used 差值;可在 config/upstream.jsonusageSync 中调整。

用户代理请求默认会对 408、429、500、502、503、504 和网络错误重试 2 次。可用 usageSync.proxyRetriesusageSync.proxyRetryDelayMs 调整;usageSync.retries / retryDelayMs 只用于上游用量查询接口。

上游支持模型在 config/upstream.jsonmodels.codexmodels.claude 中维护,也可在管理后台系统设置里编辑。新建激活码默认继承对应服务模型列表,代理请求会按激活码的 allowedModels 校验请求中的 model。需要临时覆盖时可设置 FOGACT_CODEX_MODELSFOGACT_CLAUDE_MODELS,用逗号分隔模型 ID。

项目链接

  • GitHub: https://github.com/FogMaly/fogact
  • npm: https://www.npmjs.com/package/fogact
  • 备份目录:~/.fogact/backups/

开发

npm install
npm test
npm run web