Deploy a game
deployDeploys a game. The usual way: pass bundle: true, PUT a gzipped tar of the built game (tar -czf game.tgz -C dist ., index.html at its root) to the bundleUpload URL it returns, then call again with the deploymentId and publish: true; publish unpacks it. Files can also be given one by one: files carries utf-8 text, or with encoding: url the URL of an asset generate made, which the server fetches itself (up to 32 MB a call); presign takes a file's path, size and SHA-256 and returns a signed PUT URL for it in uploads. Upload URLs are on this server and last 15 minutes. A call without deploymentId stages a new deployment beside the live one; later calls pass it back to add or replace files. publish: true requires index.html and every presigned file at its declared size, makes the deployment live at {slug}.vibedgames.com and only then removes the previous one, so the game never goes dark mid-upload. With source: true publish also keeps the deployment's files as the game's forkable source (up to 64 MB); a caller with its own source archive passes sourceArchive instead and PUTs it to sourceUpload. 403 when the slug belongs to someone else.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slug": "<slug>"
},
"name": "deploy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | The game's display name, up to 120 characters, e.g. `Space Pong`; omit to keep the name it has | |
| slug | Yes | The game's slug, which makes its address `{slug}.vibedgames.com`: 3 to 40 lowercase letters, digits and hyphens, no hyphen at either end, e.g. `space-pong`. A new slug becomes your game, one another account owns is refused; pass the same one on every call of a deployment | |
| files | No | Files sent in the call itself: text, or a generated asset's URL with `encoding: url`. A path already staged is replaced. Default none | |
| bundle | No | true returns a `bundleUpload` URL to PUT the whole built game to as one gzipped tar, `index.html` at its root (`tar -czf game.tgz -C dist .`); a later call with `publish: true` unpacks it. The usual way in. Default false | |
| source | No | With `publish: true`, also keep the deployment's files (up to 64 MB) as the game's forkable source, which fork downloads. Default false; not with `sourceArchive` | |
| presign | No | Files you PUT yourself: each returns a signed URL in `uploads`, valid 15 minutes, to PUT its bytes to with the `headers` given; list a file again to renew its URL. Default none | |
| publish | No | true makes the staged deployment live at `{slug}.vibedgames.com` once this call's files are in (it needs `index.html` and every presigned file at its declared size), then removes the previous one. Default false: the files stay staged | |
| deploymentId | No | The `deploymentId` an earlier deploy call for this slug returned, to add files to that staged deployment or publish it; omit to stage a new one | |
| sourceArchive | No | Your own forkable source archive (a .tar.gz of the project, what `vg deploy --source` packs), which you PUT to the `sourceUpload` URL this call returns; omit for none. Not with `source: true` |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| gameId | Yes | ||
| uploads | Yes | ||
| fileCount | Yes | ||
| published | Yes | ||
| totalBytes | Yes | ||
| bundleUpload | Yes | ||
| deploymentId | Yes | ||
| sourceUpload | Yes |