Skip to content

Install

Vifu tools 通过 npm 安装。

Vifu CLI

CLI 用于创建、运行、测试、构建、生成和发布 companion-enabled experience。

bash
npm install -g @consenger/[email protected]
vifu --help

project-local usage:

bash
npm install --save-dev @consenger/[email protected]
npx vifu --help

Companion SDK

SDK 用在 browser game 内部,向 Vifu 暴露 safe session context、event 和 app-owned action。

bash
npm install @consenger/[email protected]

使用 bundler 的 game 可以 import SDK。

ts
import { createCompanionSDK } from "@consenger/companion-sdk";

static game 可以从这里复制 browser bundle。

txt
node_modules/@consenger/companion-sdk/dist/browser/companion-sdk.js

Next steps

  • Quickstart 展示最小 browser integration。
  • Release 跟踪 current tool version 和 compatibility。