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

athn-cli

v0.1.8

Published

ATHN 智转客户端一键配置助手

Readme

ATHN CLI

ATHN 智转客户端一键配置助手。它会校验 API Key、读取当前分组的可用模型,并为 Codex、Claude Code、OpenCode 或通用 OpenAI 环境变量生成配置。交互模式会为每个客户端分别选择启动时的默认模型,但不会根据 /v1/models 返回的端点标签拦截模型;该标签不是分组实际路由能力的权威判断。选择模型仅用于设置客户端启动时的默认模型,不会限制 API Key 使用其他模型。

npx --yes athn-cli@latest

默认 API 地址为 https://api.athn.cc。如需连接其他部署地址,可以使用 --base-url 覆盖。

安全行为

  • 交互输入 API Key 时显示明文,方便核对。
  • 检测到已有 ATHN_API_KEY 环境变量时仍会提示输入;输入新 Key 会覆盖本次配置,直接回车才沿用已有 Key。
  • 修改已有配置文件前生成带时间戳的备份。
  • JSON 配置无法解析时立即停止,不覆盖原文件。
  • Codex API Key 单独保存在 ~/.codex/athn-api-key;Codex 通过认证命令读取,不依赖终端环境变量,因此从桌面图标启动也可以使用。
  • 自动把旧版 Codex 配置中的 service_tier = "priority" 迁移为当前兼容的 service_tier = "fast"。
  • Codex Desktop 尚未设置界面语言时,自动写入 localeOverride = "zh-CN";已经明确选择其他语言时保持原设置。
  • 选择 GPT-5.6 系列模型但检测到旧版 Codex CLI 时,会给出升级命令;gpt-5.6-sol 需要使用包含其模型元数据的新版 Codex。
  • Claude Code 把网关、凭据和当前模型变量合并到 ~/.claude/settings.json,并自动移除已经废弃的 ANTHROPIC_SMALL_FAST_MODEL。
  • OpenCode API Key 单独保存在 ~/.config/opencode/athn-api-key,配置通过官方的 {file:...} 语法读取,不依赖 shell 环境变量。
  • “通用 OpenAI 环境变量”只写入 OPENAI_API_KEY 和 OPENAI_BASE_URL,不会代替其他三个客户端各自的配置。
  • 同时选择多个客户端时,每个客户端分别选择默认模型;--model 非交互参数只要存在于当前 API Key 的可用模型列表中即可使用。
  • 支持 --dry-run 只预览计划。
  • 不会自动发送产生费用的模型请求;校验只读取 /v1/models,不根据端点分类标签阻止配置。

非交互模式

ATHN_API_KEY=sk-xxx npx --yes athn-cli@latest \
  --client codex,opencode \
  --model gpt-5.6-sol \
  --yes

运行 npx --yes athn-cli@latest --help 查看完整选项。