Command-line tool
highlight
brew/highlight
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Convert source code to formatted text with syntax highlighting
At a glance
- Type
- Command-line tool
- Install on
- macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
macOS
brew install highlight
Linux
brew install highlight
Produce a complete HTML document from a source code file
highlight -o html -s theme_name -S language path/to/source_code
Produce an HTML fragment, suitable for inclusion in a larger document
highlight -o html -f -S language source_file
Inline the CSS styling in every tag
highlight -o html --inline-css -S language source_file
Related command-line tools
- source-highlight
Source-code syntax highlighter - facet-pretty
Pretty-printing for Facet types with syntax highlighting and customizable formatting - enscript
Convert text to Postscript, HTML, or RTF, with syntax highlighting - cli-highlight
Syntax highlighting in your terminal terminal syntax highlight color cli ansi - Syntax Highlight
Quicklook extension for source files - chroma
General purpose syntax highlighter in pure Go accessibility color 颜色 无障碍 color-blindness 色盲 - difftastic
Diff that understands syntax diff tree-sitter - silicon
Create beautiful image of your source code
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents