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

@guangnao/agent-cli

v1.1.3

Published

光脑AI agent-cli 编码助理)

Readme

Agent-cli(gcli

通用 LLM 端点的终端 AI 编码助理:在命令行里用一句话让它读改文件、执行命令、多步推理、自主把任务做完——全程走 OpenAI 标准 /v1 端点,连任意 OpenAI 兼容服务(OpenAI / DeepSeek / 自建网关等)都行。

npm i -g @guangnao/agent-cli
gcli

装好直接敲 gcli,首次运行会弹引导帮你配好端点 / API Key / 模型,然后就能用。


安装

npm i -g @guangnao/agent-cli      # 全局安装,得到 gcli 命令

要求 Node ≥ 18。零运行时依赖(已打包),安装很快。

快速开始

方式一:首启引导(推荐) —— 直接运行,按提示填即可:

gcli
# → 填 API Key、端点(默认即可)、自动检测并选择模型 → 进入交互

方式二:环境变量 —— 适合脚本 / CI / 固定配置:

export TUI_API_KEY="<你的 API Key>"              # 必填
export TUI_BASE_URL="https://api.openai.com/v1"  # 任意 OpenAI 兼容 /v1 端点
export TUI_MODEL="<模型名>"                       # 可选,默认按端点自动选
gcli

任意 OpenAI 兼容 /v1 端点都可用:填该服务的 base URL + 对应的 API Key 即可(如 OpenAI 用 https://api.openai.com/v1 + sk-...)。

用法

gcli                          # 交互式常驻:像结对一样持续对话
gcli "给这个项目补单元测试"      # 一次性跑完该任务后退出
gcli -y "修复所有 lint 报错"    # 自动批准改文件/执行命令(脚本 / CI 用,慎用)

交互态里直接说需求即可——它会读代码、搜仓库、改文件(改动/命令默认弹审批,看彩色 diff 再放行)、跑测试验证,一步步把事做完。

子命令

gcli reset            # 清除已保存的端点 / Key / 模型(下次重新引导)
gcli version          # 显示版本

更新到最新版

npm i -g @guangnao/agent-cli@latest

会话内斜杠命令

交互态输入 / 会弹出可上下选择的命令菜单。常用:

| 命令 | 作用 | |---|---| | /login | 随时换端点 / Key / 模型 | | /models /model | 上下选 / 指定模型 | | /auto | 切权限模式(逐项确认 / 自动改文件 / 全自动) | | /sessions /resume | 选历史会话恢复接着聊 | | /new /clear | 新会话 / 清空当前上下文 | | /skills | 查看 / 管理可复用技能包(Skills) | | /memory | 查看 / 管理项目长期记忆 | | /theme | 切主题强调色 | | /tools /permissions | 查看可用工具 / 权限规则 | | /cost | 本会话 token / 花费统计 | | /cwd | 切工作目录 | | /help | 全部命令与快捷键 |

核心能力

  • 自主编码 Agent:读文件 / 改代码 / 跑命令 / 搜代码多步自主推进,一口气把任务做完。
  • 并行子代理:面大的调研一条指令并行派多个只读子代理分头摸清,再综合动手。
  • 自学进化:把跑通的可复用流程沉淀成技能(手动或重复成功自动结晶)、按相关性召回;项目级长期记忆跨会话记住约定与坑——越用越强。
  • 视觉 / 多模态:直接把截图 / 报错图贴进终端识图(按 OpenAI image_url 标准)。
  • 流式渲染:旁白 / 工具卡片 / diff / 命令输出实时打字机式呈现。
  • 会话持久化:完整历史本地留存,/resume 接着上次聊;上下文超限自动压缩,长任务不撑爆。

安全

  • 默认 HITL 审批:改文件 / 执行命令前弹确认,看彩色 diff 再放行。
  • /auto 可升到「自动改文件」或「全自动」;但 危险操作rm -rfgit push、改密钥等)即使全自动也会拦截或强制确认。

许可

专有软件(UNLICENSED)。