@bunny-agent/runner-cli

中文文档
0.10.3-beta1发布于 2026/11/07Apache-2.0TypeScriptES Module近 30 天下载 3381

BunnyAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming

原始使用文档
文档目录16 节
  1. 🎯 Key Features
  2. 📐 Architecture
  3. Installation
  4. Usage
  5. Basic Examples
  6. Options
  7. Output Format
  8. bunny-agent acp
  9. Environment Variables
  10. Advanced Examples
  11. Specify Working Directory
  12. Combined Options
  13. Architecture
  14. 🐳 Docker Image Build
  15. Image Build Options
  16. Related Documentation

@bunny-agent/runner-cli

Bunny Agent Runner CLI - A lightweight, local command-line interface for running AI agents in your terminal.

Like gemini-cli, claude-code, or codex-cli, this tool runs directly on your local filesystem. It has two subcommands, one per output protocol: run streams AI SDK UI messages to stdout for a single task, and acp serves as a long-lived Agent Client Protocol agent over stdio for editors like Zed and JetBrains.

🎯 Key Features

  • 🔌 Choose Different Runners: Switch between Claude, Codex, Gemini, Copilot with --runner flag
  • 🚀 Local Execution: Runs directly on your filesystem, no sandbox required
  • 💨 Lightweight: No manager dependency, minimal overhead
  • 📡 Streaming: Real-time AI SDK UI streaming (run) or ACP JSON-RPC over stdio (acp)

📐 Architecture

runner-cli
  ├─ run  → @bunny-agent/runner-harness → runner-claude / runner-codex / ...
  └─ acp  → @bunny-agent/server-acp     → runner-harness → same runners

