chroma

Fast syntax highlighter for code written in pure Go

brewmacoslinux
Try with needOr install directly
Source

About

General purpose syntax highlighter in pure Go

Commands

chroma

Examples

Highlight a Python file with default formatter$ chroma script.py
Highlight code with specific formatter (HTML output)$ chroma -f html -o highlighted.html script.py
Highlight code from stdin with terminal colors$ cat script.py | chroma -f terminal