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

@hrcli/gemini-cli

v1.0.5

Published

基于 Google Gemini CLI 的增强版本,专为国内开发者优化,支持国产大模型。

Readme

HRCLI Gemini CLI

基于 Google Gemini CLI 的增强版本,专为国内开发者优化,支持国产大模型。

特性

  • 国产大模型支持:内置支持百炼、Kimi、智谱等国产大模型,无需 VPN
  • 免费额度:使用个人 Google 账号可享受每分钟 60 次请求和每天 1,000 次请求
  • 强大模型:支持 Gemini 2.5 系列模型,具有 1M token 上下文窗口
  • 内置工具:Google 搜索增强、文件操作、Shell 命令、网页抓取
  • 可扩展:支持 MCP(模型上下文协议)用于自定义集成
  • 终端优先:专为命令行开发者设计
  • 开源:Apache 2.0 许可证

安装

使用 npx 直接运行(推荐)

npx @hrcli/gemini-cli

全局安装

npm install -g @hrcli/gemini-cli

安装后直接运行:

gemini

认证方式

方式 1:使用 Google 登录(OAuth)

适合:个人开发者,免费使用 Gemini API

gemini
# 选择 "Sign in with Google" 完成浏览器认证

免费额度:每分钟 60 次请求,每天 1,000 次请求。

方式 2:Gemini API Key

适合:需要特定模型控制或付费额度

# 从 https://aistudio.google.com/apikey 获取
export GEMINI_API_KEY="YOUR_API_KEY"
gemini

方式 3:Vertex AI

适合:企业团队和生产环境

export GOOGLE_API_KEY="YOUR_API_KEY"
export GOOGLE_GENAI_USE_VERTEXAI=true
gemini

方式 4:国产大模型(OpenAI 兼容协议)

适合:国内开发者,无需 VPN

支持百炼、Kimi、智谱等国产模型:

# 百炼(阿里云)
export GEMINI_OPENAI_API_KEY="your-api-key"
export GEMINI_OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
export GEMINI_OPENAI_MODEL="qwen-plus"
gemini

# Kimi(月之暗面)
export GEMINI_OPENAI_API_KEY="your-api-key"
export GEMINI_OPENAI_BASE_URL="https://api.moonshot.cn/v1"
export GEMINI_OPENAI_MODEL="moonshot-v1-8k"
gemini

# 智谱 AI
export GEMINI_OPENAI_API_KEY="your-api-key"
export GEMINI_OPENAI_BASE_URL="https://open.bigmodel.cn/api/paas/v4"
export GEMINI_OPENAI_MODEL="glm-4"
gemini

快速开始

基本用法

# 在当前目录启动
gemini

# 包含多个目录
gemini --include-directories ../lib,../docs

# 使用特定模型
gemini -m gemini-2.5-flash

# 非交互模式(脚本使用)
gemini -p "解释这个代码库的架构"

# JSON 输出
gemini -p "分析代码" --output-format json

示例

cd new-project/
gemini
> 写一个 Discord 机器人,使用 FAQ.md 文件回答问题
git clone https://github.com/your-repo/project
cd project
gemini
> 给我一个昨天所有更改的摘要

核心功能

代码理解与生成

  • 查询和编辑大型代码库
  • 使用多模态能力从 PDF、图片或草图生成新应用
  • 使用自然语言调试问题

自动化与集成

  • 自动化运维任务
  • 使用 MCP 服务器连接新能力
  • 在脚本中非交互运行

高级能力

  • 内置 Google 搜索增强
  • 对话检查点保存和恢复
  • 自定义上下文文件(GEMINI.md)

文档

与原版区别

本项目 fork 自 google-gemini/gemini-cli,主要增强:

  1. 国产模型支持:内置 OpenAI 兼容协议适配,支持百炼、Kimi、智谱等国产大模型
  2. 国内优化:针对国内网络环境优化,无需 VPN 即可使用国产模型

贡献

欢迎贡献!请查看 贡献指南

许可证

Apache License 2.0

致谢

感谢 Google 和开源社区构建的 Gemini CLI 项目。