Skip to main content

Real-time generative visualization for interactive fiction.

Project description

PipeDream

PipeDream is a utility that adds a visual dimension to text-based interactive fiction. It operates by capturing the standard output of terminal games and generating real-time illustrations of the current scene using generative AI.

Alt text

Quick Start (30 Seconds)

Experience the visualization immediately with the built-in demo cartridge.

1. Install

pip install pipedream-fiction

2. Get an API Key You need a Gemini API key for the image generation (Free tier available).

# Linux / macOS
export GEMINI_API_KEY="AIzaSy..."

# Windows (PowerShell)
$env:GEMINI_API_KEY="AIzaSy..."

3. Run the Demo Launch the GUI without arguments to play the internal mock game.

pipedream-gui

Running Real Games

PipeDream wraps any console command. If you can run a game in your terminal, PipeDream can visualize it.

Example: Colossal Cave Adventure

The perfect test bed for PipeDream.

  1. Install the game globally:
uv tool install adventure
# Windows users: uv tool install adventure --with pyreadline3 --force
  1. Launch with PipeDream:
pipedream-gui adventure

Example: Interactive Fiction (Frotz)

Play classic Z-Machine games like Zork.

pipedream-gui frotz games/zork1.z5

Features

  • Universal Compatibility: Works with Python scripts, binaries, and interpreters (Frotz, Glulxe).
  • State-Aware Navigator: A graph-based system tracks movement. If you leave a room and come back, PipeDream restores the previous image.
  • Cost Tracking: The GUI displays your session cost in real-time (via litellm), so you can monitor your API usage.
  • Visual Consistency: The "Director" AI compares new text against previous context to prevent unnecessary regenerations when you mistype a command. (Attempts to at least!)

Customizing Styles

You can override the default art style ("Oil painting, dark fantasy") with the --art-style flag.

# Pixel Art Style
pipedream-gui --art-style "Retro 8-bit pixel art, green monochrome" adventure

# Pencil Sketch
pipedream-gui --art-style "Rough pencil sketch on parchment" adventure

Cache Management

PipeDream caches aggressively to save money. If you change styles, you can wipe the world map:

pipedream-gui --clear-cache adventure

Development

If you want to play around with the source code:

  1. Clone the repo:
git clone [https://github.com/yourusername/pipedream.git](https://github.com/yourusername/pipedream.git)
cd pipedream
  1. Install in editable mode:
pip install -e .
  1. Configure Environment: Create a .env file in the root:
GEMINI_API_KEY=AIzaSy...
LLM_MODEL=gemini/gemini-2.5-flash
IMAGE_MODEL=gemini/gemini-2.5-flash-image

Troubleshooting

  • Windows "Shim" Errors: If a Python game crashes immediately on Windows, try wrapping the command to force path resolution:
pipedream-gui cmd /c adventure

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipedream_fiction-0.2.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipedream_fiction-0.2.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file pipedream_fiction-0.2.1.tar.gz.

File metadata

  • Download URL: pipedream_fiction-0.2.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pipedream_fiction-0.2.1.tar.gz
Algorithm Hash digest
SHA256 caa585b1be946338829970b89e799fb105561d9d325c90f325c55401702f0b79
MD5 6a1682ceb8857f51ad374a439c4c553a
BLAKE2b-256 10cacfe64c49b51a0c3f013634703ddd87369b1ee32458f2226415766305e186

See more details on using hashes here.

File details

Details for the file pipedream_fiction-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pipedream_fiction-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pipedream_fiction-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b64963a46fb040b07305e92ce942ab256983b6aee00a267a15782da90de47bb0
MD5 83552c11ba9aa98d5ec00e8270e3ecc9
BLAKE2b-256 641f52148666626da39e4cbdac7b25c653d77bf914af9d6a028fd78a42e74761

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page