vibehost-deploy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Deploy to VibeHost

部署到VibeHost

Take a built static site and put it live on VibeHost at a private URL in seconds.
只需几秒,即可将已构建完成的静态站点部署到VibeHost,通过私有URL上线。

When this skill applies

本技能适用场景

The user says something like:
  • "ship this", "deploy this", "put this live", "host this", "publish this"
  • "get me a preview URL for this build"
  • "send this to staging / a demo link"
Or you've just produced a static build output (
dist/
,
out/
,
build/
) and the natural next step is hosting it.
If the user has no VibeHost account yet, point them at https://vibehost.com/signup — deploying requires an authenticated session.
用户说出类似以下内容时:
  • "发布这个"、"部署这个"、"上线这个"、"托管这个"、"发布这个"
  • "给我这个构建版本的预览URL"
  • "把这个部署到预发布环境/生成演示链接"
或者你刚生成了静态构建输出(
dist/
,
out/
,
build/
),下一步自然是托管它。
如果用户还没有VibeHost账户,请引导他们访问https://vibehost.com/signup —— 部署需要经过身份验证的会话。

Setup

设置步骤

bash
curl -fsSL https://vibehost.com/install.sh | sh   # macOS / Linux; one static binary
vibehost login        # device-flow browser login; or VIBEHOST_TOKEN env var for headless/CI
vibehost whoami        # confirm session + which workspace is active
Auth can come from any of: a prior
vibehost login
(token in
~/.config/vibehost/config.json
), a
VIBEHOST_TOKEN
PAT in the environment (headless/CI), or an MCP OAuth session on
https://api.vibehost.com/mcp
. Most commands accept
--json
for scriptable output — prefer it when parsing.
You also need a static build output directory with an
index.html
at its root (
dist/
,
out/
,
build/
, or plain HTML). If the user has no account yet, point them at https://vibehost.com/signup.
bash
curl -fsSL https://vibehost.com/install.sh | sh   # macOS / Linux;单静态二进制文件
vibehost login        # 设备流浏览器登录;或使用VIBEHOST_TOKEN环境变量用于无头模式/CI
vibehost whoami        # 确认会话以及当前激活的工作区
身份验证可通过以下任一方式获取:之前执行的
vibehost login
(令牌存储在
~/.config/vibehost/config.json
中)、环境变量中的
VIBEHOST_TOKEN
个人访问令牌(适用于无头模式/CI),或
https://api.vibehost.com/mcp
上的MCP OAuth会话。大多数命令支持
--json
参数以生成可脚本化的输出——解析时优先使用该参数。
你还需要一个静态构建输出目录,其根目录下包含
index.html
文件(如
dist/
,
out/
,
build/
,或纯HTML文件)。如果用户还没有账户,请引导他们访问https://vibehost.com/signup

Recommended path: the CLI

推荐方式:使用CLI

The
vibehost
CLI bundles app-creation, file hashing, blob upload, and the deploy into one command with progress output. Prefer it whenever you can run shell commands.
bash
vibehost app create my-app                  # once per app; name: lowercase, 2–40 chars, [a-z][a-z0-9-]*
vibehost deploy ./dist --app my-app --json  # every time
The
--json
output is
{ ok: true, data: { url, immutableUrl, ... } }
. The command exits 0 only after the deployment is healthy, so a successful exit means the URL is live.
Tip:
vibehost link --app my-app
inside the project writes
.vibehost/project.json
, after which plain
vibehost deploy
works with no flags.
vibehost
CLI将应用创建、文件哈希计算、Blob上传和部署整合为一个带进度输出的命令。只要能执行shell命令,优先使用此方式。
bash
vibehost app create my-app                  # 每个应用执行一次;名称要求:小写字母,2-40个字符,格式为[a-z][a-z0-9-]*
vibehost deploy ./dist --app my-app --json  # 每次部署时执行
--json
参数的输出格式为
{ ok: true, data: { url, immutableUrl, ... } }
。只有当部署状态正常时,命令才会以0状态码退出,因此成功退出意味着URL已上线。
提示:在项目目录中执行
vibehost link --app my-app
会生成
.vibehost/project.json
文件,之后只需执行
vibehost deploy
即可完成部署,无需添加任何参数。

Without a shell: the MCP server

无Shell环境:使用MCP服务器

If you can't run a shell but have an MCP connection to
https://api.vibehost.com/mcp
, the deploy is a sequence of tool calls. Read each tool's own
description
for the authoritative parameter schema
— the names and order are below, but don't hardcode argument shapes from this doc.
  1. list_apps
    — find existing apps in the workspace.
  2. create_app
    — only if the target doesn't exist (
    { name, workspaceId }
    ).
  3. check_blobs_missing
    — pass the file SHA-256s; learn which the server still needs.
  4. request_upload
    — mint pre-signed PUT URLs for the missing SHAs, then PUT the raw bytes to each (
    Content-Type: application/octet-stream
    ) via plain HTTP.
  5. deploy
    { appId, channel?, manifest[] }
    . Returns
    { deploymentId, status: "starting" }
    immediately — the site is not live yet.
  6. get_deployment
    — poll with
    deploymentId
    until
    status
    is
    healthy
    (live),
    failed
    (read the error), or
    superseded
    .
