doc-for-agent
v0.4.0
Published
Multi-agent repository documentation skill package with a CLI adapter for install, init, refresh, and doctor workflows.
Maintainers
Readme
doc-for-agent
English | 简体中文
公网 landing URL:发布后补在这里。 当前落地入口文档:docs/landing-page.zh.md
doc-for-agent 是一个面向 CLI coding-agent 用户的统一 CLI。
适用于 Claude Code、Codex、CodeBuddy、Continue、Copilot 等终端优先工作流。
它支持 agent、human、dual、quad 四种输出。
模式映射:agent 写入 dfa-doc/AGENTS/,human 写入 dfa-doc/handbook/,dual 同时写入两者,quad 写入 dfa-doc/AGENTS/、dfa-doc/AGENTS.zh/、dfa-doc/handbook/、dfa-doc/handbook.zh/。
dual 模式会在一次 refresh 流程中同时维护 docs/(human docs)与 AGENTS/(agent docs)。quad 模式建立双语四视图目录契约。
这项四视图能力表达的是结构契约,不等于所有双语内容质量已经完成。
它不是 AGENTS-only 工具:应按文档受众选择输出模式。
产品路径很短:
- 安装
initrefresh把它理解成“两步半”更准确:全局安装让 agent 能看到 skill,repo-localinit启用仓库工作流,refresh在需要时负责写入或更新文档。 简路径(uipro-cli风格):
npm install -g doc-for-agent@nextdocagent init --ai codexdocagent init --ai claudecode
30 秒开始
先安装一次:
# Node 用户
npm install -g doc-for-agent@next
# Python 用户
pipx install doc-for-agent在仓库中开始:
步骤 2(repo-local init):在目标仓库启用工作流。
一次性 npx -y doc-for-agent init ... 可在临时场景下合并这两步;如果你要真正写出文档,后一步仍然是执行 refresh。
docagent init --ai codex
docagent init --ai claudecode如需在同一个命令里同时接线当前仓库,添加 --target <repo-root>。
如果你需要按步骤的文档入口图,先运行:
docagent quickstart --target <repo-root>按 Agent 选入口
| 你使用... | 先执行 |
| --- | --- |
| Claude Code | docagent init --ai claudecode |
| Codex | docagent init --ai codex |
| CodeBuddy | docagent init --ai codex --target <repo-root> |
| Continue | docagent init --ai continue --target <repo-root> |
| GitHub Copilot | docagent init --ai copilot --target <repo-root> |
| 多个 Agent | docagent init --ai all |
安装矩阵
| 用户类型 | 安装方式 | 起步命令 |
| --- | --- | --- |
| Node-first(全局) | npm install -g doc-for-agent@next | docagent init --ai all |
| Node-first(一次性) | npx -y doc-for-agent | npx -y doc-for-agent init --ai all --target <repo-root> |
| Python-first(推荐) | pipx install doc-for-agent | docagent init --ai all |
| Python-first(venv/system) | python3 -m pip install doc-for-agent | docagent init --ai all |
Product CLI v1
主流程命令:
docagent init --ai <codex|claudecode|all>
docagent refresh --root <repo-root> --output-mode agent|human|dual|quad
docagent doctor --target <repo-root>其他主命令:
docagent generate --root <repo-root> --mode refresh --output-mode agent|human|dual
docagent update --target <repo-root>
docagent versions --target <repo-root>
docagent quickstart --target <repo-root>兼容命令(保留):
docagent install --platform codex --target <repo-root>
docagent all --target <repo-root>文档
入口文档路径:
这条链路用于 dual 文档系统上手:先看产品定位,再跑首轮命令,再选平台入口。
维护文档:

