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

@tangtaue/agent-tui

v0.1.3

Published

TUI Agent 脚手架:LangChain + LangGraph + DeepAgents + ACP 协议

Readme

Agent TUI

基于 LangChain + LangGraph + DeepAgents 的终端 Agent 脚手架,支持 ACP 协议与编辑器(Zed / VS Code ACP Client)交互。

安装(npm)

# 全局安装 CLI
npm install -g @tangtaue/agent-tui

# 或项目内使用
npx @tangtaue/agent-tui

# 配置 API Key(复制示例后编辑)
cp node_modules/@tangtaue/agent-tui/.env.example .env
# 填入 DEEPSEEK_API_KEY / OPENAI_API_KEY 等

# 启动 TUI
agent-tui

# ACP 模式(供 IDE 连接)
agent-tui-acp

npm 包名 @tangtaue/agent-tui。CLI 命令仍为 agent-tui / agent-tui-acp

特性

  • TUI 终端:类似 Claude Code / Codex Terminal 的交互界面
  • ACP 模式:通过 stdio JSON-RPC 供 IDE 连接
  • 多模型:在 agent.config.yaml 配置 OpenAI / Anthropic / DeepSeek,TUI 内 /model 切换
  • 文件读写:使用 DeepAgents 内置 read_file / write_file / edit_file,工作区由 agent.config.yaml 限制
  • MCP:读取 mcp.json / .cursor/mcp.json 等配置,动态加载 MCP 工具
  • Skills:扫描项目、全局、.cursor.claude.codex 等目录下的 SKILL.md 并注入 Agent

快速开始

cd agent-tui
pnpm install --ignore-workspace

# 方式一:复制 .env.example 为 .env 并填入 DEEPSEEK_API_KEY(推荐,已 gitignore)
cp .env.example .env

# 方式二:临时导出环境变量
# export DEEPSEEK_API_KEY=sk-...

# 终端 TUI 模式
pnpm dev

# ACP 模式(供编辑器连接)
pnpm dev:acp

# 查看 Skills / MCP
pnpm dev skills
pnpm dev mcp

DeepSeek 配置

| 参数 | 值 | |------|-----| | OpenAI 兼容 base_url | https://api.deepseek.com | | Anthropic 兼容 base_url | https://api.deepseek.com/anthropic | | api_key | 环境变量 DEEPSEEK_API_KEY | | model | deepseek-v4-flash / deepseek-v4-pro |

export DEEPSEEK_API_KEY=你的密钥
pnpm dev -- --model deepseek:deepseek-v4-flash

TUI 内 /model 可切换 OpenAI API 与 Anthropic API 两种接入方式。

编辑器接入(ACP)

在 Zed 或 ACP Client 中添加 Agent:

{
  "command": "npx",
  "args": ["@tangtaue/agent-tui", "acp"]
}

配置

主配置文件:agent.config.yaml

| 区块 | 说明 | |------|------| | models | 多模型列表 | | mcp | MCP 配置路径与内联 servers | | skills | Skills 扫描目录 | | agent.workspace | 工作区根目录;. 表示启动 CLI 时的当前目录(非 npx 包目录) | | filesystem | 工作区读写限制 | | acp | ACP Agent 名称 |

项目级 MCP 可写入 mcp.json(与 Cursor 格式兼容)。

目录结构

agent-tui/
├── agent.config.yaml    # 主配置
├── mcp.json             # MCP 服务器(Cursor 兼容)
├── src/
│   ├── cli.ts           # CLI 入口
│   ├── acp/             # ACP 协议服务
│   ├── agent/           # DeepAgent 运行时 + MCP + 文件工具
│   ├── config/          # 配置 / Skills / MCP 加载
│   └── tui/             # Ink TUI 界面
└── package.json

技术栈

构建与发布

pnpm install --ignore-workspace
pnpm run build          # TypeScript 7 编译到 dist/
pnpm run build:watch    # 监听模式
pnpm run typecheck      # 仅类型检查

# 发布到 npm(需先 npm login)
npm pack --dry-run      # 预览打包内容
npm publish --access public

独立子仓库

本目录可作为独立 Git 仓库维护:

cd agent-tui
git init
git remote add origin [email protected]:<user>/agent-tui.git