Programming game · JS/TS · open source soon
Your snake bot vs. everyone else's.
- Create a bot with
npx zerosnake init my-snake, or with one prompt to Claude Code. Both open at launch, when the CLI goes on npm. - Watch your snake play the house bots on your machine. No account needed.
- Deploy it: the CLI's
loginopens your browser to sign in with GitHub.
A slither.io-style arena where every snake is a program. Describe a strategy to Claude Code, Cursor or any coding agent, or write the TypeScript yourself. npx zerosnake deploy puts it in rooms that run around the clock, with no server for you to host. It earns a rating, and recent deaths come with a replay and a trace of what killed it.
How it works
Write it
Tell Claude Code, Cursor or any coding agent what kind of snake you want, or write it yourself. The project template gives the agent the rules, the bot API and skills for trying strategies and debugging deaths.
npx zerosnake simplays it against the house bots in your browser.Ship it
npx zerosnake deployruns the checks the server runs: the bot loads, stays within its budget and beats the easiest house bot. Then the arena runs it in a sandbox, so there's no server for you to host. Every version's source is public on its bot page.Watch it, fix it
Rooms run around the clock. Each spawn-to-death is a life with a score, and after 30 lives your bot is ranked. Recent deaths come with a replay (kept two days, longer for the best lives) and a trace of what your bot saw and did, so you (or Claude) can fix it and ship v2.
Your bot is one function
Every tick (10 a second of game time), tick() gets what your snake sees: food and other snakes within 40 units of its head, and how far the wall is. It returns how much to turn and whether to boost (double speed, paid for in length). That's the whole API; the strategy is yours.
import { defineBot, nearestDanger, nearestFood,
steerAway, steerToward } from "@zerosnake/sdk";
export default defineBot({
tick(state) {
const danger = nearestDanger(state);
if (danger && danger.gap < 5)
return { turn: steerAway(state.self, danger.point) };
const food = nearestFood(state);
if (!food) return { turn: 0 };
return { turn: steerToward(state.self, food) };
},
});For serious bot authors
- Deterministic
- A seeded engine with its own math: the same seed and the same bots give the same match, every time, so any local match can be replayed from its seed.
- Metered, not timed
- About 10 ms of CPU per tick, counted in cost units so it's the same on every machine. 8 MiB of memory, a 256 KiB bundle, no I/O, no clock.
- Ranked by evidence
- The mean score over a bot's last 200 lives, ranked by the low end of its range, so a lucky streak can't beat a steady record.
- Claude is optional
- The arena doesn't know who wrote the code. Every bot gets the same view and the same budget.
From zero to the arena
Start with Claude
Coming at launchOn launch day a button here copies one prompt for Claude Code (or any coding agent). Pasted into an empty folder, it creates your bot, explains it, writes a first strategy, tests it, and walks you through signing in with GitHub and deploying. It needs the zerosnake package on npm, so it isn't here yet.
Or by hand
Coming at launchTry it on your machine (no account)
npx zerosnake init my-snake# starter bot, CLAUDE.md, AGENTS.md and skillscd my-snakenpx zerosnake sim# your snake vs the house bots, in your browserclaude# then: "make my snake hunt smaller snakes"
Put it in the arena
npx zerosnake test# the same checks the server runsnpx zerosnake login# opens your browser: sign in with GitHubnpx zerosnake deploy# it joins the arena when the checks pass
Free. Needs Node.js 24+. Everything up to test runs on your machine with no account; GitHub sign-in is only for login and deploy. The starter bot already beats easy, the bar for entering the arena: your job is to beat the rest. Getting started has every step and option.
Not on npm yet
npx zerosnakewon't run until launch day, when the package goes on npm and the repository opens.
More
- LeaderboardEvery bot with 30+ lives, ranked so a lucky streak can't beat a steady record.
- DocsRules, bot API, sandbox limits, rating and the FAQ.
- GitHub soonEngine, sandbox, CLI, house bots and this site. Open source at launch.