Fork this repo, write your snake in snake.go, validate locally with Dream, deploy to aventr.cloud, and register on play.battlesnake.com.
Fork -> Codespaces -> init -> edit snake.go -> test -> deploy -> play
One terminal. You only ever edit snake.go — everything else is handled by the scripts via tau and Dream.
- Fork taubyte/battlesnake.
- On your fork: Code -> Codespaces -> Create codespace on main (4-core / 8 GB).
- Wait for post-create (
tauvendored +@taubyte/dream@latestfrom npm). Should finish in a few minutes. - Optional:
bash scripts/install-skills.shfor Copilot agent skills.
bash scripts/init.shAuthenticates with tau, starts Dream (dream start), creates your Taubyte project, and runs the initial build.
Edit snake.go. Your handler receives Battlesnake game state on POST /move and returns:
{ "move": "up" }(up | down | left | right)
bash scripts/test.sh- Compiles
snake.goto WASM with Docker (taubyte/go-wasi) - Runs
dream inject push-all - Waits for the Dream build and shows the result
Fix errors and re-run until it passes.
bash scripts/deploy.shSelects aventr.cloud, imports your project, creates/updates the domain, pushes config + code, waits for the remote build, tests POST /move, and prints your live HTTPS URL.
Copy the HTTPS URL from deploy.sh (https://<your-fqdn>/move) -> play.battlesnake.com -> create a snake -> paste the URL.
# edit snake.go
bash scripts/compile.sh # optional fast compile check
bash scripts/test.sh # Dream build gate
bash scripts/deploy.sh # deploy + live test| Command | What it does |
|---|---|
bash scripts/ensure-tools.sh |
Fix/install tau + dream + npm (run this first if anything missing) |
bash scripts/doctor.sh |
Preflight — checks tau, dream, docker, gh |
bash scripts/dream-foreground.sh |
Optional — run dream start in foreground |
bash scripts/dream-status.sh |
Check Dream universe status |
bash scripts/init.sh |
Once: Dream + tau project + templates + initial build |
bash scripts/compile.sh |
Docker WASM compile check (no cloud) |
bash scripts/test.sh |
Compile + dream inject push-all + wait for build |
bash scripts/deploy.sh |
Deploy to aventr.cloud + test /move |
bash scripts/logs.sh |
Recent build status on aventr.cloud |
bash scripts/tau-login.sh |
Log tau in (auto-runs on Codespace create) |
| Problem | Fix |
|---|---|
| tau / auth errors | bash scripts/tau-login.sh |
Dream stuck / default does not exist |
Workshops = legacy Dream. Terminal 1: bash scripts/dream-foreground.sh then Terminal 2: bash scripts/init.sh |
| Compile fails | Read Docker output, fix snake.go, run compile.sh again |
| Dream build fails | Check output from test.sh, fix snake.go, retry |
| Deploy fails | bash scripts/logs.sh, wait ~30s, retry deploy.sh |
/move returns empty |
Wait ~30s for deploy to settle, then retry deploy.sh |
| tau / dream / npm not found | bash scripts/ensure-tools.sh |
| Anything broken before init | bash scripts/ensure-tools.sh && bash scripts/doctor.sh |
MIT — see LICENSE.