Ship browser games with leaderboards, audio, and canvas - no backend needed. Works everywhere including iOS Safari.
Built by LLMs, for LLMs. Tell your agent to "build a game with star-sdk" and it works - the agent discovers the API, registers the game, wires up audio and leaderboards, and deploys. No hand-holding.
Why Star SDK?
| Need | Without Star | With Star |
|---|---|---|
| Leaderboards | Build a backend, database, auth | Star.leaderboard.submit(score) |
| Mobile audio | Handle unlock gestures, AudioContext | Star.audio.play('coin') |
| HiDPI canvas | Manual DPR scaling, coordinate math | Automatic |
| iOS Safari | Debug audio/touch issues for hours | It just works |
| Hosting | Set up hosting + backend for leaderboards | npx star-sdk deploy |
Quick Start
npm install star-sdk npx star-sdk init "My Game" # Register your game, creates .starrc
The gameId is a server-issued token from npx star-sdk init. Do not make one up — it will not work. Open .starrc, copy the gameId, and paste it below.
import Star from 'star-sdk'; Star.init({ gameId: '<paste gameId from .starrc>' }); Star.game(g => { const { ctx, width, height } = g; let score = 0; Star.audio.preload({ coin: 'coin' }); g.loop((dt) => { if (g.tap) { score += 10; Star.audio.play('coin'); } ctx.fillStyle = '#1a1a2e'; ctx.fillRect(0, 0, width, height); ctx.fillStyle = '#fff'; ctx.font = '24px sans-serif'; ctx.fillText(`Score: ${score}`, 20, 40); }); });
npx star-sdk deploy
# => Live at https://buildwithstar.com/games/<id>Examples
Complete working games — single HTML files, no build step:
- Click Frenzy — 5-second click speed game with leaderboard (play live)
- Dodge — Avoid falling obstacles, keyboard and touch controls (play live)
- Reaction Time — Test your reflexes over 5 rounds (play live)
Packages
| Package | Description |
|---|---|
star-sdk |
Umbrella package — single import for everything |
star-audio |
Mobile-first Web Audio with 17 built-in presets. Handles iOS Safari unlock |
star-canvas |
Canvas game loop, DPR scaling, input handling |
star-leaderboard |
Score submission and leaderboard display. No backend needed |
star-sdk-cli |
CLI: register games, deploy, install AI docs |
For AI Agents
Give your agent full API docs while it codes:
npx star-sdk install # Claude Code (default) npx star-sdk install cursor # Cursor npx star-sdk install codex # OpenAI Codex npx star-sdk install windsurf # Windsurf npx star-sdk install aider # Aider
Reference files for agent development:
| File | Purpose |
|---|---|
| SKILL.md | Full API reference with examples |
| AGENTS.md | Build, test, and contribute |
| llms.txt | Machine-readable documentation index |
Development
git clone https://github.com/buildwithstar/star-sdk.git cd star-sdk yarn install yarn build # Build all packages
Build and test individual packages:
yarn workspace star-audio build
yarn workspace star-audio testContributing
See CONTRIBUTING.md.