Skip to content

Deploy to Vifu

vifu deploy is the one-command path from a local game project to a playable Vifu cloud game.

bash
cd path/to/game
vifu deploy

For an explicit path:

bash
vifu deploy ./path/to/game

What Deploy Does

  1. Resolves the game directory.
  2. Starts project setup when no Vifu 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, vifu 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"
}

Vifu detects the entry point, engine, 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 platform feature.

Preflight Checklist

vifu 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/sdk
  • 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 adapting a third-party game.

Useful Flags

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

Manage Deployments

Use vifu games list, vifu games share, vifu games submit, and vifu 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
vifu deploy

If there is no Vifu setup yet, Vifu 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.