这个页面本身就是 golive 发布的——它现在由你机器上的
golive serve 提供服务,没有任何外部依赖。
一个自托管的 HTML 发布工具:把一个 HTML 文件、一个目录或一个压缩包变成 一个可访问的地址,附带回滚、在线编辑、权限、水印和一个零配置的数据层。 所有内容都留在你自己的机器或内网里。
你可以把它理解成「装在本机的 Vercel」——但不需要账号、不需要联网、 不会把你的页面传到任何第三方。
| 做什么 | 命令 |
|---|---|
| 我现在在用哪套配置? | golive context |
| 环境体检 | golive doctor |
| 发布一个页面 | golive publish page.html --slug demo |
| 更新已有站点 | golive publish new.html --update demo |
| 看看发过什么 | golive list |
| 回滚到上一版 | golive rollback demo --yes |
| 启动服务 | golive serve --port 8787 |
| 装 AI agent skill | golive skill install |
| 看有哪些 skill 安装位置 | golive skill install --list-targets |
# 1. 随便写点什么
echo '<h1>Hello golive</h1>' > hello.html
# 2. 发布(--slug 决定访问路径)
golive publish hello.html --slug hello
# 3. 打开 http://localhost:8787/hello
改完再发一次就是更新,旧版本自动存成快照,
golive rollback hello 随时退回去。
页面里直接调 window.TemplateAPI 就能读写数据,
golive 默认用本机 SQLite($GOLIVE_HOME/data.db)接住它——
不用注册任何云服务,也不用配 API key。
TemplateAPI.create({ name: 'note-1', content: { text: '记一笔' } });
TemplateAPI.listAll({ pageSize: 50 }).then(r => console.log(r.list));
想看它是真的能用?去隔壁 demo-crud 加几条待办,然后刷新页面——数据还在。