← Blog

How to share a game made with Claude Code with friends

Updated · 3 min read

To share a game you built with Claude Code, you have three main options depending on how quickly you want people playing and how often you plan to update it: a temporary local tunnel, a static web host or itch.io, or a game workspace with delta builds and invite links.

Option 1: Share directly from localhost with a tunnel (fastest for 10 minutes)

If your game is already running on localhost:5173 and you just want a friend in Discord to look at it right now while your laptop is open, a tunnel forwards a public HTTPS URL to your local dev server.

With Cloudflare Tunnel (no account required):

cloudflared tunnel --url http://localhost:5173

Or with ngrok:

ngrok http 5173

Trade-offs:

  • Works immediately with zero build step.
  • The link dies the moment you close your laptop or stop Vite.
  • Vite HMR over a tunnel can be sluggish for friends, and Vite dev servers aren't optimized for transferring large textures or audio files.

Option 2: Build a static bundle and upload to Cloudflare Pages, GitHub Pages, or itch.io

For a link that stays online after you close your editor, build the production bundle first:

npm run build

Then deploy the output folder (dist/ or build/):

  • Cloudflare Pages / Netlify / Vercel: Great for small HTML5/JS games (under ~15–20 MB) with no backend. Connect your GitHub repo or drag-and-drop dist/. Watch out for base paths on GitHub Pages (set base: './' in vite.config.ts so asset URLs don't 404).
  • itch.io: Zip your dist/ folder so index.html is at the root of the zip, upload it as an HTML5 project, and set the visibility to Restricted with a password if you only want friends to see it. If your game uses SharedArrayBuffer (threaded WASM), enable that checkbox in the itch.io embed settings.

Trade-offs:

  • Free and reliable for small static projects.
  • Updating a larger game (50–300 MB of art/audio) means re-uploading a full zip or hitting Git / Git LFS limits.
  • Claude Code usually can't manage private passwords, staging slots, or rollbacks on web dashboards without extra scripts.

If you are iterating quickly with Claude Code—tweaking physics, swapping art, and sending updated links to friends several times an evening—you can hand the publish step directly to the agent.

On Pita, connect Claude Code once with Pita's account MCP server (claude mcp add --transport http pita https://api.pita.sh/mcp)—or paste a per-game agent link into Claude Code:

Read https://api.pita.sh/agent/<your-token> and publish my game on Pita.

(If you don't have an account yet, Claude Code can even start a free 24-hour anonymous trial via https://pita.sh/agents.md, and Free accounts are $0 forever for 1 static game.) Claude Code builds your bundle, runs pita publish --to production (uploading only changed chunks via FastCDC), and hands back a clean link. Friends open the link and play in the browser with no account required. If you want to keep it private, leave sharing set to Invite link only and reset the link whenever playtesting wraps up.

Quick comparison

MethodBest forStays online?Handles large updates well?
cloudflared / ngrokQuick 5-minute screen-checkNo (laptop must stay on)No
GitHub Pages / Cloudflare PagesSmall (< 20 MB) static JS gamesYesModerate
itch.io (Restricted)Public or password-gated indie buildsYesFull zip re-upload each time
PitaFrequent agent-driven playtests, heavy assets, private invite linksYesYes (FastCDC delta chunks)

FAQ

Why do my game's images or audio break after deploying to GitHub Pages?

GitHub Pages serves project sites at /<repo-name>/ instead of /. Absolute paths like /sprites/hero.png will 404 unless you use relative paths (./sprites/hero.png) or set base: './' in vite.config.ts.

Can my friends play on mobile or another OS?

Yes, as long as your game exports to the browser (HTML5/WebGL/WASM) and handles touch or keyboard controls appropriately. Browser links avoid macOS Gatekeeper and Windows SmartScreen warnings that block zipped desktop binaries.

Related guides