Project

marvi

0.0
The project is in a healthy, maintained state
Renders Markdown with ANSI colors in pipes and an interactive curses pager in TTY.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Marvi

Marvi is a terminal Markdown renderer. It parses Markdown and displays it with ANSI colors and styles directly in your terminal.

Installation

gem install marvi

Or add to your Gemfile:

bundle add marvi

Usage

CLI

Render a Markdown file:

marvi README.md

Read from stdin:

cat README.md | marvi
echo "# Hello **world**" | marvi

Ruby API

require "marvi"

markdown = File.read("README.md")
puts Marvi::Renderer.new.render(markdown)

Supported Markdown elements

  • Headings (#, ##, ###, ...)
  • Bold (**text**) and italic (*text*)
  • Inline code (`code`)
  • Code blocks (```)
  • Unordered and ordered lists
  • Blockquotes (> text)
  • Horizontal rules (---)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt.

bin/setup
rake test
bin/console

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/takkanm/marvi.

License

The gem is available as open source under the terms of the MIT License.