Bun-targeted. Installs theDocumentation Index
Fetch the complete documentation index at: https://openturn.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
openturn command-line binary.
Commands
openturn create <project-dir> [--template local|multiplayer]
Scaffold a new project in an empty directory.
package.json, tsconfig.json, app/game.ts, app/page.tsx, app/openturn.ts. The game template is a two-player counter; swap it out once you have things running. Templates:
local— single-device React app.metadata.runtime = "local".multiplayer— cloud-ready React app.metadata.runtime = "multiplayer"withgameKeyandschemaVersion.
openturn dev [project-dir] [--port <port>]
Run the project under a Bun-backed dev server with Vite HMR and live reload of app/game.ts.
metadata.runtime is multiplayer, the dev server also mounts @openturn/server, persists rooms in SQLite, and accepts WebSocket connections. Anonymous authentication is provided via @better-auth so every browser window gets its own user.
openturn dev <deployment-module> [--port <port>] [--db <path>]
Run a pre-built deployment module (a GameDeployment<TGame> exported from a module) against the local hosted stack. Useful for loading an already-deployed-shaped artifact locally.
openturn build [project-dir] [--out <dir>] [--deployment-id <id>] [--project-id <id>]
Run the build pipeline. Output defaults to .openturn/deploy.
openturn deploy [project-dir] [--project <slug>] [--name <name>] [--url <url>] [--token <token>]
Build and upload the project to the cloud control plane.
openturn login. See how-to: deploy to openturn cloud.
openturn login [--url <url>] [--token <token>]
Store a cloud auth token.
~/.openturn/cloud-auth.json. --url overrides the default control plane (for staging).
openturn logout
Clear stored credentials.
Programmatic API
The CLI also exports its local dev server for integration.startLocalDevServer(options)
LocalDevServerOptions
iframe— mount an externally-hosted iframe bundle against the local authoritative backend.static— serve a pre-built deployment (e.g.openturn buildoutput) fromoutDirand embed it as the iframe.
LocalDevServer
createOpenturnProject(options)
The underlying openturn create implementation:
removeDatabaseFile(path)
Delete a local dev SQLite database. Use for reset helpers.
Persistence schema
The SQLite database has these tables:openturn_rooms— room state (branch, checkpoint, log, match, seed, deployment version).openturn_room_players— seat assignments.openturn_audit_events— audit log.user,session,account,verification— Better Auth tables for anonymous sessions.