@danielbaars/anthracite

中文文档
0.7.0发布于 2026/11/10AGPL-3.0-only零依赖构建来源已验证近 30 天下载 4695

Stacked Git branches and GitHub pull requests, with local MCP support

原始使用文档
文档目录3 节
  1. Install
  2. MCP
  3. Development

Anthracite

A CLI for stacked Git branches and GitHub pull requests. Use an or anthracite.

Anthracite builds on Charcoal and the formerly open-source Graphite CLI. See credits and provenance. It supports local stacks and GitHub PRs through gh; it does not implement every current Graphite feature or require a Graphite subscription.

See the 0.4.0 Graphite parity register for shipped work, remaining interfaces, deliberate differences and evidence limits.

Install

Install the npm package with Node.js 24 or newer:

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

Git is required; GitHub workflows also require an installed, authenticated GitHub CLI. npm installs both an and anthracite. It does not modify shell configuration. See beta/latest and exact-version installation, completion and migration.

Standalone binaries for macOS ARM64, macOS x64 and Linux x64 are also available from GitHub Releases. They do not require Node.js or Bun. From a clone, run sh scripts/install.sh 0.1.1 to install that standalone release with checksum verification and zsh completion.

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

Use an sync for repository-wide existing-feature refresh and default maintenance; --delete-all supplies cleanup-only consent. Read sync scope, changed automation defaults and recovery. Historical source-candidate acceptance after public 0.5.1 preceded the npm releases that shipped these updates.

For a shared prerequisite below selected branches, see targeted insertion.

Stage changes with Git before create or modify, or choose the command's staging options deliberately. Use an <command> --help for details.

The short log (an ls or an log short) draws vertical stems between consecutive parents and children in a linear stack, including within parallel arms. Existing fork connectors remain visible; --steps 0 shows only the current branch.

Use an split --by-file 'path/**' or an sp -f path to extract selected committed files into a prerequisite while retaining the original branch. See file splitting, history and recovery.

Use an submit --reviewers alice --assignees @me --roles-branch my-change to add roles only to one selected PR while retaining the usual submission scope. See reviewers, assignees and submission scope.

Use an pr [branch] for fresh GitHub PR information, --stack for its connected stack, or --web to explicitly open the selected PR. See PR inspection and preserved local state.

Use an review [branch] to inspect its diff or submit one explicit review bound to --head; see review actions and uncertain responses.

Use an land [branch] --dry-run to preview scoped bottom-up rebase landing, mandatory surviving-branch maintenance and readiness blockers. Apply the selected trunk-to-target chain with --yes; necessary surviving arms are replayed and their existing heads/PRs maintained. Conflicts continue locally with an continue, then require explicit an land resumption for remote work. See scoped landing.

To uninstall an npm installation, run npm uninstall --global @danielbaars/anthracite. For a standalone installation, remove the command links and managed completion block using sh scripts/uninstall.sh from a clone. Version directories and preferences are retained for rollback. See installation and upgrades, the command reference, and compatibility.

MCP

Coding agents can use an mcp or anthracite mcp as a local stdio server. See MCP configuration, tools and recovery for a generic client configuration, explicit request arguments, execution limits and interruption behavior.

Development

See CONTRIBUTING.md for pinned build tools, tests and release preparation. Source code, documentation, commit messages, issues and pull requests in this repository are written in English.

Licensed under the GNU Affero General Public License version 3; see LICENSE and CREDITS.md.

版本与发布记录

@danielbaars/anthracite 共发布 26 个版本,首次发布于 2026/10/29;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.0latest2026/11/101 天前
0.7.0-beta.3beta2026/11/101 天前
0.6.152026/11/092 天前
0.6.142026/11/083 天前
0.6.132026/11/064 天前
0.6.122026/11/064 天前

关于 @danielbaars/anthracite 的常见问题

@danielbaars/anthracite 是什么?

Stacked Git branches and GitHub pull requests, with local MCP support

如何安装 @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 和提交记录判断。