Dependencies:
✅ @bunny-agent/runner-harness (dispatches to every runner)
✅ @bunny-agent/server-acp (the `acp` subcommand's ACP agent + stdio transport)
❌ NO @bunny-agent/manager
❌ NO @bunny-agent/sandbox-*

Difference from manager-cli:

  • runner-cli: Local filesystem, no isolation, lightweight, direct runner usage
  • manager-cli: Sandboxed execution, uses manager + sandbox adapters + runner

Installation

# Global install (recommended if you want the `bunny-agent` command)
npm install -g @bunny-agent/runner-cli@latest

# Or add to a project
npm install @bunny-agent/runner-cli@latest

Usage

bunny-agent run [options] -- "<user input>"

Without installing globally, you can also run it via npx:

npx -y @bunny-agent/runner-cli@latest run -- "Create a hello world script"

Basic Examples

# Using Claude (default)
bunny-agent run -- "Create a hello world script"

# Explicitly choose Claude
bunny-agent run --runner claude -- "Create a hello world script"

# Using Codex
bunny-agent run --runner codex -- "Build a REST API with Express"

# Using Gemini
bunny-agent run --runner gemini -- "Build a REST API with Express"

# Using GitHub Copilot
bunny-agent run --runner copilot -- "Refactor this code"

# With custom system prompt
bunny-agent run --runner claude --system-prompt "You are a coding assistant" -- "Build a REST API with Express"

Options

OptionShortDescriptionDefault
--runner <runner>-rRunner to use: claude, codex, gemini, opencode, copilot, piclaude
--model <model>-mModel to useclaude-sonnet-4-20250514
--cwd <path>-cWorking directoryCurrent directory
--system-prompt <prompt>-sCustom system prompt-
--max-turns <n>-tMaximum conversation turns-
--allowed-tools <tools>-aComma-separated list of allowed tools-
--yolo-Automatically approve tool permission requestsfalse
--effort <level>-Reasoning effort or thinking level, depending on runner-
--resume <session-id>-Resume a previous session-
--help-hShow help message-

--allowed-tools limits built-in runner tools. Custom tools are provided through the SDK streamText({ tools }) API, not directly through runner-cli.

Output Format

bunny-agent run always outputs AI SDK data stream (SSE) format, one-shot — it runs the task and exits.

bunny-agent run -- "Calculate 2+2"

Output:

data: {"type":"start","messageId":"msg_123"}
data: {"type":"text-delta","id":"text_1","delta":"The answer is 4."}
data: [DONE]

For the ACP protocol instead, use bunny-agent acp — see below. The two are separate subcommands, not a flag on run: ACP is a long-lived session (initialize → session/new → possibly many session/prompt calls from the connected editor), not a single request/response.

bunny-agent acp

Serves BunnyAgent as an Agent Client Protocol agent over stdio — the transport editors use when they spawn an agent binary directly, e.g. Zed's "custom agent" setup or JetBrains' AI Assistant agent integration. The process stays alive handling JSON-RPC over stdin/stdout until the connecting client disconnects; it does not take a task argument like run does.

bunny-agent acp --runner claude
bunny-agent acp --runner pi --model gemini-2.0-flash --cwd ./my-project
OptionShortDescriptionDefault
--runner <runner>-rRunner to use: claude, codex, gemini, opencode, copilot, piclaude
--model <model>-mModel to useclaude-sonnet-4-20250514
--cwd <path>-cWorking directoryCurrent directory
--yolo-Automatically approve tool permission requestsfalse
--help-hShow help message-

These flags set the session default. ACP's session/new has no native runner/model field, so a connecting client can still override per-session through the protocol's _meta extension, namespaced under "bunny-agent":

{ "cwd": "/workspace", "mcpServers": [],
  "_meta": { "bunny-agent": { "runner": "pi", "model": "gemini-2.0-flash" } } }

Point an ACP client at the CLI itself as the agent command (exact configuration is client-specific — see each editor's ACP docs):

{ "command": "bunny-agent", "args": ["acp", "--runner", "claude"] }

For the HTTP equivalent (POST /api/coding/acp, used by the daemon instead of a spawned subprocess), see apps/daemon/README.md. Both are backed by @bunny-agent/server-acp and support every runner this CLI does.

Environment Variables

VariableDescriptionRequired
ANTHROPIC_API_KEYAnthropic API key (Claude runner)No
OPENAI_API_KEY or CODEX_API_KEYOpenAI API key (Codex runner)No
GEMINI_API_KEYGemini API key (Gemini runner)No
GITHUB_TOKEN or GH_TOKENGitHub token (Copilot runner); falls back to the logged-in Copilot userNo
BUNNY_AGENT_WORKSPACEDefault workspace pathNo
BUNNY_AGENT_LOG_LEVELLogging level (debug, info, warn, error)No

Advanced Examples

Specify Working Directory

bunny-agent run --cwd ./my-project -- "Fix the bug in main.ts"

Combined Options

bunny-agent run \
  -m claude-sonnet-4-20250514 \
  --system-prompt "You are a helpful coding assistant" \
  --max-turns 10 \
  -- "Build a REST API"

Architecture

The CLI is designed to:

  1. Execute in a specific working directory
  2. Load settings from .claude/settings.json and CLAUDE.md in the project
  3. Stream AI SDK UI messages directly to stdout
  4. Output AI SDK data stream (SSE) format

🐳 Docker Image Build

Build Docker images with agent templates baked in:

# Build image
bunny-agent image build --name vikadata/bunny-agent-seo --tag 0.1.0 --template ./templates/seo-agent

# Build and push
bunny-agent image build --name vikadata/bunny-agent-seo --tag 0.1.0 --template ./templates/seo-agent --push

# Without template
bunny-agent image build --name vikadata/bunny-agent --tag 0.1.0

Image Build Options

OptionDescriptionDefault
--name <name>Full image name (e.g. vikadata/bunny-agent-seo)bunny-agent
--tag <tag>Image taglatest
--image <full>Full image name override (e.g. myorg/myimage:v1)-
--platform <plat>Build platformlinux/amd64
--template <path>Path to agent template directory-
--pushPush image to registry after buildfalse

版本与发布记录

@bunny-agent/runner-cli 共发布 115 个版本,首次发布于 2026/04/14;过去 12 个月发布了 115 个版本。

版本发布日期距今
0.10.3-beta1latest2026/11/071 天前
0.10.22026/10/2811 天前
0.10.1-beta.22026/10/2811 天前
0.10.1-beta.12026/10/2712 天前
0.10.0-release.62026/10/2613 天前
0.10.0-release.52026/10/2316 天前

关于 @bunny-agent/runner-cli 的常见问题

@bunny-agent/runner-cli 是什么?

BunnyAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming

如何安装 @bunny-agent/runner-cli?

在项目目录运行 npm install @bunny-agent/runner-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bunny-agent-runner,可以用 npx bunny-agent-runner 直接运行。

@bunny-agent/runner-cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bunny-agent/runner-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bunny-agent/runner-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bunny-agent/runner-cli 可以商用吗?

@bunny-agent/runner-cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@bunny-agent/runner-cli 的下载量有多少?

根据 npm 官方下载统计,@bunny-agent/runner-cli 在 2026/10/09 – 2026/11/07 这 30 天内被下载 3,381 次,日均约 113 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bunny-agent/runner-cli 还在维护吗?

最新版本 0.10.3-beta1 发布于 2026/11/07(1 天前);至今共发布 115 个版本,其中过去 12 个月发布了 115 个;首次发布于 2026/04/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。