# @agent-cms/agentcms 中文文档

规范地址：https://npmcn.com/package/%40agent-cms/agentcms/

版本：0\.4\.0
npm 元数据更新时间：2026-11-03T13:40:21.143Z
中文译文更新时间：2026-11-06T09:28:52.815Z
软件包许可：SEE LICENSE IN LICENSE

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

原始 npm 页面：https://www.npmjs.com/package/%40agent-cms/agentcms
原文对照：https://npmcn.com/package/%40agent-cms/agentcms/?lang=original
项目主页：https://github.com/fleox/agentcms#readme
源码仓库：https://github.com/fleox/agentcms

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

- 包体积（解压后）：17.7 MB，182 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=20
- 运行依赖：0 个
- 首次发布：2026-10-23T09:49:39.937Z
- 最新版本发布：2026-11-03T13:40:20.802Z
- 近 30 天下载量：3586（2026-10-05 至 2026-11-03，npm 官方下载统计）
- 已发布版本数：20（近 12 个月 20 个）

## 中文简介

静态的 CMS 您的AI 代理可以运行: 在浏览器中发布平版 HTML 到 GitHub Pages, Cloudflare Pages, GitLab Pages 或任何S3相容的桶的 WordPress 风格的管理员. 由克洛德代码(Claude Code),Codex,Hermes等代理公司安装和管理.

## 安装

```sh
npm install @agent-cms/agentcms
```

也可以使用：`pnpm add @agent-cms/agentcms`、`yarn add @agent-cms/agentcms`、`bun add @agent-cms/agentcms`

## README

![AgentCMS](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/logo.png)

**你的人工智能特工可以运行的静态CMS.**  
一个WordPress风格的管理员,在浏览器中运行,并向任何静态主机发布平版HTML.  
没有服务器、 PHP 和数据库可补丁 .

