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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@koi.codes/koi-installer

v1.0.4

Published

一键安装 Claude Code 和 Codex 的自动化脚本 | Automated installer for Claude Code and Codex

Downloads

14

Readme

Koi.codes 一键安装工具

自动化安装和配置 Claude Code 和 Codex 的便捷工具。

特性

  • 🚀 一键安装 Claude Code 或 Codex
  • 🔧 自动配置环境变量
  • 💻 支持 Windows、macOS 和 Linux
  • ✨ 交互式配置向导
  • 📦 无需手动创建配置文件
  • 🌐 智能多语言支持 - 自动检测系统语言(中文/英文)

快速开始

方法一: 使用 npx (推荐)

无需安装,直接运行:

# macOS / Linux / Windows CMD / Git Bash
npx @koi.codes/koi-installer

# Windows PowerShell (需要引号!)
npx "@koi.codes/koi-installer"

⚠️ Windows PowerShell 用户注意: 由于 @ 是 PowerShell 特殊字符,包名必须用引号包裹!

方法二: 使用 pnpm

# macOS / Linux / Windows CMD
pnpm dlx @koi.codes/koi-installer

# Windows PowerShell
pnpm dlx "@koi.codes/koi-installer"

方法三: 全局安装

npm install -g @koi.codes/koi-installer
koi-installer

使用步骤

  1. 运行安装命令
  2. 选择要安装的工具 (Claude Code / Codex / 两者都安装)
  3. 输入您的 API Token
  4. 等待自动安装和配置完成

支持的平台

| 平台 | 状态 | |------|------| | Windows 10/11 | ✅ | | macOS | ✅ | | Linux (Ubuntu/Debian/Fedora/Arch) | ✅ |

前置要求

  • Node.js >= 14.0.0
  • npm 或 pnpm

如果未安装 Node.js,请访问: https://nodejs.org

安装内容

Claude Code

安装后会自动配置:

  • ANTHROPIC_BASE_URL=https://koicode.xyz/api
  • ANTHROPIC_AUTH_TOKEN=您的Token

使用:

claude

Codex

安装后会自动配置:

  • ~/.codex/auth.json
  • ~/.codex/config.toml
  • KOI_OPENAI_TOKEN=您的Token

使用:

codex

手动配置 (可选)

如果自动安装失败,您可以参考以下手动配置方法:

Windows

# Claude Code
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://koicode.xyz/api", [System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "Your Token", [System.EnvironmentVariableTarget]::User)

# Codex
[System.Environment]::SetEnvironmentVariable("KOI_OPENAI_TOKEN", "Your Token", [System.EnvironmentVariableTarget]::User)

macOS/Linux

# Claude Code
echo 'export ANTHROPIC_BASE_URL="https://koicode.xyz/api"' >> ~/.zshrc  # macOS
echo 'export ANTHROPIC_AUTH_TOKEN="Your Token"' >> ~/.zshrc
source ~/.zshrc

# Codex
echo 'export KOI_OPENAI_TOKEN="Your Token"' >> ~/.zshrc
source ~/.zshrc

故障排除

权限错误

Windows: 以管理员身份运行 PowerShell

macOS/Linux: 使用 sudo 运行安装命令

环境变量未生效

  • Windows: 重启终端
  • macOS/Linux: 运行 source ~/.zshrcsource ~/.bashrc

npm 全局安装失败

尝试使用 npx 方式:

npx @koi.codes/koi-installer

更新

npm update -g @koi.codes/koi-installer

卸载

自动卸载 (推荐)

使用我们提供的自动卸载工具,会自动清理所有配置:

# 使用 npx (无需安装)
npx @koi.codes/koi-installer uninstall

# 或使用全局命令
koi-uninstall

功能:

  • ✅ 自动卸载 Claude Code 或 Codex
  • ✅ 自动清理环境变量
  • ✅ 自动删除配置文件
  • ✅ 交互式选择要卸载的项目

手动卸载

如果需要手动卸载:

# 卸载安装器
npm uninstall -g @koi.codes/koi-installer

# 卸载 Claude Code
npm uninstall -g @anthropic-ai/claude-code

# 卸载 Codex
npm uninstall -g @openai/codex

手动清理环境变量:

Windows PowerShell:

[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", $null, "User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", $null, "User")
[System.Environment]::SetEnvironmentVariable("KOI_OPENAI_TOKEN", $null, "User")

macOS/Linux: 编辑 ~/.zshrc~/.bashrc,删除 Koi.codes 相关配置行

获取 API Token

访问 https://koicode.xyz 获取您的 API Token

支持

许可证

MIT License


Made with ❤️ by koi.codes