Streamdown  by day50-dev

Streaming Markdown parser for TUIs

created 4 months ago
284 stars

Top 93.1% on sourcepulse

GitHubView on GitHub
Project Summary

Streamdown is a real-time, streaming Markdown parser designed for terminal-based applications, particularly those outputting content from Large Language Models (LLMs). It aims to provide a superior viewing and interaction experience within the terminal, enhancing readability, code copying, and interactive debugging for AI-generated text.

How It Works

Streamdown processes Markdown streams in real-time, rendering them directly in the terminal. It prioritizes preserving the integrity of code blocks for clean copying, unlike other renderers that may introduce artifacts with wrapped lines. The tool supports advanced features like embedded images, hyperlinks (OSC 8), and clipboard integration (OSC 52), and offers a plugin system for extensibility, such as rendering LaTeX. Its design allows it to function as a drop-in replacement for standard pagers or as an interactive wrapper for other programs, retaining full keyboard interactivity.

Quick Start & Requirements

  • Install via pip: pip install streamdown or pipx install -e . (from source).
  • Supports Python 3.x.
  • Configuration is managed via a TOML file, with defaults created on first run.
  • Demo available via python/sd.py tests/*md.

Highlighted Details

  • Real-time rendering of streaming Markdown from LLMs or tools like curl.
  • Preserves code block integrity for clean copy-pasting, configurable via PrettyBroken.
  • Supports images, hyperlinks (OSC 8), and clipboard integration (OSC 52).
  • Interactive wrapper mode (--exec) retains full keyboard control.
  • Highly configurable styling via HSV color manipulation and TOML settings.

Maintenance & Community

  • Developed by day50-dev.
  • Links to explore more projects from DAY50 are provided.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Some features may not be supported on all operating systems, and users are encouraged to file tickets for missing platform support. The PrettyBroken and PrettyPad options, while enhancing appearance, can negatively impact code copying.

Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
221 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.