
基于元数据驱动的AI代理机器人CLI——跨7个域48次操作,结构化JSON包络I/O,零交互提示。
概览
octo-cli 是命令行接口——一个薄的单二进制 REST 客户端,设计用于通过执行调用代理运行时(OpenClaw、Claude Code 等)。每次调用在 stdout 上都会输出结构化的 JSON 包络;错误则带着确定性分类法发送到 stderr。没有交互式 I/O。 octo-cli 是 。命令树在启动时自动注册,基于嵌入在二进制文件中的 OpenAPI 3.x 规范。添加或更改端点意味着编辑规范,而不是代码。 - 所有业务逻辑都存在于后端服务(matters,dmworkim)。CLI负责传输、验证和格式化。- 每个操作声明其完整的模块限定路径,并使用OCTO_API_BASE_URL。- 内部/cmdutil。工厂是依赖容器。无可变的包级全局;测试通过ConfigFunc / CredentialFunc / ClientFunc / RegistryFunc注入存根。- 一个稳定的JSON包络,包含身份、数据、分页和速率限制元数据;一个小型固定错误分类法。
概述(AI 翻译)
octo-cli 是Octo生态系统的命令行界面——一个薄薄的,
单二进制REST客户端,专为AI代理机器人设计,通过[[T1]呼叫]
来自代理运行时(OpenClaw、Claude Code 等)。每次调用
在 stdout 上会发出结构化的 JSON 包络;错误则发送给带有 a 的
确定性分类法。没有交互式I/O。
建筑
octo-cli 是元数据驱动的。命令树在启动时自动注册 嵌入在二进制文件中的 OpenAPI 3.x 规范。添加或更改端点 这意味着编辑规范,而不是代码。
主要特性:
- 瘦客户端。 所有业务逻辑都存在于后端服务中(事项, dmworkim)。CLI负责传输、验证和格式化。
- 统一网关路由。 每个操作声明其完成
模块限定路径,并使用
OCTO_API_BASE_URL。 - 出厂DI。
internal/cmdutil.Factory是依赖容器。 无可变包级全局;测试通过[[T4]注入存根 /CredentialFunc/ClientFunc/RegistryFunc。 - 代理优先输出。 一个稳定的 JSON 包络,包含身份、数据, 分页和速率限制元数据;一个小型固定错误分类法。
领域
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
octo-cli
octo-cli is the command-line interface for the Octo ecosystem — a thin,
single-binary REST client designed for AI Agent Bots to call via exec
from agent runtimes (OpenClaw, Claude Code, and similar). Every invocation
emits a structured JSON envelope on stdout; errors go to stderr with a
deterministic taxonomy. There is no interactive I/O.
Architecture
octo-cli is metadata-driven. The command tree is auto-registered at startup from OpenAPI 3.x specs embedded into the binary. Adding or changing an endpoint means editing a spec, not the code.
OpenAPI specs ──► Registry ──► Service Engine ──► Factory ──► Client ──► Output
(embedded) (parsed) (cobra commands) (DI) (HTTP) (envelope)
Key properties:
- Thin client. All business logic lives in backend services (matters, dmworkim). The CLI is transport, validation, and formatting.
- Unified gateway routing. Each operation declares its complete
module-qualified path and uses
OCTO_API_BASE_URL. - Factory DI.
internal/cmdutil.Factoryis the dependency container. No mutable package-level globals; tests inject stubs throughConfigFunc/CredentialFunc/ClientFunc/RegistryFunc. - Agent-first output. A stable JSON envelope with identity, data, pagination, and rate-limit metadata; a small fixed error taxonomy.
Domains
| Domain | Ops | Purpose |
|---|---|---|
docs |
45 | Documents, spreadsheets, whiteboards & PPT — lifecycle, full-text search, body content, worksheet discovery and scoped/paged reads, sheet edits (atomic replace, conditional formats, split/deduplication), board scenes, members, comments, versions, attachments |
html |
22 | Interactive HTML documents (octo-doc, separate backend from docs) — read source with its version, publish immutable versions, drafts, per-doc share codes & per-uid grants, media assets, inline comments, agent element read/replace |
drive |
47 | Network drive — spaces & members, folder/file tree, full-text search and creator selection, single-part and resumable-style multipart blob upload, signed download, online-document mounts, share links, invites, IM-attachment transfer. Six hand-written composites bring the command tree to 50 leaves |
matter |
14 | Todos/tasks — temporarily withheld while the backend API stabilizes |
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add mininglamp-oss/octo-cli