Bash.tv → GitHub → itch.io
Step-by-step guides for connecting a Bash.tv space to GitHub and itch.io, so the Bash bot can save your code, share guides as gists, and publish your games to itch.io automatically.
Every guide has screenshots with numbered highlights, a troubleshooting table, and a checklist.
Start here
New to all this? Follow the guides in order. Each one builds on the one before it.
| # | Guide | What you get | Time |
|---|---|---|---|
| 1 | Connect GitHub | The bot can read and save code in your GitHub repo | ~5 min |
| 2 | Gists (optional) | The bot can create and update GitHub gists | ~3 min |
| 3 | itch.io + butler | The bot can upload games straight to itch.io | ~5 min |
| 4 | Auto-deploy with GitHub Actions | Every change in www/ goes to itch.io on its own, with pull request previews |
~10 min |
| 5 | Protect the main branch | Nobody can delete or rewrite main. Optionally, every change needs a pull request |
~3 min |
More services: publish to Newgrounds, Game Jolt, or CrazyGames, host on GitHub Pages, Cloudflare, or Netlify, add sounds and music, Discord build posts, and Supabase → More services
Just want one thing? Jump to it:
- “I want the bot to push code to GitHub” → Guide 1
- “I want to upload a game to itch.io from Bash” → Guide 3
- “I want my game to update on itch.io whenever I change it” → Guides 1, 3 and 4
- “I want to test changes before they go live” → Pull request previews
- “GitHub says my main branch isn’t protected” → Guide 5
- “I want my game on its own website” → GitHub Pages, Cloudflare Pages, Netlify
- “I want sound effects or music” → Freesound, Royalty-free music
- “Tell my Discord when a build goes live” → Discord webhook
Building games with a bot? The toolkit has 26 tested components to reuse, standard project docs, and quality gates that make the bot prove the game works. The template prompts make 22 starter templates with it.
How it all fits together
┌─────────────── Bash.tv space ───────────────┐
│ You + the bot make the game │
│ Keys live in Settings → API keys │
│ (the bot never sees them) │
└──────────────┬───────────────────┬───────────┘
GitHub key (1) │ │ itch.io key (3)
▼ ▼
┌──────────── GitHub repo ─────────┐ butler push ──► itch.io
│ www/ ← exported game │ (direct upload)
│ .github/workflows/ (4) │
│ push to main ──► real game ────┼──────────────────► itch.io
│ pull request ──► preview page ─┼──────────────────► itch.io (draft)
└───────────────────────────────────┘
FAQ
Keys and safety
Where do I put my API keys? Can I paste them in the chat?
**Never paste a key into the Bash chat.** Everyone watching the space can see it. Add keys only in **Settings → API keys** in your Bash space ([GitHub](/docs/01-github-setup.html#part-2-add-the-token-to-your-bash-space), [itch.io](/docs/03-itch-setup.html#part-2-add-the-key-to-your-bash-space)), or in GitHub's **Secrets** for Actions ([guide](/docs/04-github-actions-deploy.html#part-2-add-your-itchio-key-to-github)).Can the bot see my keys?
No. Bash adds the key to the bot's requests on their way out, so the bot only ever sees a placeholder. GitHub Actions secrets are hidden in logs and can't be read back, even by you.Why does GitHub Actions need its own copy of the itch.io key?
The action runs on GitHub's computers, not in Bash, so it can't use the Bash key. You add it once as the `ITCH_IO_API_KEY` secret.Can I limit the itch.io key to one game?
No. itch.io keys cover your whole account. That's why the bot's tip says to **ask before pushing to a public game**, and why the deploy action reads the target game from repo variables. If a key leaks, revoke it at <https://itch.io/user/settings/api-keys>.My GitHub token expired. What now?
Make a new one with the same permissions ([Guide 1, Part 1](/docs/01-github-setup.html#part-1-create-a-token-on-github)) and replace the key in Bash. Nothing else needs to change.GitHub
Which GitHub token permissions do I need?
| Permission | Level | Needed for | |------------|-------|------------| | Contents | Read and write | Everything: reading and saving code | | Pull requests | Read and write | The bot opening pull requests | | Workflows | Read and write | Adding or changing GitHub Actions files | | Variables | Read and write | Optional: the bot sets `ITCH_USER` / `ITCH_GAME` for you | | Actions | Read-only | Optional: the bot can read whether a deploy passed | | Gists *(account)* | Read and write | Creating gists |"Repository not found" or 404 for my private repo
That repo wasn't picked under **Repository access** on the token. Edit the token and add it."refusing to allow a Personal Access Token to create or update workflow"
Add **Workflows: Read and write** to the token ([Guide 4, Part 1](/docs/04-github-actions-deploy.html#part-1-let-the-bash-token-add-actions-files))."Your main branch isn't protected". Should I fix it?
Yes, especially before going public. The quickest way is to import a ready-made JSON ruleset ([Guide 5](/docs/05-branch-protection.html#fastest-way-import-a-ready-made-ruleset-json)). Or click **Protect this branch** and turn on **Restrict deletions** and **Block force pushes**. Add **Require a pull request** if you want every change reviewed before it goes live ([Guide 5](/docs/05-branch-protection.html)).Push rejected: "GH013: Repository rule violations"
Your branch rules require a pull request. Ask the bot to export *as a pull request*, or add yourself to the ruleset's bypass list ([Guide 5](/docs/05-branch-protection.html#troubleshooting)).Why are gist images hosted somewhere else?
GitHub doesn't let fine-grained tokens upload images to gists. The bot puts screenshots on an image host and links them ([Guide 2](/docs/02-gist-setup.html#what-works-and-one-limit)).itch.io
My game page only shows "Download", not "Run game"
Do the one-time page settings: **Edit game → Kind of project → HTML**, then check **This file will be played in the browser** on the `html5` upload, then **Save** ([Guide 3, Part 5](/docs/03-itch-setup.html#part-5-one-time-game-page-settings-only-on-the-website)).Can the bot set "Kind of project" or "played in the browser" for me?
No. The itch.io API can upload builds but can't change page settings. You set them once per game. After that, every upload updates the page automatically.I can't find "This file will be played in the browser"
Change **Kind of project** to **HTML** first. The checkbox only appears after that.What's a "channel" like html5?
butler uploads to a named slot on your game page. `html5` is the usual name for browser games.
Pushing to the same channel again replaces that build. The deploy actions use `html5` unless
you set `ITCH_CHANNEL`.
More services
Can the bot upload to Newgrounds or CrazyGames automatically?
No. Neither has an upload API, so the bot makes the ZIP and you upload it on their site. **Game Jolt** can be automated with `gjpush` ([guide](/docs/services/game-jolt.html)).Where can I get music I'm allowed to use?
Start with **Openverse**, which needs no key and lets you filter to CC0 / CC BY. Then Freesound, OpenGameArt, Incompetech, or Pixabay Music. Always credit CC BY tracks ([guide](/docs/services/royalty-free-music.html)).Do I need Supabase for leaderboards?
Not inside Bash, which has built-in saves and leaderboards. Use Supabase when the game is played elsewhere, like itch.io or your own site ([guide](/docs/services/supabase.html)).Auto-deploy (GitHub Actions)
What triggers a deploy?
- Any change inside **`www/`** pushed to **`main`** → updates the **real** game (`deploy-itch.yml`). - A **pull request** that changes `www/` → updates the **preview** page (`deploy-itch-preview.yml`). - The **Run workflow** button in the repo's **Actions** tab. Changes outside `www/`, like docs, don't deploy.How does the bot get my Bash game into www/?
It runs [`scripts/export-to-www.sh`](/scripts/export-to-www.sh), which copies the finished game,
skips private files like `.env`, checks itch.io's limits, and commits. Add `--pr` to open a
pull request instead ([details](/docs/04-github-actions-deploy.html#the-full-flow-make-it-in-bash-deploy-automatically)).
The action didn't run
It only runs when files **inside `www/`** change on `main`. Use **Actions → Deploy to itch.io → Run workflow** to start it by hand. Also check the run log for "Missing secret" or "Missing variable".No preview link on my pull request
Add the `ITCH_PREVIEW_GAME` variable and create that preview page on itch.io. Without it, the preview action skips on purpose so it never touches the real game. ([setup](/docs/04-github-actions-deploy.html#pull-request-previews))How do I know which version is live?
The version on itch.io is the short commit ID, like `406345e`, or `pr3-406345e` for previews. Match it to the commit on GitHub.What’s in this repo
.
├── README.md ← you are here
├── ROADMAP.md ← what's left to do
├── planned/ ← what's planned to build next
├── docs/ ← step-by-step guides
│ ├── 01-github-setup.md
│ ├── 02-gist-setup.md
│ ├── 03-itch-setup.md
│ ├── 04-github-actions-deploy.md
│ ├── 05-branch-protection.md
│ ├── services/ ← Newgrounds, Game Jolt, CrazyGames, Pages, Netlify,
│ │ Freesound, music, Discord, Supabase
│ └── images/ ← screenshots (personal info blurred)
├── .github/workflows/
│ ├── deploy-itch.yml ← push to main → real itch.io game
│ └── deploy-itch-preview.yml ← pull request → itch.io preview page
├── .github/rulesets/ ← branch protection JSON to import (Guide 5)
├── scripts/
│ └── export-to-www.sh ← copies a finished game into www/ and commits
├── www/ ← the game that gets deployed (index.html at the top)
├── skills/ ← skills that teach a bot these workflows, sorted by category
│ ├── core-development/
│ ├── bash-and-publishing/
│ ├── publishing-and-game-jams/ ← beta, untested
│ ├── mobile-and-cross-platform/
│ ├── graphics-and-rendering/
│ ├── gameplay-systems/
│ ├── game-ui-and-ux/
│ ├── audio-and-music/
│ ├── game-assets-and-content/
│ ├── multiplayer-and-online/
│ ├── ai-game-development/ ← beta, untested
│ ├── genres/
│ ├── testing-and-qa/
│ ├── performance/
│ ├── docs-and-maintenance/
│ └── repo-tools/
├── toolkit/ ← components, project docs and quality gates for building games
│ ├── components/ ← 26 tested building blocks, one file each
│ ├── project-docs/ ← the standard docs for a game, full and lite
│ └── quality-gates/ ← 20 checks with evidence: PASS, FAIL, NOT TESTED, NOT APPLICABLE
├── template-prompts/ ← prompts to paste into Bash.tv to make 22 starter templates
└── gists/ ← gist versions of the guides (images on an image host)
Bot skills
206 skills that teach a bot (in Bash or another coding tool) how to make, test, ship and maintain browser games.
Upload a skill’s .zip to a Bash space, or copy its folder. The full list is in skills/README.md.
| Category | Skills | About |
|---|---|---|
| Core game development | 6 | How to start, structure, plan and build any browser game. |
| Bash.tv and publishing | 8 | Bash.tv rules, and shipping games to Bash, itch.io, GitHub and other sites. |
| Publishing and game jams (beta) | 14 | Beta and untested. Jam themes, building fast to a deadline, releases, itch.io, store descriptions, names, trailer plans, screenshots, social posts, devlogs, postmortems and player feedback. |
| Mobile and cross-platform | 12 | Games that play well everywhere: phone and desktop layouts, touch, controllers, tilt, vibration, fullscreen, orientation, phone speed, Chrome/Firefox/Safari testing, installable games and accessibility. Includes the Device Lab page for trying it all on a real phone. |
| Graphics and rendering | 16 | Drawing the game: engines, art styles, animation, cameras, lighting and effects. |
| Gameplay systems | 22 | The parts that make up gameplay: physics, movement, combat, enemies, items, progression and story. |
| Game UI and user experience | 13 | Interfaces players touch: HUDs, menus, settings, tutorials, alerts, loading, transitions, results, languages, remapping and accessibility. Includes a playable UI kit demo. |
| Audio and music | 8 | Sound in browser games: the Web Audio setup, volume buses and ducking, sound pools and limits, positional sound, music that follows play, sound effects, finding audio and checking its licenses. |
| Game assets and content | 10 | Game files and content: organizing, shrinking and licensing assets, sprite sheets, and designing levels, characters, worlds, stories and items. |
| Multiplayer and online | 14 | Playing together: local co-op, rooms, servers, peer-to-peer, sync, lag hiding, cheating, scores, replays and voice. |
| AI game development (beta) | 14 | Beta and untested. Ideas, scope, fun checks, feature planning, mechanic mashups, prototype decisions, creative and technical direction, a playtest bot, updating old games, remakes, emergency repair and making new skills. Game feel is in Gameplay systems. |
| Game genres | 24 | Genre guides: recommended structure, core mechanics, balance numbers, common mistakes, and a playable starter game for each. |
| Testing and quality | 17 | Proving a game works. A bot should never call a game working just because the code was written. |
| Performance and optimization | 11 | Smooth frame rates, fast loading and long battery life. |
| Documentation and maintenance | 14 | Keeping a project understandable over time, and letting another bot or person continue it. |
| Repo and guide tools | 3 | Writing guides with marked-up screenshots, publishing them, and checking a repo is safe to make public. |
Shareable gists
The same guides as single-page gists, easy to send to someone. See gists/.
| Guide | Gist |
|---|---|
| 1. Connect GitHub | https://gist.github.com/83b60ed525138e117ffb02d6323b2918 |
| 2. Gists | https://gist.github.com/23fff39e25a3d1d782dca3acb5b824fe |
| 3. itch.io + butler | https://gist.github.com/52de8d0d8dc3f7e8b05e04a1e40bb8ab |
| 4. Auto-deploy with GitHub Actions | https://gist.github.com/695c43bc5257892c7b086bc76ea42e20 |
| 5. Protect the main branch | https://gist.github.com/1640d6fa70ba6c77dc5ea463921a72bb |
| Skill: bash-itchio-packager | https://gist.github.com/1826839df5d1a6a94d910c7439f802ca |
| Skill: bash-github-actions-itch | https://gist.github.com/e22eed8b35cf850709d82fb62981783f |
| Skill: bash-web-game-checkup | https://gist.github.com/0f6ae39042d8550eabc8fce279cfde69 |
| Skill: bash-game-audio-credits | https://gist.github.com/2a7b8a7774372234132171aacc0702b7 |
| Skill: bash-store-page-kit | https://gist.github.com/d19958765080c986d77d7d4b0160962d |
| Skill: bash-portal-achievements | https://gist.github.com/152cd8f0b72fa14ea3874e166f1d218b |
| Skill: bash-public-repo-privacy-check | https://gist.github.com/8910e4b1ceb1552c8d1a809aa16ba53f |
| Skill: bash-web-asset-shrinker | https://gist.github.com/5186a9f2d552d7a6ce432a661d29d71d |
| Skill: bash-web-deploy-anywhere | https://gist.github.com/fd45af6afb0520e5c0f1f43869b7c775 |
| Skill: bash-release-notes-discord | https://gist.github.com/4c2b5c71455db3c4290e7c7efea1b2ad |
| Skill: bash-screenshot-marker | https://gist.github.com/ac6bbf48bdbbe6f63203f2cfb0ebe056 |
| Skill: bash-guide-gist-publisher | https://gist.github.com/52b2dd93f5d0ec2de6c92b27ec33f3eb |
| Skill: bash-itch-export | https://gist.github.com/a8567e10442b66b74cc896308414ef0d |
Quick reference
| What | Value |
|---|---|
| Bash GitHub key addresses | api.github.com (Bearer token), github.com + gist.github.com (Username and password, user x-access-token) |
| Bash itch.io key address | api.itch.io (Bearer token) |
| GitHub secret | ITCH_IO_API_KEY |
| GitHub variables | ITCH_USER, ITCH_GAME, ITCH_PREVIEW_GAME (optional), ITCH_CHANNEL (optional, default html5) |
| butler push | butler push www yourname/my-game:html5 |
| Export a game | scripts/export-to-www.sh <game-folder> (add --pr for a pull request) |
| Discord build posts | GitHub secret DISCORD_WEBHOOK_URL (optional DISCORD_PREVIEW_WEBHOOK_URL) |
Useful links
- Bash.tv: https://bash.tv
- GitHub fine-grained tokens: https://github.com/settings/personal-access-tokens
- itch.io API keys: https://itch.io/user/settings/api-keys
- butler docs: https://itch.io/docs/butler/
- GitHub Actions docs: https://docs.github.com/actions