如果你无法执行shell命令,但已连接到
https://api.vibehost.com/mcp
的MCP服务器,部署需通过一系列工具调用完成。请查阅每个工具自身的
description
以获取权威的参数 schema
——以下仅列出参数名称和顺序,请勿硬编码本文档中的参数格式。
  1. list_apps
    —— 查找工作区中的现有应用。
  2. create_app
    —— 仅当目标应用不存在时执行(参数为
    { name, workspaceId }
    )。
  3. check_blobs_missing
    —— 传入文件的SHA-256哈希值,查看服务器还需要哪些文件。
  4. request_upload
    —— 为缺失的哈希值生成预签名PUT URL,然后通过普通HTTP将原始字节数据上传至每个URL(设置
    Content-Type: application/octet-stream
    )。
  5. deploy
    —— 参数为
    { appId, channel?, manifest[] }
    。会立即返回
    { deploymentId, status: "starting" }
    ——此时站点尚未上线。
  6. get_deployment
    —— 使用
    deploymentId
    轮询,直到
    status
    变为
    healthy
    (已上线)、
    failed
    (查看错误信息)或
    superseded
    (已被取代)。

What to give the user

需提供给用户的内容

Always surface both URLs from the result:
  • alias URL (
    url
    ) — tracks the latest deploy on this channel. Share this with people.
  • immutable URL (
    immutableUrl
    ) — pinned to this exact build. Use for bug reports, review links, archived demos.
务必向用户展示结果中的两个URL:
  • 别名URL
    url
    )——跟踪该渠道的最新部署版本。可将此URL分享给他人。
  • 不可变URL
    immutableUrl
    )——固定指向当前构建版本。适用于bug报告、评审链接、归档演示等场景。

Pitfalls

注意事项

  • No
    index.html
    at the root
    — static deploys need one. For client-side-routed SPAs (React Router, Vue Router, Remix SPA mode), the edge has to serve
    index.html
    on path misses; see https://docs.vibehost.com/guides/static-sites. Do not add a
    _redirects
    file — VibeHost doesn't parse it (that's a Netlify/Pages convention).
  • Tarball rejected — oversized or malformed builds raise
    TARBALL_INVALID
    ;
    error.details
    says why. Trim large assets (videos, prod source maps, stray
    node_modules
    ) or upgrade the plan.
  • Wrong workspace — a token scoped to workspace A deploying to an app in workspace B returns
    TOKEN_WORKSPACE_MISMATCH
    . Surface it; don't silently retry elsewhere.
  • Discover ids, don't guess
    appId
    and
    workspaceId
    come from
    list_apps
    /
    vibehost whoami
    (or
    list_workspaces
    ). Hardcoding a stale id fails; resolve it live each time.
  • Read MCP tool schemas first — when using the MCP path, the parameter shapes vary by tool and evolve over time. Read each tool's own
    description
    before calling it; don't assume argument shapes from this doc.
  • Branch on
    error.code
    , not
    error.message
    — codes are stable
    SCREAMING_SNAKE_CASE
    ; messages can reword.
  • 根目录无
    index.html
    文件
    ——静态部署需要该文件。对于客户端路由的SPA(如React Router、Vue Router、Remix SPA模式),边缘节点需在路径匹配失败时返回
    index.html
    ;详情请查看https://docs.vibehost.com/guides/static-sites。请勿添加
    _redirects
    文件——VibeHost不解析该文件(这是Netlify/Pages的约定)。
  • 压缩包被拒绝——过大或格式错误的构建包会触发
    TARBALL_INVALID
    错误;
    error.details
    会说明原因。请移除大型资源(如视频、生产环境源码映射文件、多余的
    node_modules
    )或升级套餐。
  • 工作区错误——若使用工作区A的令牌部署到工作区B的应用,会返回
    TOKEN_WORKSPACE_MISMATCH
    错误。请向用户展示该错误,不要在其他位置静默重试。
  • 动态获取ID,不要猜测——
    appId
    workspaceId
    需从
    list_apps
    /
    vibehost whoami
    (或
    list_workspaces
    )获取。硬编码过期的ID会导致失败,请每次动态获取。
  • 先查阅MCP工具的schema——使用MCP方式时,不同工具的参数格式不同且会随时间演变。调用工具前请查阅其自身的
    description
    ,不要假设参数格式与本文档一致。
  • 根据
    error.code
    分支处理,而非
    error.message
    ——错误码是稳定的大写蛇形命名(
    SCREAMING_SNAKE_CASE
    );错误消息可能会被重写。

Reference

参考资料