html-publisher
/install html-publisher
HTML 网页发布指南
能力说明
通过 gnomic CLI 工具,可以将任意 HTML 代码发布为一个在线可访问的网页,并返回公开 URL。适用于:
- 快速分享生成的 HTML 页面
- 将本地 HTML 文件发布上线
- 把 AI 生成的网页内容转为可访问链接
使用方式
基本命令
从文件读取(推荐,适用于所有 shell):
gnomic content html2url --file \x3Chtml文件路径>
直接传入 HTML 字符串(适用于短 HTML):
gnomic content html2url "\x3Ch1>Hello World\x3C/h1>"
输出格式
默认返回 JSON(适合 AI Agent 解析):
{
"success": true,
"data": {
"url": "https://..."
}
}
加 -f text 参数返回人类可读格式:
gnomic content html2url --file index.html -f text
输出示例:
Published successfully!
URL: https://ts.fyshark.com/html_files/document_xxx.html
操作流程
第一步:准备 HTML 内容
获取需要发布的 HTML 内容,可以是:
- 用户提供的 HTML 代码
- AI 生成的完整 HTML 页面
- 读取本地 HTML 文件内容
第二步:执行发布命令
推荐方式:使用 --file 选项从文件读取
这是最可靠的方式,避免 shell 参数分割问题:
gnomic content html2url --file index.html
备选方式:直接传入 HTML 字符串
适用于简短的 HTML 片段:
gnomic content html2url "\x3Ch1>Hello World\x3C/h1>"
注意:大段 HTML 字符串在 PowerShell 中可能因空格被分割成多个参数,导致报错。优先使用
--file方式。
第三步:获取 URL
从返回的 JSON 中提取 data.url 字段,即为可访问的在线网页地址。
注意事项
- HTML 内容越大,发布耗时越长
- 返回的 URL 为公开链接,任何人均可访问
- 不支持动态后端逻辑,仅支持静态 HTML/CSS/JS
- 如果 HTML 中引用了外部资源(图片、字体等),需确保这些资源本身可公开访问
补充:命令不可用时
如果执行 gnomic 命令时提示找不到命令,说明 gnomic-cli 尚未安装,执行以下命令安装:
npm install -g gnomic-cli
gnomic-cli开源地址:https://github.com/huyi9531/gnomic_cli
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install html-publisher - After installation, invoke the skill by name or use
/html-publisher - Provide required inputs per the skill's parameter spec and get structured output
What is html-publisher?
将 HTML 内容发布为在线网页并返回可访问的 URL。当用户想把 HTML 发布上线、生成分享链接、或需要把网页内容转为公开 URL 时调用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 81 downloads so far.
How do I install html-publisher?
Run "/install html-publisher" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is html-publisher free?
Yes, html-publisher is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does html-publisher support?
html-publisher is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created html-publisher?
It is built and maintained by AIconductor (@huyi9531); the current version is v1.0.1.