CONTEXT JAMMING

Field notes from inside the context window.

MULTIMODAL UNIX · MMPipe

The Unix pipe,
for everything.

The Unix pipe (|) assumes everything is text. When you pipe binary media—an image, a video frame, an audio clip—the receiving program has no idea what it is looking at. MMPipe fixes this with a lightweight framing protocol so vision models return plain UTF-8 that grep, awk, and sed can consume exactly as Thompson intended.

Universal Media Pipe ProtocolZero DependenciesLegacy Tools Untouched
THE SACRED CONTRACT

Universal Media Pipe Protocol (UMPP)

Every UMPP stream begins with a signature header block that any downstream program can read instantly:

MMP/1.0
Content-Type: image/png
Content-Length: 84321

<raw binary payload>

The magic bytes MMP/1.0\n let tools distinguish a framed media stream from raw bytes or plain text. No magic-byte sniffing required in the happy path (though analyze_vision gracefully falls back when you just cat a file).

THE PIPELINE

How it works

StepCommandRole
01mcatEmits UMPP-framed binary to stdout
02|Standard Unix pipe — completely unchanged
03analyze_visionReads frame, calls Gemini, prints UTF-8 text
04grep / awk / sedConsumes plain text exactly as before

The multimodal complexity is fully contained inside analyze_vision. The boundary between programs stays plain text — the original Unix contract is restored.

IMMEDIATE VALUE

Usage

BASIC — DESCRIBE AN IMAGE
mcat photo.jpg | analyze_vision
WITH A TARGETED PROMPT
mcat diagram.png | analyze_vision "List every label visible in this diagram."
PIPE THE RESULT INTO CLASSIC TOOLS
mcat screenshot.png | analyze_vision "What colors appear?" | grep -i red
WORKS WITH PLAIN CAT (FALLBACK)
cat photo.jpg | analyze_vision "What is this?"

Without GEMINI_API_KEY, analyze_vision runs in mock mode and emits a deterministic placeholder. Perfect for testing pipelines.

V2 — ERGONOMICS LAYER

Three progressive enhancements

mmpick

Native macOS file picker (osascript). Emits one MMP/1.0 envelope per selected file with an X-MMP-Source header. Supports multi-select.

Source once via shell/mmpick.sh

mmkitty

Non-destructive Kitty Graphics Protocol bridge. Renders an inline thumbnail and passes the original UMPP envelope downstream unchanged.

Works in Kitty; graceful text fallback elsewhere.

mmtui

Full-screen Textual TUI. File browser + pipeline builder + live output. Keyboard-driven composition of complex media → text pipelines.

pip install textual

PHILOSOPHY

The Sacred Contract restored

All the fancy multimodal reasoning happens inside a single, well-behaved program. Everything on either side of the pipe continues to speak the only language Unix ever promised: plain text.

MMPipe is deliberately dependency-free in the core (Python stdlib only) and ships as a single executable script plus a handful of optional ergonomic bridges. It is the minimal, correct extension that makes the 1970s pipe model work in 2026.

ONE-LINE INSTALL
git clone https://github.com/bretkerr/MMPipe.git
cd MMPipe
bash install.sh
source ~/.zshrc   # or ~/.bashrc
Requirements: Python 3.10+ (stdlib only for core), GEMINI_API_KEY (optional — mock mode works without it). No virtualenvs, no pip for the base experience.
VIEW SOURCE ON GITHUB →

Imported from bretkerr/MMPipe. A pure expression of Unix philosophy applied to the multimodal era.

CONTEXT JAMMING // MULTIMODAL UNIX
MMPipe — because the pipe was never the problem. The assumption that everything is text was.