An LLM-themed Snake game for your terminal.
Eat tokens. Dodge hallucinations. Grow your context window.
Play while your AI agent thinks.
npx token-snaketoken-snake-demo.mp4
Want music? Add --music for chiptune beats.
npx token-snake --musicOr install globally so it's always one keystroke away:
npm i -g token-snake
token-snakeMove the snake. Eat the good tokens. Avoid the bad ones. Don't hit the walls, obstacles, or yourself.
| Key | Action |
|---|---|
W A S D / Arrow keys |
Move |
H J K L (vi-style) |
Move |
P |
Pause / Resume |
Q |
Quit |
Enter |
Restart (after game over) |
An AI built the game you play while waiting for AI.
The stack is intentionally minimal:
- Pure TypeScript
- Zero runtime dependencies
- Renders directly via
fs.writeSync(1)to bypass Node.js stream machinery - Use alternative screen buffers and DEC Private Mode 2026 to eliminate any flickering
MIT ยฉ Vipul Gupta