# crewyard 中文文档

规范地址：https://npmcn.com/package/crewyard/

版本：0\.3\.0
npm 元数据更新时间：2026-11-03T09:16:05.348Z
中文译文更新时间：2026-11-03T10:25:11.101Z
软件包许可：MIT

本文由上游 README 机器翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/crewyard
原文对照：https://npmcn.com/package/crewyard/?lang=original
项目主页：https://github.com/orafaelfragoso/crewyard#readme
源码仓库：https://github.com/orafaelfragoso/crewyard

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：20.4 kB，4 个文件
- TypeScript 类型：未声明
- Node.js 要求：\>=22
- 运行依赖：0 个
- 首次发布：2026-11-03T00:54:58.857Z
- 最新版本发布：2026-11-03T09:16:04.945Z
- 已发布版本数：5（近 12 个月 5 个）

## 中文简介

独立AI编码代理的局部优先协调引擎。

## 安装

```sh
npm install crewyard
```

也可以使用：`pnpm add crewyard`、`yarn add crewyard`、`bun add crewyard`

## README

![Crewyard: a crew of AI coding agents planning, coding, reviewing and merging together](https://raw.githubusercontent.com/orafaelfragoso/crewyard/v0.3.0/docs/assets/banner.jpg)

**船在一起。安全合并。**

独立AI编码代理的局部优先协调引擎。  
一个用于计划、并行执行、审查和集成的工作流。

[**开始**](https://npmcn.com/package/crewyard/#readme-quick-start)   ·   [它是如何工作的](https://npmcn.com/package/crewyard/#readme-how-it-works)   ·   [体系结构](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/overview.md)   ·   [文档](https://npmcn.com/package/crewyard/#readme-documentation)

![TypeScript](https://img.shields.io/badge/TypeScript-18181B?style=flat-square&logo=typescript&logoColor=white) ![Bun](https://img.shields.io/badge/Bun-18181B?style=flat-square&logo=bun&logoColor=white) ![MCP](https://img.shields.io/badge/MCP-18181B?style=flat-square) ![Local first](https://img.shields.io/badge/Local--first-18181B?style=flat-square) [![npm](https://img.shields.io/npm/v/crewyard?style=flat-square&color=18181B&label=npm)](https://www.npmjs.com/package/crewyard) [![MIT license](https://img.shields.io/badge/License-MIT-18181B?style=flat-square)](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/LICENSE) [![CI](https://github.com/orafaelfragoso/crewyard/actions/workflows/ci.yml/badge.svg)](https://github.com/orafaelfragoso/crewyard/actions/workflows/ci.yml)

正在向v1.0开发·MIT许可·不需要托管后端

  

> \[!请注意) **pre - 1.0软件。** Crewyard正在朝着1.0版本开发，命令和配置可能会在小版本之间发生变化。运行 `crew <command> --help` 要查看已安装的版本支持什么，请检查 [更新日志](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/CHANGELOG.md) 在升级之前。

## 编码代理擅长编写代码。协调它们是困难的部分。

在一个存储库上运行多个独立代理会产生一系列新的工程问题：重复的工作、冲突的编辑、陈旧的上下文、溢出的PR队列、重复的审查，以及使正在进行的工作无效的合并。

**Crewyard是代理和存储库之间的协调层。** 它为独立代理提供了一个共享的、持久的工作流，而不必强制它们使用相同的模型、提供者或聊天会话。

| 不协调 | 与Crewyard |
| :-- | :-- |
| 代理处理重叠的任务 | 原子声明、租赁和范围保留 |
| 并行工作在一次签出中发生冲突 | 每个任务独立的Git工作树 |
| 上下文随着分支的变化而漂移 | 版本化的存储库索引和上下文包 |
| 评论重复或变得陈旧 | 循证渐进式评价 |
| pr累积并合并了冲突 | 序列化集成和github感知队列 |
| 崩溃会丢失业务流程状态 | 持久事件、和解和恢复 |

## 一个工作流。从目标到合并。

```mermaid
flowchart LR
    A["01 · Plan"] --> B["02 · Schedule"]
    B --> C["03 · Execute"]
    C --> D["04 · Review"]
    D --> E["05 · Integrate"]
    E --> F["06 · Reconcile"]
    F -. "Unblock dependent work" .-> B

    classDef default fill:#18181b,color:#fafafa,stroke:#52525b,stroke-width:1px;
    classDef finish fill:#134e4a,color:#f0fdfa,stroke:#2dd4bf,stroke-width:1px;
    class F finish;
```

1.  **根据依赖关系进行计划。** 将目标转换为经过验证的任务图，并在执行前批准计划。
2.  **安全计划。** 调度受并发限制、依赖项和保留约束的就绪任务。
3.  **独立运行。** 将工作分配给Codex、Claude Code、OpenCode或隔离工作树中的其他兼容进程。
4.  **有证据的审查。** 收集与提议的工作相关的结构化移交、测试和评审结果。
5.  **故意集成。** 在不绕过存储库保护的情况下协调pull请求和验证。
6.  **恢复并继续。** 持久化事件、协调远程状态、重新索引基本任务并解除下游任务的阻塞。

## 为真实的工程工作流程而构建

<table><tbody><tr><td><h3 id="readme-multi-agent-multi-provider">多代理,multi-provider</h3><p>使用独立的编码代理和帐户配置文件，而无需将工作流绑定到一个LLM提供商。</p><p><strong>适配器:</strong> Codex·Claude Code·OpenCode·Ollama·通用流程</p></td><td><h3 id="readme-parallel-work-without-collisions">平行工作，没有碰撞</h3><p>原子任务声明、隔离租约、依赖感知调度和专用Git工作树的设计是为了保持工作的隔离和负责。</p></td></tr><tr><td><h3 id="readme-repository-aware-context">Repository-aware上下文</h3><p>构建版本索引并检索带有符号、引用、路径和提交来源的代码上下文。</p></td><td><h3 id="readme-review-to-merge-orchestration">Review-to-merge编排</h3><p>在整个任务生命周期中跟踪评审证据、集成准备情况、GitHub检查、队列状态和合并结果。</p></td></tr><tr><td><h3 id="readme-local-by-design">本地设计</h3><p>在本地SQLite数据库中保持业务流程状态。不需要船员场托管后端；配置提供商和GitHub可能仍然使用网络服务。</p></td><td><h3 id="readme-multiple-ways-to-interact">多种交互方式</h3><p>通过CLI、MCP工具、便携式代理技能、后台服务或终端仪表板进行操作，所有这些都由相同的应用程序服务支持。</p></td></tr></tbody></table>

## 安装

Crewyard目标 **Linux （x64, arm64）**， **macOS（苹果芯片，英特尔）**, **窗口(x64)**． 您需要Git 2.38+，至少一个兼容的编码代理CLI，以及经过身份验证的 [GitHub CLI](https://cli.github.com/) 用于GitHub集成。

### 使用npm安装

```bash
npm install --global crewyard
crew version
```

NPM会为你的平台安装一个预构建的二进制文件；Node.js 22+只需要用于小型启动器。不需要Node.js和Bun的独立二进制文件被附加到每个 [GitHub释放](https://github.com/orafaelfragoso/crewyard/releases)。

### 从源代码安装

需要 [包子1.4.4 +](https://bun.sh/)。

```bash
git clone https://github.com/orafaelfragoso/crewyard.git
cd crewyard
bun install --frozen-lockfile
bun run crew doctor
```

在源代码签出中，运行 `bun run crew` 从这个README使用的存储库根目录获取 `crew`。

看到 [安装和升级](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/installation.md) 对于受支持的平台，直接进行二进制安装、校验和、备份和删除。

## 快速启动

新到船员码头？这个 [入门指南](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/getting-started.md) 讲解每一个步骤和每个步骤的作用。

```bash
# 1. Register your repository
cd ~/src/my-repo
crew doctor
crew init --repo .

# 2. Add an account: reuse the Claude Code login you already have
crew account add --provider claude --name personal --use-default-config
crew account test claude/personal

# 3. Create agents that use it, and turn on AI review
crew agent create --name architect --role architect --account claude/personal
crew agent create --name engineer  --account claude/personal
crew agent create --name reviewer  --role reviewer  --account claude/personal
crew config set review.reviewer_agent reviewer --yes

# 4. Give it a goal, review the plan, approve it
crew goal create --title "Add JWT authentication" --description-file goal.md
crew goal plan GOAL-1 --agent architect
crew goal status GOAL-1
crew goal approve GOAL-1 --yes

# 5. Let it work, and watch
crew service start
crew dashboard
```

`GOAL-1` 是ID `goal create` 打印。Codex和OpenCode的工作方式相同 `--provider codex` 或 `--provider opencode`． 有关单独登录、多个帐户或API密钥，请参见 [账户](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/accounts.md);要更改或删除代理，请参见 [代理和政策](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/agents.md)。

为了让Claude Code， Codex和OpenCode会话，您开始自己使用Crewyard的任务和工具，运行 `crew install` (添加 `--dry-run` 首先看看变化)。导游列出了 [安装MCP服务器和Skills的地方](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/getting-started.md#6-connect-your-own-agent-tools-optional)。

后台服务不断地调度准备好的任务；MCP服务器在其主机退出后不能单独保持工作运行。

[**入门→**](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/getting-started.md)  ·  [**账户→**](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/accounts.md)  ·  [**代理商→**](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/agents.md)  ·  [**CLI参考→**](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/reference/cli.md)

## 它是如何工作的

Crewyard是一个本地编排系统，而不是LLM网关。它协调您已经使用的工具，同时保持自己的权威任务和集成状态。

```mermaid
flowchart TB
    DEV["Developer / automation"] --> CLI["CLI & terminal dashboard"]
    AG["Codex · Claude Code · OpenCode · Other"] --> MCP["MCP server & Agent Skills"]

    CLI --> APP["Shared application services"]
    MCP --> APP

    APP --> PLAN["Task graph & scheduler"]
    APP --> CTX["Versioned index & context"]
    APP --> REV["Review & integration"]
    APP --> EVT["Events & observability"]

    PLAN --> WORK["Isolated Git worktrees"]
    REV <--> GH["GitHub & CI"]
    PLAN --> DB[("Local SQLite")]
    CTX --> DB
    REV --> DB
    EVT --> DB

    classDef default fill:#18181b,color:#fafafa,stroke:#52525b,stroke-width:1px;
    classDef store fill:#134e4a,color:#f0fdfa,stroke:#2dd4bf;
    class DB store;
```

**该体系结构故意与提供者无关。** CLI和MCP服务器是基于共享应用服务的瘦接口。SQLite WAL提供持久的协调；外部GitHub和进程的副作用是协调的，而不是作为一个单一的数据库事务处理。

有关工程级解释，请参阅 [体系结构概述](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/overview.md)， [索引模型](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/indexing.md), [任务/租赁设计](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/tasks-and-leases.md)。

## 接口

| 接口 | 专为 | 参考 |
| :-- | :-- | :-- |
| **CLI** （`crew`） | 人类、脚本和具有命令能力的代理 | [CLI参考](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/reference/cli.md) |
| **MCP** （`crew mcp`） | 支持模型上下文协议的代理主机 | [MCP参考](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/reference/mcp.md) |
| **代理技能** | 用于计划、执行、审查、集成、恢复和上下文的可移植指令 | [技能指导](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/skills.md) |
| **本地服务** （`crew service`） | 持续调度、协调和集成 | [体系结构](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/overview.md) |
| **终端指示板** （`crew dashboard`） | 对活动工作和事件的操作可见性 | [CLI参考](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/reference/cli.md) |

## 安全是建筑的边界

自主代理不应该仅仅通过请求来绕过协调。

-   **固定任务租赁** 防止陈旧的工人以当前所有者的身份提交工作。
-   **作用域worktrees** 分离并行任务并保护开发人员签出。
-   **审批和政策大门** 控制高影响的过渡。
-   **GitHub分支保护** 在整合过程中保持权威。
-   **幂等发件箱操作** 支持中断后的重试和恢复。
-   **本地凭证处理** 将秘密保存在存储库配置和业务流程事件日志之外。

安全属性取决于配置和实现成熟度。读了 [安全模型](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/policies/security-model.md) 和 [默认策略](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/policies/default-policies.md) 在启用无人值守工作流之前。

## 文档

| 从这里开始 | 了解更多 |
| :-- | :-- |
| [开始](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/getting-started.md) | 从安装到第一个代理运行任务，一步一步地进行 |
| [账户](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/accounts.md) | 登录代理：现有登录，独立登录，API密钥 |
| [代理和政策](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/agents.md) | 角色，使用多个帐户，更改和删除代理 |
| [安装](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/installation.md) | 支持的设置、本地数据、升级和备份 |
| [CLI参考](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/reference/cli.md) | 命令、选项和机器可读输出 |
| [MCP主机设置](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/mcp-hosts.md) | 连接现有的编码代理工具 |
| [代理技能](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/skills.md) | 兼容代理的可重用工作流 |
| [体系结构](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/overview.md) | 业务、存储、调度和系统边界 |
| [安全模型](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/policies/security-model.md) | 信任边界、权限和操作安全性 |
| [恢复运行手册](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/incident-recovery/runbooks.md) | 失败、重启和和解 |

## 发展

代码库是一个由Bun/TypeScript组成的单包，包含了调度、提供商、索引、审查、集成、存储和遥测等包。

```bash
bun install --frozen-lockfile
bun run typecheck
bun run lint
bun test
bun run build:binaries  # platform binaries, manifest and checksums
bun run build:npm       # npm tarballs, after binaries have been built
```

看到 [AGENTS.md](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/AGENTS.md) 对于代码约定 [架构文档](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/overview.md) 用于包边界，以及 [发布过程](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/releasing.md) 的分布。

## 贡献

欢迎投稿。读了 [贡献指南](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/CONTRIBUTING.md) 和 [行为准则](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/CODE_OF_CONDUCT.md)，并使用 [GitHub的问题](https://github.com/orafaelfragoso/crewyard/issues) 用于bug报告和特性请求。中所述的私下报告漏洞 [安全策略](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/SECURITY.md)。

## 项目现状及许可

Crewyard是 **正在积极开发v1.0**． 释放会自动从 `main` 与 [release-please](https://github.com/googleapis/release-please);每个版本都列在 [更新日志](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/CHANGELOG.md) 在 [发布页面](https://github.com/orafaelfragoso/crewyard/releases)． 看到 [发布过程](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/releasing.md) 了解如何构建和发布NPM包和平台二进制文件。

根据 [麻省理工学院的许可](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/LICENSE)． 版权所有©2026 Rafael Fragoso。

* * *

**更多的代理。更少的协调开销。**

为希望自主工作达到安全、可审查合并的开发人员而构建。  
  
[开始](https://npmcn.com/package/crewyard/#readme-quick-start) · [探索建筑](https://github.com/orafaelfragoso/crewyard/blob/v0.3.0/docs/architecture/overview.md) · [问题](https://github.com/orafaelfragoso/crewyard/issues)

## 常见问题

### crewyard 是什么？

独立AI编码代理的局部优先协调引擎。

### 如何安装 crewyard？

在项目目录运行 npm install crewyard，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 crew，可以用 npx crew 直接运行。

### crewyard 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/crewyard 是否存在。

### crewyard 需要什么版本的 Node\.js？

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

### crewyard 可以商用吗？

crewyard 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### crewyard 还在维护吗？

最新版本 0\.3\.0 发布于 2026/11/03（今天）；至今共发布 5 个版本，其中过去 12 个月发布了 5 个；首次发布于 2026/11/03。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

