Beam Bloggers Webring
Read post

Marcli: Markdown Belongs in the Terminal

Marcli is a Rust library that renders CommonMark Markdown as richly styled ANSI terminal output. It uses comrak (GitHub's Markdown parser) for parsing and syntect (Sublime Text grammars) for syntax highlighting. The API is minimal — a single render() function call returns a styled string. Supported elements include headings with color hierarchy, bullet/ordered lists with Unicode markers, fenced code blocks with box-drawing borders and syntax highlighting, tables, task lists, block quotes, and links. Every visual aspect is controlled via a flat Theme struct that can be loaded from TOML files. Additional options include CRLF support for web terminals (xterm.js) and an escape_sequences flag to strip ANSI codes for logging or piping. The library has only six dependencies and no async runtime, making it suitable for CLI tools that need styled help text or error messages without pulling in a full TUI framework.

    #rust#markdown
May 24•8m read time•From rocket-science.ru
Post cover image
Table of contents
What It DoesSupported ElementsSyntax Highlighting That Works Without ConfigurationFull Theming via TOMLCRLF Support for xterm.js and Web TerminalsStripping ANSI for Plain TextThe Dependency StoryWhy Marcli Instead of the AlternativesThe Argument for LightweightLinks
2.9K Impressions
Beam Bloggers Webring's image
Beam Bloggers Webring

BeamBloggers is a specialized resource center for Apache Beam enthusiasts, offering an extensive arr...

20 Followers

•

291 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard