pi-snake-timepass

A centered Snake game that pops up automatically while Pi is working. Features 'Hard' and 'Easy' modes, adjustable speed, and wall wrap-around.

Package details

extension

Install pi-snake-timepass from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-snake-timepass
Package
pi-snake-timepass
Version
1.0.1
Published
Apr 28, 2026
Downloads
260/mo · 260/wk
Author
mrbeandev
License
unknown
Types
extension
Size
78.7 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/snake-timepass.ts"
  ],
  "image": "./demo.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

🐍 Pi Snake Time-Pass

A centered Snake game for the Pi coding agent that pops up automatically to keep you entertained while the AI is working.

Pi Snake Demo

Features

  • Automatic Launch: Starts automatically when the AI begins a turn (agent_start).
  • Auto-Close: Closes immediately when the AI finishes its response (agent_end).
  • Centered Layout: Perfectly centered in your terminal.
  • Top Placement: Rendered as a widget at the top of the conversation so it doesn't interrupt the chat flow.
  • Two Game Modes:
    • Easy: Constant speed, manually adjustable.
    • Hard: Speed increases as your snake grows longer.
  • Wall Wrap-around: Toggle between dying on wall impact or wrapping around to the other side.
  • Persistence: Game state (high score, position, settings) is saved in the session and can be resumed across prompts.

Installation

Install directly via Pi from npm (recommended):

pi install npm:pi-snake-timepass

Or install the bleeding-edge version from GitHub:

pi install git:github.com/mrbeandev/pi-snake

How to Play

Controls

  • Arrows / WASD: Move the snake.
  • Any Key: Start playing from the paused state.
  • M: Toggle Walls (ON/OFF).
  • H: Toggle Mode (Easy/Hard).
  • + / -: Adjust base speed (Easy mode).
  • Q / ESC: Manually quit to watch the AI progress.
  • R: Restart game (on Game Over or Resume menu).

Manual Launch

You can also launch the game manually at any time using the slash command:

/snake

Updates

To get the latest features and improvements:

pi update