18 comments

[ 5.0 ms ] story [ 44.9 ms ] thread
I created one I like: https://github.com/llimllib/mdriver

it can echo images with kitty image protocol, and streams the output, which I use to show LLM output as it arrives

It doesn't handle paging - you can pipe it to `less` or whatever pager for that

Markdown reader using find, fzf and lnav

  find . \( -path '*/vendor/*' -or -path '*/.git/*' -or -path '*/node_modules/*' \) -prune -or -type f -name "*.md" -print | fzf | xargs lnav
In the above command, the find command excludes directories such as "vendor" (golang), ".git" (git) and "node_modules" (nodejs). The lnav itself provides the markdown support https://lnav.org/2022/08/06/markdown-support.html
3 source files, nice code, no vibe-coding slob, nice little project... That's rare these days
Markdown is already readable as-is. How is this any different from running "more my_file.md" ?

Stop trying to re-invent the wheel when the tools are already there.

Great question- rather then having to push a change to GitHub to see the format changes you can just mdvi it now. Iterate locally is nice
It's funny because the whole idea of Markdown is that it is readable both as text and rendered, so it shouldn't require a terminal renderer.
I personally would have liked colours support like Glow has. At least the ability to theme it so we can add colours if we want. Nice tool, though.
If you like the man page aesthetic, using pandoc with groff is the most readable way to read markdown on the terminal I've found:

    mdless() {
        if command -v pandoc >/dev/null; then
            if [[ -z "$1" ]]; then
                cat | pandoc -s -f markdown -t man | groff -T utf8 -man | less
            else
                pandoc -s -f markdown -t man "$*" | groff -T utf8 -man | less
            fi
        else
            less "$@"
        fi
    }