字huozi.app

部署 huozi Edge

一行命令把 huozi Edge 自部署到你自己的 Cloudflare 账户,约 5 分钟。部署完成后,日常使用跟 Cloud 完全一样。

一行安装

推荐
bash <(curl -sSL https://huozi.app/install) --hostname edge.you.com

脚本会自动建好 D1 + R2 + Durable Objects + DNS + Worker routes,部署两个 worker,最后给你一个一次性 setup URL。唯一要你手动的环节是浏览器弹出后点 Authorize 完成 Cloudflare OAuth 授权。

你需要准备

  • · Cloudflare 账户(免费版即可,没有的话去 dash.cloudflare.com 注册)。
  • · 在 CF 账户里有一个域名(自带域名 + 改 NS 到 CF,或者用 Cloudflare Registrar 现买一个)。
  • · 本地工具:Node ≥ 20、jq、openssl、curl、python3(脚本会自动检查并提示缺什么)。

或者让 Agent 替你跑

对话式

把这段 prompt 粘到 Claude Code / Cursor 等 Agent 里。Agent 会用它自己的 Bash 工具跑安装命令,遇到报错也能帮你 debug。

Deploy huozi Edge to my Cloudflare account.

Run this one command in my terminal — it handles everything end-to-end:

  bash <(curl -sSL https://huozi.app/install) --hostname edge.you.com

(Replace edge.you.com with whichever subdomain I want. The hostname
must be in a Cloudflare zone I own.)

The script will:
  1. Check prereqs (Node ≥20, jq, openssl, curl, python3).
  2. Open a browser for Cloudflare OAuth — I'll click Authorize.
  3. Tarball-fetch the huozi repo and install dependencies.
  4. Provision D1 + R2 + Durable Objects + DNS + Worker routes.
  5. Compile + deploy both workers (backend + BFF, ~5 minutes).
  6. Print a one-shot https://<host>/admin/setup?secret=... URL.

After it finishes:
  1. Open the printed setup URL in a browser; set my admin email + password.
  2. I land on /workspace. The top banner shows a connection snippet.
  3. Paste that snippet into your MCP config (e.g. Claude Code's mcp.json).
  4. Restart your AI client. Verify with: huozi_glob { pattern: "**/*" }

Other than the Cloudflare browser auth + setting my password, no input
needed from me. Proceed end-to-end.

部署完成后

  1. 浏览器打开脚本输出的 setup URL。设置 admin 邮箱 + 密码,这是你的 owner 账号。
  2. 进入 /workspace。顶部 banner 会显示 connection snippet —— 你可以复制 hz_link_ token 或完整的 mcp.json 段。
  3. 把 snippet 粘到 AI 客户端的 MCP 配置(比如 Claude Code 的 mcp.json),重启客户端。
  4. 用 huozi_glob { pattern: "**/*" } 验证。17 个 huozi 工具就位,跟 Cloud 完全一样。