token-snake
v0.1.2
Published
๐ An LLM-themed Snake game for your terminal โ eat tokens, dodge hallucinations, grow your context window. Play while your AI agent thinks.
Maintainers
Readme
โก Play now
npx token-snakehttps://github.com/user-attachments/assets/028f55c7-0df8-4402-ad1b-bb236d9dc1a0
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-snake๐ฎ How to play
Move 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) |
๐๏ธ How it was built
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
๐ License
MIT ยฉ Vipul Gupta
