@ugames/cli
v0.1.1
Published
UGames CLI — publish vibecoded bracket and scorecard bundles as LSP8 NFTs on a creator UP
Maintainers
Readme
@ugames/cli
The ugames CLI — publish vibecoded bracket and scorecard bundles as LSP8 NFTs on a creator's Universal Profile.
Designed for the AI-vibecode → mint pipeline. You finish your bundle in Claude / Cursor / your AI tool of choice, run your build step, and ship it on-chain in one command.
What works today
init, dev and lint are fully local — scaffold a project, preview it in the
sandbox with hot reload, and check it against the protocol. Nothing leaves your
machine.
login and publish talk to a UGames API, and the default host
(https://api.ugames.app) is not deployed yet. Point them at your own with
--api <url> or the UGAMES_API environment variable:
UGAMES_API=http://localhost:3003 ugames loginUntil a public API is live, treat this as a build-and-preview toolchain: the
bundle it produces is a plain ESM module you can also upload through the web
studio at /templates/publish.
Install
Zero-install, for a one-off scaffold:
npx @ugames/cli init my-card --type scorecardFrom a workspace project (pnpm):
pnpm add -D @ugames/cliOr one-shot via dlx:
pnpm dlx @ugames/cli publishQuick start
In your project root, create ugames.config.json:
{
"name": "March Madness 64",
"templateType": "BRACKET",
"sport": "basketball",
"protocolVersion": "1.1.0",
"license": "CC0-1.0",
"bundle": "dist/bundle.mjs",
"thumbnail": "thumbnail.png",
"tags": ["bracket", "march-madness", "single-elim"],
"bracketFormat": "SINGLE_ELIM"
}Build your bundle, then:
export UGAMES_JWT=<your auth token>
pnpm ugames publish .The CLI:
- Reads + validates
ugames.config.json. - Uploads the bundle (and thumbnail) to the UGames API.
- The API pins both to IPFS, builds LSP4 metadata, pins it, encodes a VerifiableURI, and returns the
publish()calldata. - The CLI prints the calldata for you to sign in your UP browser extension.
Once you sign, the indexer picks up the mint within ~30 seconds and your template appears in the catalog.
Commands
publish [path]
Publish a template from a project directory (default .).
| Flag | Env | Default | Description |
|------|-----|---------|-------------|
| --api <url> | UGAMES_API | https://api.ugames.app | API base URL |
| --jwt <token> | UGAMES_JWT | required | Auth bearer token |
Manifest schema
See @ugames/types → TemplateManifest. Required fields:
name(1–100 chars)templateType—"BRACKET"or"SCORECARD"sport— slug (e.g.chess,basketball,universal)protocolVersion— semver string (e.g.1.1.0)bundle— path to the built JS bundle, relative to manifest
Optional:
description,license,tags,thumbnailparentTokenId—0x-prefixed bytes32 to fork an existing templatebracketFormat(brackets) —"SINGLE_ELIM"etc.scoringConfig(scorecards) — JSON config objectcapabilities— advisory capability list
What about the web upload?
A drag-drop UI is coming. Both clients hit the same POST /templates/prepare-mint endpoint, so they produce identical results. CLI is power-user; web upload is for everyone.
License
MIT.
