Skip to content

Deploy to VifuHub

vf deploy is the one-command path from a local game project to a playable VifuHub release.

bash
cd path/to/game
vf deploy

For an explicit path:

bash
vf deploy ./path/to/game

What Deploy Does

  1. Resolves the game directory.
  2. Starts project setup when no project setup exists yet.
  3. Validates the project setup.
  4. Runs build.command when one is declared, or uses the built-in static web build path.
  5. Locates build.output.
  6. Validates the built runtime artifact.
  7. Uploads only when validation passes and the artifact changed.
  8. Creates or updates the same game for the same signed-in owner and deploy name.
  9. Prints the game id and playable URL.

Repeated deploys from the same project update the same game. The project setup does not need a server id.

First Deploy Setup

If setup is missing, vf deploy asks for the project details before it builds. For the full setup flow, CI behavior, and common project shapes, see Setup For Deployment.

Project Configuration

json
{
  "name": "door-quest"
}

The VifuHub CLI detects the entry point, engine, VifuHub SDK bridge, build command, and output directory for common web projects. Add manifest fields only when you need to override detection or disable a default host feature.

Preflight Checklist

vf deploy checks the manifest and build output for you. Before deploying, make sure your project:

  • contains index.html or the entry named by main.url
  • uses relative paths for local assets
  • bundles executable JavaScript locally
  • calls AI/backend services through @vifu/hub
  • does not call OpenAI, Anthropic, OpenRouter, LM Studio, Ollama, or other backend endpoints directly from browser JavaScript

Deploy Policy

Allowed external resources:

  • Google Fonts
  • approved pinned static CSS, fonts, images, and media from package CDNs
  • ordinary external links

Blocked:

  • CDN JavaScript
  • remote import(...), importScripts(...), or Worker scripts
  • remote .js, .mjs, or .wasm URLs
  • direct external AI/API calls

Read the full Deploy Policy before publishing a third-party game.

Useful Flags

CommandUse it when
vf setupYou want to configure a project before deploying.
vf deploy --dry-runYou want to see the deploy plan without building or uploading.
vf deploy --yesYou want CI or scripts to accept detected setup defaults.
vf deploy --no-setupYou want deploy to fail if setup is missing.
vf deploy --no-buildYou already built and want to reuse the existing build.output.
vf deploy --no-shareYou want to publish without creating a playable share URL.
vf deploy --name <name>You want a stable deploy name different from the project name.

Manage Deployments

Use vf games list, vf games share, vf games submit, and vf games delete to manage deployed games. See Manage Deployments for the command details.

Bring Your Own Game

For a supported browser project, you can usually start from the project folder:

bash
cd path/to/your-game
vf deploy

If there is no project setup yet, the CLI will create one when it can clearly detect the game entry and build shape, after asking for confirmation. If detection fails, the error explains which file or setting is missing.

If Deploy Fails

The CLI reports the built file, line, rule, URL, and fix. Search your source for the URL host/package name. In bundled apps, the issue is often an optional local AI provider that is statically imported even though the deployed game uses Vifu AI.

See Troubleshooting for common fixes.