@vifu/vf
v0.1.0-alpha.19
Published
VifuHub CLI for building, validating, publishing, and playtesting interactive web experiences.
Readme
VifuHub CLI
vf is the command-line tool for building, validating, publishing, and
playtesting interactive web experiences with VifuHub.
vf manifest check
vf build
vf deployWhen run from an experience or game directory, vf deploy resolves the local
project, validates its setup, builds the game, checks the Agent Runtime
artifact, uploads only the release artifact, and prints the playable URL.
Install
curl -fsSL https://vifu.ai/cli | bash
vf --helpFor repeated use inside one project:
npm install --save-dev @vifu/vf
npx vf --helpAgent Workflows
Install the VifuHub CLI skill separately from github.com/vifudotdev/skills:
npx skills add vifudotdev/skills --skill "vifuhub-cli"Then a coding agent can start from the current directory:
Use the VifuHub CLI skill. Deploy this game directory and report the Playable URL.The skill tells agents to check vf --help, then use the one-step deploy path:
vf deploy --yesvf deploy --yes creates missing setup from detected defaults, builds, checks
the output, uploads the valid artifact, and prints Playable URL: when sharing
succeeds. If authentication is missing, run:
vf loginCreate a new project:
npm create @vifu/vifu my-game -- --template vanilla --no-interactive
cd my-game
vf deploy --yesDeploy an existing project:
cd path/to/game
vf deploy --yesYou can also pass the project path explicitly:
vf deploy ./path/to/gameProjects And Release Artifacts
A source project can use a V1 manifest.json to define Vifu-specific build and
runtime behavior:
{
"name": "my-ai-game"
}VifuHub detects Godot, Vite, and other supported project layouts before it
builds. Add manifest fields only when you need to override detection or define
an Agent Runtime feature. Do not put internal runtime keys such as runtime,
services, devices, resources, permissions, capabilities, browser,
or security in public game manifests.
README.md is the public Project Card. Its front matter can provide the title,
description, tags, and release entry:
---
name: my-ai-game
title: My AI Game
description: A playable interactive story.
runtime:
entry: index.html
---
# My AI GameSource projects and release artifacts have separate contracts:
- A source project uses native project files such as
project.godotorpackage.json, with an optionalmanifest.jsonfor Vifu-specific behavior. vf deploy <project-directory>builds the project locally and packages only the runtime output.- A ready Web artifact contains a root
README.md, a rootindex.htmlorProject.html, and runtime assets. vf deploy <release.zip>validates and uploads the ZIP byte-for-byte.vf deploy <extracted-release-directory>packages that ready artifact once without running a source build.
The runtime publisher rejects directories that still contain source-project
signals. Use vf deploy for source projects so editable workspace files are not
mistaken for release files. Editable source sharing remains a separate,
explicit vf upload source or --source workflow.
Useful commands:
vf manifest check
vf manifest check --dir ./path/to/game
vf manifest explain
vf manifest explain --dir ./path/to/game --debugmanifest explain --debug is for Agent Runtime development. It shows the
compiled internal policy that the runtime will enforce.
Release Policy
vf deploy and vf publish treat the built output as the reviewed Agent
Runtime artifact. The CLI does not rewrite the game, download CDN scripts, or
create a deploy lockfile.
Allowed:
- bundled game JavaScript
- local build output from Vite, Angular, Phaser, Three.js, Pixi, plain HTML, or another web build tool
- approved external static CSS, fonts, images, and media
- AI/backend access through
@vifu/huborwindow.Vifu
Blocked:
- remote
<script src="https://..."> - remote JavaScript
import("https://...") - remote workers or
importScripts(...) - remote
.js,.mjs, or.wasmURLs inside built files - direct calls to external AI/backend APIs from game JavaScript
If deploy fails, read the file, line, rule, URL, and fix shown by the CLI. The most common cause is an optional local or third-party provider being statically imported into a production browser bundle.
The canonical policy is .spec/runtime-artifact-policy.md.
SDK Integration
Games should call Agent Runtime capabilities through the VifuHub SDK:
const result = await Vifu.ai.generateText({
model: "quality",
messages: [{ role: "user", content: "Describe the next room." }]
});
await Vifu.gameState.save({ reason: "checkpoint" });The SDK keeps runtime transport, host authentication, model routing, quota, and backend URLs out of game code. See packages/sdk/README.md.
Existing Experiences And Games
To publish an existing browser experience or game:
- Add
manifest.json. - Start with only
name; let VifuHub infer common entry and build settings. - Build a static directory with
index.html. - Replace direct AI/backend calls with the VifuHub SDK.
- Remove unused remote/local AI providers from the published build.
- Run
vf deploy.
Extra source workflows live under explicit commands:
vf remix my-remix --from ./existing-game
vf import anki jlpt-review --apkg ./deck.apkg
vf import podcast listening-game --feed-url https://example.com/feed.xmlvf create and vf new are intentionally not exposed. Use
npm create @vifu/vifu for new template projects.