[![npm version](https://img.shields.io/npm/v/@agent-cms/agentcms?color=4f46e5&label=npm)](https://www.npmjs.com/package/@agent-cms/agentcms) [![CI](https://github.com/fleox/agentcms/actions/workflows/ci.yml/badge.svg)](https://github.com/fleox/agentcms/actions/workflows/ci.yml) [![Node.js version](https://img.shields.io/node/v/@agent-cms/agentcms?color=339933)](https://www.npmjs.com/package/@agent-cms/agentcms) [![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-d97757)](https://npmcn.com/package/%40agent-cms/agentcms/#readme-claude-code) [![License](https://img.shields.io/badge/license-PolyForm%20Noncommercial-6b7280)](https://github.com/fleox/agentcms/blob/master/LICENSE)

[快开始](https://npmcn.com/package/%40agent-cms/agentcms/#readme-quick-start) • 妇女 [特征](https://npmcn.com/package/%40agent-cms/agentcms/#readme-features) • 妇女 [主题](https://npmcn.com/package/%40agent-cms/agentcms/#readme-themes) • 妇女 [如何运作](https://npmcn.com/package/%40agent-cms/agentcms/#readme-how-it-works) • 妇女 [文档](https://github.com/fleox/agentcms/blob/master/docs/README.md) • 妇女 [更改日志](https://github.com/fleox/agentcms/blob/master/changelog.json)

[![Watch the video tutorial on YouTube: Claude Code installs AgentCMS, puts a site online, then creates a custom theme and a plugin](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/tutorial-video.jpg)](https://www.youtube.com/watch?v=2zuIQnjCB9o)  
▶️ [看7分钟的教程](https://www.youtube.com/watch?v=2zuIQnjCB9o):从空文件夹到有克洛德代码的活站点,有自定义主题和插件.

* * *

## 为什么代理CMS

<table><tbody><tr><td><h3>没有东西可以跑</h3><p>公共站点为静态文件:HTML,CSS和图像. 没有服务器或插件可以补丁,也没有数据库可以安全保护. 它在任何地方都是快的,主机经常是免费的(GitHub Pages, Cloudflare Pages,一桶S3).</p></td><td><h3>您的数据,您的主机</h3><p>内容就在你选择的地方。 它可以是一个 <b>加密 SQLite 文件</b> 在你自己的东道主, <b>用 git 标记下的文件</b>, (中文(简体) ), <b>基地</b>,或 <b>此浏览器</b>。没有代理CMS服务、账户或锁定.</p></td><td><h3>代理人 - 本地</h3><p>后台所做的一切也是带有JSON输出的CLI指令,而现成的技巧涵盖了克洛德代码,Codex,Cursor和Hermes. 询问 <i>"写并发表一篇关于..."</i> 而你的经纪人也这样做 规则和输出都和管理员一样.</p></td></tr></tbody></table>

## 快开始

### 有人工智能探员

**克劳德代码**

```text
/plugin marketplace add fleox/agentcms
/plugin install agentcms@agentcms
```

那就问:

> _在 GitHub Pages 上安装一个新的 AgentCMS 站点 ._  
> _写出并发表关于我们春开的文章,相片以~/相/相._  
> _切换到带有橙色口音的杂志主题,再添加一个favicon并启用RSS种子._

代理商询问内容存放在何处以及网站的托管地点,然后将您通过每一个符号或密钥. 秘密从来不进入聊天.

![A real Claude Code session: one sentence, and the agent installs an AgentCMS site on an S3 bucket with an encrypted SQLite database, checks it and gives the URLs](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/demo-install.gif)  
一个真正的克洛德代码会话。 唯一的编辑是x8在代理工作时的快取.

一旦网站存在,后台就是对话:

![A real Claude Code session: the agent publishes nine Markdown travel articles with their photos, then switches the site to the magazine theme](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/demo-content.gif)  
同一站点,第二个请求:Markdown文章和相片被发布,然后是一个新的主题. 在代理工作期间被加速了×16;它结束于现场.

| 探员 | 设置 |
| --- | --- |
| **克劳德代码** | 上面的插件 |
| **赫尔墨斯探员** / Python 剂 | `hermes skills install fleox/agentcms/hermes/skills/agentcms-install` (Python 包装+任务脚本,参见 [主题/](https://github.com/fleox/agentcms/blob/master/hermes/README.md)(中文(简体) ) |
| **编码器、光标、风暴、其他代理** | 指着它 [一般事务人员(其他职等)](https://github.com/fleox/agentcms/blob/master/AGENTS.md) |

### 没有经纪人

```bash
npx -y @agent-cms/agentcms serve
```

这开始您计算机上的管理员(Node.js 20+). 打开已打印的 URL 并跟踪设置向导 : **数据 / 主机 / 安装**。向导也可以将管理员本身放到您的网站上(`/admin/`),因此其他编辑器只需要浏览器.

更多选项,包括当地建筑、手动部署和消防基地 [文件/自助服务](https://github.com/fleox/agentcms/blob/master/docs/self-hosting.md)。 。 。 .

## 特征

![The AgentCMS post editor: a long-form article with its featured image, category, tags and excerpt](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/editor-light.jpg)

**写入**

-   带有斜线插入器、拖放、列、嵌入(YouTube、Vimeo、X、Spotify)、自定义 HTML 和主题块的块
-   帖子、页面、类别、标签、作者、菜单和具有自动响应WebP变体的媒体库
-   草稿、预览、批量动作和搜索,加上Markdown和WordPress导入
-   自定义任何邮件或页面上的字段( E)`header-photo: true`, (中文(简体) ), `price: 4.5`...),发布时读取的主题和插件

**出版**

-   一击即可使页面 _在浏览器中_ 只上传已改变的(内容散列)
-   干净的 URL (E)`/category/post.html`),自动清理重新命名的路径,列表保持同步
-   每个写作都是在 git 主机上的承诺, 所以每个动作都有一个页面构建

**SEO和覆盖范围**

-   漫画、开放图和推特卡,每期SIO、站点地图(包括新闻), `robots.txt` 和简易新闻聚合接口
-   **多语种网站**: 每种语言的URL、编辑标签、菜单、hreflang、站点地图和种子
-   静态搜索、档案和一台传真/PWA生成器

**广泛**

-   包含5个主题和一打插件; 从管理员安装更多 ZIP 套件而不重建
-   WordPress 风格的钩子( 过滤器和动作) 和打入的运行时间 API
-   `agentcms ext` 脚手架、检查、预览(带有截图)和运送自己的插件和主题

**设计安全**

-   机密( git sorders, S3 密钥, 密码句) 留在每个编辑器的浏览器或 CLI 中 `0600` 证书文件, 永远不要在站点或repo中
-   SQLite 数据库默认加密为 AES-256-GCM
-   行政大学有7种语言:英语、法语、德语、西班牙语、荷兰语、葡萄牙语和韩语

## 主题

下面每个主题都是由出版商自己制作的捆绑的演示内容的真实渲染.

<table><tbody><tr><td><img alt="Magazine theme" src="https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/theme-magazine.jpg" loading="lazy" decoding="async" referrerpolicy="no-referrer"><p><b>杂志</b>:长式新闻</p></td><td><img alt="Corporate theme" src="https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/theme-corporate.jpg" loading="lazy" decoding="async" referrerpolicy="no-referrer"><p><b>公司</b>:铅发电站和公司站点</p></td></tr><tr><td><img alt="Storefront theme" src="https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/theme-storefront.jpg" loading="lazy" decoding="async" referrerpolicy="no-referrer"><p><b>存储前端</b>: 产品目录</p></td><td><img alt="Portfolio theme" src="https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/theme-portfolio.jpg" loading="lazy" decoding="async" referrerpolicy="no-referrer"><p><b>组合</b>: 设计师和摄影师</p></td></tr><tr><td><img alt="Default theme" src="https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/theme-default.jpg" loading="lazy" decoding="async" referrerpolicy="no-referrer"><p><b>默认</b>: 一个干净的博客</p></td><td><img alt="Themes page of the admin" src="https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/admin-themes.jpg" loading="lazy" decoding="async" referrerpolicy="no-referrer"><p>每个主题的颜色、字体和标志都可以编辑</p></td></tr></tbody></table>

## 如何运作

![Your data (SQLite file, Markdown in git, Firebase, this browser) is read and written by the admin, in the browser or the CLI; the admin renders static HTML with the theme and publishes only what changed to your hosting (GitHub, Cloudflare or GitLab Pages, Netlify, S3-compatible bucket, ZIP), which serves plain files to visitors](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/how-it-works.png)

管理员是唯一的运行时间. 单击时 **发布**,它读取内容,使页面具有活跃的主题(`renderToStaticMarkup`),位于浏览器中. 然后通过所选主机连接器上传HTML,连同每个依赖它的列表. 这个 **数据后端** (其中的内容存在) **托管** (提供网站的地方)是独立的选择:

| 数据后端 | 不错 | 账户 |
| --- | --- | --- |
| **SQLite 文件** _(默认)_ | 一个主人,最简单的设置。 在您的主机上加密了文件 . | 无 |
| **标记为平分** | 队伍 每一次更改都是承诺,编辑们都会使用他们自己的GitHub / GitLab标志. | 仓库权限 |
| **基地** | 实时多编辑工作. 免费等级. [插图](https://github.com/fleox/agentcms/blob/master/docs/firebase.md#set-up-the-firebase-project)。 。 。 . | 火地轴 |
| **此浏览器** | 尝试一些事情,单一用户. | 无 |

主机 : **GitHub 页面**, (中文(简体) ), **云旗页**, (中文(简体) ), **GitLab 页面**,任何 git 部署的主机(Netlife, Vercel...), **S3相容桶** (AWS, R2, OVH, Scalway...),一个本地文件夹,或者一个ZIP上传自己. 见 [文件/出版目标](https://github.com/fleox/agentcms/blob/master/docs/publish-targets.md)。 。 。 .

## AgentCMS如何比较

|  | 代理CMS系统 | 文字压力 | 静态场地发电机 | 无头CMS |
| --- | --- | --- | --- | --- |
| 编辑的视觉管理员 | ✅ | ✅ | QQ( 文件 + CLI) | ✅ |
| 公共网站为静态文件 | ✅ | ❌ | ✅ | 取决于您的前端 |
| 要维护的服务器或数据库 | ❌ | ✅ | ❌ | (或SaaS) |
| 修建管道 | ❌ | ❌ | ✅ | ✅ |
| 内容保留在您自己的存储 | ✅ | ✅ | ✅ | 通常为SaaS |
| 由AI代理完全驾驶 | ✅ | 部分 | 部分 | 部分 |

## 这个 `agentcms` 国 际

制剂使用的同一发动机,也有手取: `npx -y @agent-cms/agentcms help`。每个命令支持 `--json`,并且破坏性命令打印一个计划直到您添加 `--yes`。 。 。 .

**所有命令**

| 命令 | 它会做什么 |
| --- | --- |
| `status` | 此工具对最近发布的版本, 以及每个注册网站的管理员版本 |
| `options` | 数据后端、主机和安装计划格式 |
| `credentials set <type>:<name>` | 每个账户存储一个符/密钥(隐藏快取, `--from-gh`, (中文(简体) ), `--from-aws-profile`, (中文(简体) ), `--from-env`(中文(简体) ) |
| `install --plan plan.json` | 安装一个站点(内容存储、发布目标、主题资产、管理); `--dry-run` 只检查 |
| `site list | add | use | rename | forget` | 此计算机管理的网站 |
| `doctor --site <alias>` | 对每个问题都进行健康检查 |
| `deploy-admin --site <alias>` | 将主机管理员更新到此发布 |
| `serve` | 在本地运行设置向导的管理员 |
| `content list | get | create | update | publish | unpublish | delete | preview | blocks` | 文章和页面,如编辑器(Markdown、块、图像、SIO、翻译) |
| `media list | upload | update | delete` | 媒体库(管理员的图像管道,在节点) |
| `terms`, (中文(简体) ), `menus`, (中文(简体) ), `settings`, (中文(简体) ), `users` | 分类标签、菜单、站点设置、用户和作者配置 |
| `plugins list | enable | disable | config | action` | 插件及其设置页面按钮 |
| `themes list | activate | config | logo` | 主题、设置和标志 |
| `regenerate home | all | repair | assets | everything` | 管理员的再生菜单 |
| `transfer export | import`, (中文(简体) ), `stats` | 内容导出/导入,仪表板编号 |
| `ext new | check | preview | pack | install` | 构建、测试和船舶插件及主题 |

## 构建插件或主题

插件和主题都是独立的项目,构建为单一的ZIP. 你从管理员处安装 ZIP(**插件/ 主题 安装**),没有重建管理员.

```bash
npx -y @agent-cms/agentcms ext new theme my-theme   # or: ext new plugin my-plugin
cd my-theme && npm install
npm run check      # validates it and renders a demo site through the real publisher
npm run preview    # demo site + desktop / mobile screenshots
```

![Terminal: ext new theme, npm install, build, check and preview, ending on the rendered demo site](https://raw.githubusercontent.com/fleox/agentcms/master/.github/assets/demo-theme.gif)

指南: [创建插件](https://github.com/fleox/agentcms/blob/master/docs/creating-a-plugin.md) • 妇女 [创建主题](https://github.com/fleox/agentcms/blob/master/docs/creating-a-theme.md) • 妇女 [运行时间 API](https://github.com/fleox/agentcms/blob/master/docs/runtime-api-reference.md)与克劳德代码 `agentcms-extensions` 技巧驱动整个循环.

## 文档

|  |  |
| --- | --- |
| [发布目标](https://github.com/fleox/agentcms/blob/master/docs/publish-targets.md) | 每个托管选项、设置和限制 |
| [自我接待](https://github.com/fleox/agentcms/blob/master/docs/self-hosting.md) | 设置向导、 本地构建、 部署和保护管理员 |
| [基地](https://github.com/fleox/agentcms/blob/master/docs/firebase.md) | 逐步设置控制台(屏幕截图)、安全规则和索引 |
| [主题和插件](https://github.com/fleox/agentcms/blob/master/docs/themes-and-plugins.md) | 它们是如何工作的,每个内置插件 |
| [建筑](https://github.com/fleox/agentcms/blob/master/docs/architecture.md) | 发布管道、 URL、 菜单、 图像、 i18n、 代码布局 |
| [一般事务人员(其他职等)](https://github.com/fleox/agentcms/blob/master/AGENTS.md) | 对大赦国际人员的指示 |

## 捐款

欢迎虫子报告和想法: [打开一个问题](https://github.com/fleox/agentcms/issues/new/choose)读取 [捐款额](https://github.com/fleox/agentcms/blob/master/CONTRIBUTING.md) 在打开拉出请求之前。 关于安全问题,如下: [警卫](https://github.com/fleox/agentcms/blob/master/SECURITY.md) 而不是公开讨论.

```bash
npm install --legacy-peer-deps
npm run dev        # admin at http://localhost:5173
npm test           # Vitest
npm run build      # typecheck + admin + themes + CLI
```

## 许可证

资源来源 [非商业许可证 1.0.0](https://github.com/fleox/agentcms/blob/master/LICENSE)个人、爱好者、教育、研究和其他非商业用途是免费的,可以按照同样的条件叉、修改和再分配.

**商业用途需要书面授权.** 这包括出售软件或作为有偿服务托管软件。 商业执照, [打开一个问题](https://github.com/fleox/agentcms/issues)。 。 。 .

## 常见问题

### @agent-cms/agentcms 是什么？

静态的 CMS 您的AI 代理可以运行: 在浏览器中发布平版 HTML 到 GitHub Pages, Cloudflare Pages, GitLab Pages 或任何S3相容的桶的 WordPress 风格的管理员\. 由克洛德代码\(Claude Code\),Codex,Hermes等代理公司安装和管理\.

### 如何安装 @agent-cms/agentcms？

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

### @agent-cms/agentcms 支持 TypeScript 吗？

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

### @agent-cms/agentcms 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @agent-cms/agentcms 需要什么版本的 Node\.js？

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

### @agent-cms/agentcms 可以商用吗？

@agent-cms/agentcms 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中，请阅读该文件确认可否商用。以上为概括，不构成法律意见，请以许可原文为准。

### @agent-cms/agentcms 的下载量有多少？

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

### @agent-cms/agentcms 还在维护吗？

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

