Marcli - render markdown in terminal

I extracted the part rendering markdown to terminal (ANSI escape sequences) from yeesh to a separate library. Welcome Marcli.

It leverages MDEx to parse markdown and makeup to highlight code blocks.

Marcli converts Markdown into styled terminal text using ANSI escape sequences. It parses via MDEx and renders headings, lists, code blocks, inline formatting, links, images, and more as richly styled output for terminal emulators.

Supported Elements

  • Headings (h1: bold yellow, h2: bold cyan, h3+: bold white)
  • Bold, italic, strikethrough, inline code
  • Bullet lists (triangle markers) and ordered lists (circled numbers)
  • Code blocks with optional language headers (syntax-highlighted when a makeup_lang lexer is loaded)
  • Block quotes (vertical bar prefix)
  • Thematic breaks (horizontal rules)
  • Links (underlined blue with dimmed URL)
  • Images (bracketed alt text with URL)
  • Task list items (checkbox markers)
  • Shortcodes (emoji)

Enjoy!

17 Likes

v0.2.0 got released with: tables with pseudographic + nested lists indent fix.

Enjoy!

2 Likes

v0.3.0 Sophisticated Color management with Color - a comprehensive color library

Kudos to @kip.

1 Like