# @danielbaars/anthracite 中文文档

规范地址：https://npmcn.com/package/%40danielbaars/anthracite/

版本：0\.7\.0
npm 元数据更新时间：2026-11-10T08:59:08.953Z
中文译文更新时间：2026-11-11T10:14:22.637Z
软件包许可：AGPL-3\.0-only

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

原始 npm 页面：https://www.npmjs.com/package/%40danielbaars/anthracite
原文对照：https://npmcn.com/package/%40danielbaars/anthracite/?lang=original
项目主页：https://github.com/danielbaars/anthracite
源码仓库：https://github.com/danielbaars/anthracite

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

- 包体积（解压后）：3.2 MB，6 个文件
- TypeScript 类型：未声明
- Node.js 要求：\>=24
- 运行依赖：0 个
- 首次发布：2026-10-28T17:58:16.167Z
- 最新版本发布：2026-11-10T08:59:08.476Z
- 近 30 天下载量：4695（2026-10-11 至 2026-11-09，npm 官方下载统计）
- 已发布版本数：26（近 12 个月 26 个）

## 中文简介

堆叠了 Git 分支和 GitHub 拖取请求, 并得到本地 MCP 支持

## 安装

```sh
npm install @danielbaars/anthracite
```

也可以使用：`pnpm add @danielbaars/anthracite`、`yarn add @danielbaars/anthracite`、`bun add @danielbaars/anthracite`

## README

# 炭疽

用于堆放 Git 分支和 GitHub 拖取请求的 CLI 。 使用 **`an`** 或者说 **`anthracite`**。 。 。 .

炭疽以 [木炭矿](https://github.com/danerwilliams/charcoal) 以及原开源的"石墨"CLI. 见 [信贷和来源](https://github.com/danielbaars/anthracite/blob/v0.7.0/CREDITS.md)它支持本地堆栈和 GitHub PRs 通过 `gh`;它不执行当前每个 Graphite 特性或需要订阅 Graphite .

见 [0.4.0 石墨平价登记册](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/graphite-parity.md) (a) 用于运出的工作、剩余接口、蓄意差异和证据限度.

## 安装

用节点.js 24 或更新安装 npm 包 :

```sh
npm install --global @danielbaars/anthracite
an --version
```

需要 Git; GitHub 工作流程也需要安装、 认证 [GitHub 缩写](https://cli.github.com/)npm 安装两者 `an` 财务报告和审定财务报表 `anthracite`它不修改 shell 配置。 见 [β/最新和准确版本的安装、完成和迁移](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/installation.md)。 。 。 .

MacOS ARM64、macOS x64和Linux x64的独立二进制也可以从中获取 [GitHub 发布](https://github.com/danielbaars/anthracite/releases)不需要节点或邦克 从一个克隆,运行 `sh scripts/install.sh 0.1.1` 安装独立放行,并进行校验和zsh完成.

```sh
an --version
an auth
an init --trunk main
an create my-change --message "Add my change"
an modify --commit --message "Extend my change"
an log short --stack
an submit --stack --draft
```

使用 `an sync` 用于全库现有地物更新和默认维护; `--delete-all` 仅限清理同意。 读取 [同步范围、更改的自动化默认和回收](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/sync.md). 在发送这些更新的npm发布之前,在公开发布0.5.1之后,历史源认证接受.

关于选定分支下的一个共同先决条件,见 [目标插入](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/targeted-insertion.md)。 。 。 .

前用 Git 更改阶段 `create` 或者说 `modify`,或者故意选择命令的中转选项。 使用 `an <command> --help` 详细情况.

短日志( E)`an ls` 或者说 `an log short`将接连父母和子女之间的垂直树干划入线性堆栈,包括在平行臂内。 现有的分叉连接器仍然可见; `--steps 0` 只显示当前分支.

使用 `an split --by-file 'path/**'` 或者说 `an sp -f path` 在保留原始分支的同时,将选定的承诺文件提取为先决条件。 见 [文件分割、历史和恢复](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/split.md)。 。 。 .

使用 `an submit --reviewers alice --assignees @me --roles-branch my-change` 仅将角色添加到一个选定的公关中,同时保留通常的提交范围。 见 [审查者、受让人和提交范围](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/submit.md)。 。 。 .

使用 `an pr [branch]` 对于新的 GitHub PR 信息, `--stack` 用于连接的堆栈,或 `--web` 以明确打开选定的 PR。 见 [公关检查和保留当地国家](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/pr.md)。 。 。 .

使用 `an review [branch]` 或提交一份明确的审查,并接受 `--head`; 见 [审查行动和不确定的反应](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/review.md)。 。 。 .

使用 `an land [branch] --dry-run` 以预览自下而上再基地着陆、强制幸存分支维护和准备阻塞器。 应用选定的干线到目标链 `--yes`;必要的幸存武器被重放,其现有头部/ 保持公关 当地冲突仍在继续 `an continue`,然后要求明确 `an land` 恢复远程工作。 见 [目标着陆](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/land.md)。 。 。 .

要解开 npm 安装, 请运行 `npm uninstall --global @danielbaars/anthracite`。对于独立的安装,使用 `sh scripts/uninstall.sh` 从克隆人。 版本目录和首选项保留回滚. 见 [安装和升级](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/installation.md),则 [命令引用](https://github.com/danielbaars/anthracite/blob/v0.7.0/DOCUMENTATION.md),以及 [兼容性](https://github.com/danielbaars/anthracite/blob/v0.7.0/COMPATIBILITY.md)。 。 。 .

## MCP 磁共振

编码代理可以使用 `an mcp` 或者说 `anthracite mcp` 作为本地 stdio 服务器. 见 [MCP配置、工具和恢复](https://github.com/danielbaars/anthracite/blob/v0.7.0/docs/mcp.md) 用于通用客户端配置,明确请求参数,执行限制和中断行为.

## 发展

见 [捐款额](https://github.com/danielbaars/anthracite/blob/v0.7.0/CONTRIBUTING.md) 测试和发布准备。 本寄存器的源代码,文档,承诺消息,问题和拉出请求都用英语写出.

根据GNU Affero通用公共许可证版本3颁发的许可证;见 [自由主义](https://github.com/danielbaars/anthracite/blob/v0.7.0/LICENSE) 财务报告和审定财务报表 [(简体中文)](https://github.com/danielbaars/anthracite/blob/v0.7.0/CREDITS.md)。 。 。 .

## 常见问题

### @danielbaars/anthracite 是什么？

堆叠了 Git 分支和 GitHub 拖取请求, 并得到本地 MCP 支持

### 如何安装 @danielbaars/anthracite？

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

### @danielbaars/anthracite 支持 TypeScript 吗？

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

### @danielbaars/anthracite 需要什么版本的 Node\.js？

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

### @danielbaars/anthracite 可以商用吗？

@danielbaars/anthracite 使用 AGPL-3\.0-only 许可。最严格的 Copyleft：除分发外，通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括，不构成法律意见，请以许可原文为准。

### @danielbaars/anthracite 的下载量有多少？

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

### @danielbaars/anthracite 还在维护吗？

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

