Skip to main content

opensnake 🐍

The agent is thinking. You're doomscrolling. There's a better way.

GitHub Tag Lint Test PyPI - Version License: MIT Renovate

Demo

Agentic coding is magical. You describe what you want and the model explores, reasons, and returns with a solution that makes you wonder why you even have a keyboard.

Then the status bar says Thinking... and time grinds to a halt.

Suddenly you're three pages deep into a subreddit you don't care about. Twitter, again. An issue thread from 2019 about a bug in a framework you've never used. Anything to fill the forty seconds of silence while tokens appear one... by... one.

opensnake replaces that sad ritual with snake. Classic, shameless, deeply satisfying snake. It floats as a transparent overlay right over your editor — no alt-tab, no context switch, just arrow keys and a reptile with an eating disorder.

When the model starts thinking, the game opens. When it finishes, the game vanishes. You score points by eating the OPENCODE block letters scattered across the screen. Yes, you are literally consuming the name of the very thing you're waiting on. Cathartic or ironic? Your call.

opensnake is an independent project, not affiliated with or endorsed by the opencode team. We just like the tool and hate waiting.


Gameplay

You are A snake
You eat Big blocky OPENCODE letters
Worth 100 points and +3 length each
Letters spawn 10 at start, then 1 every 3 seconds (up to 100)
Controls Arrow keys to move, ESC to quit (or just lose, that works too)
Window Transparent overlay. Your coworkers will never know.

Installation

pip install opensnake
# or for the cool kids
uv tool install opensnake
# or from source if you enjoy build scripts
git clone https://github.com/hugobatista/opensnake
cd opensnake
uv sync

Then hook it in (one command, we promise):

opensnake install

Restart opencode. That's it. The daemon auto-starts — you never have to think about it. Which is fitting. The whole point is to think less.


Usage

opensnake once             # Quick game, no daemon. Just admit you want to play.
opensnake daemon           # Manual start (the plugin handles this normally)
opensnake status           # Everything nominal? Probably.
opensnake install          # Wire it into opencode
opensnake uninstall        # Why would you though
opensnake config           # Peek at or regenerate your config

Fancy mode

opensnake once --opacity 0.95 --tick-ms 50 --letter-count 200
# translation: "I want to die faster and in darker mode"

Configuration

~/.config/opensnake/config.json — your joy, your parameters:

{
  "opacity": 0.8,
  "tick_ms": 80,
  "cell_size": 32,
  "letter_count": 100,
  "initial_letters": 10,
  "spawn_interval_ms": 3000,
  "gray_map": {
    "O": [180, 220],
    "P": [160, 200],
    "E": [200, 240],
    "N": [140, 180],
    "C": [210, 250],
    "D": [170, 210]
  }
}
Field Default What it controls
opacity 0.8 Window transparency. 1.0 = "I forgot I'm at work."
tick_ms 80 Snake speed. Lower = faster = hubris.
cell_size 32 Grid cell size in pixels. Bigger = easier = boring.
letter_count 100 Max letters on screen. The GPU can handle it. Can you?
initial_letters 10 Letters at start. The calm.
spawn_interval_ms 3000 New letter every N ms. The storm.
gray_map per letter Fill/border colors. For people who care about aesthetics.

Under the hood

The plugin watches for the model state. When Thinking fires, it pings the daemon over a Unix socket. The daemon spawns a borderless Pygame window — XShape on Linux, NSWindow tricks on macOS — so the game floats transparently over everything. The snake moves on a grid, eats letters, grows. The game runs until ESC, death, or the agent finishes thinking. A 60-second watchdog keeps orphan windows from haunting your desktop.

Is this a productivity tool? It's literally a game that pops up when you're supposed to be working and disappears when it's time to pay attention again.

Well yes, it is.


Before opensnake: "I should really learn Rust while the model thinks." (opens Twitter)

After opensnake: "The snake is 47 segments long and I still haven't found the letter D."


Built (ironically) with opencode — because what better way to test a tool than making a game about waiting for it.

Release files for opensnake 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opensnake 0.1.0
File Size Uploaded
opensnake-0.1.0.tar.gz 671.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opensnake 0.1.0
File Interpreter ABI Platform
opensnake-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 686.6 kB

Release files / opensnake-0.1.0.tar.gz

Download URL opensnake-0.1.0.tar.gz
Size 671.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2cbd1b4cdaaf023acf8562a6302e659ca39354f0b0050e4ac8bcdc9826a7a9d4
BLAKE2b-256 checksum
How to use checksums
4a567b422ed79af98b67bccfb8580e4069ba1736a7660ea2b296a46488281cc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.

Transparency log

Release files / opensnake-0.1.0-py3-none-any.whl

Download URL opensnake-0.1.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc58103c618270c4e25b0b792ed4edc37131ce8a025a656e2e3f69ce6b75adb4
BLAKE2b-256 checksum
How to use checksums
96d1ce3bb3556de7d5d796131e05a0cc7928f39291ede15bc222d92683ee5551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page