LLM plugin for beautiful markdown rendering using Rich.
Install this plugin in the same environment as LLM.
llm install llm-richifyOnce installed, this plugin automatically enhances the output of
llm prompt commands with beautiful markdown rendering.
llm prompt "Write a markdown document with headers, code blocks, and lists"The output will be rendered with:
- Syntax-highlighted code blocks
- Styled headers (left-aligned with # prefix)
- Properly formatted lists and other markdown elements
- Real-time streaming rendering for immediate visual feedback
- Real-time streaming: Markdown is rendered as it streams from the LLM
- Custom heading styles: Headers are left-aligned with # prefix for better readability
- Syntax highlighting: Code blocks are highlighted with the ansi_dark theme
- Fallback support: Automatically falls back to plain text if Rich rendering fails
- Zero configuration: Works automatically after installation
This plugin registers a custom class:
RichifyPromptExecutor: Extends LLM's default prompt execution to render output as beautifully formatted markdown using the Rich library.
Inspired by the richify tool and the discussion at simonw/llm#12 (comment).
Custom heading implementation based on a tip from @llimllib.