macOS
brew install highlightlocal Homebrew formula metadata
sudo port install highlightMacPorts ports tree · textproc/highlight/Portfile · source: api.github.com
brew
Convert source code to formatted text with syntax highlighting. Version 4.20 via Homebrew; verified 2026-05-24.
install
brew install highlightlocal Homebrew formula metadata
sudo port install highlightMacPorts ports tree · textproc/highlight/Portfile · source: api.github.com
sudo apk add highlightAlpine Linux edge package indexes · highlight · source: dl-cdn.alpinelinux.org
sudo apt install highlightDebian stable package indexes · highlight · source: deb.debian.org
sudo dnf install highlightFedora Rawhide package metadata · highlight · source: dl.fedoraproject.org
nix profile install nixpkgs#highlightnixpkgs package indexes · highlight · source: raw.githubusercontent.com
sudo pacman -S highlightArch Linux sync databases · highlight · source: geo.mirror.pkgbuild.com
sudo zypper install highlightopenSUSE Tumbleweed package metadata · highlight · source: download.opensuse.org
choco install highlightChocolatey community package catalog · highlight · source: community.chocolatey.org
scoop install main/highlightScoop official bucket manifest trees · bucket/highlight.json · source: api.github.com
overview
Convert source code to formatted text with syntax highlighting
history
highlight, by André Simon, converts source code into syntax-highlighted output for formats such as HTML, XHTML, RTF, ODT, TeX, LaTeX, SVG, BBCode, Pango markup, and terminal color escape sequences.
Its long-running appeal is that language definitions, themes, and plug-ins are data-driven Lua scripts rather than hardcoded syntax tables, making it useful both as a CLI converter and as a document-generation component.
The changelog traces the project back to `src2css` 0.1 in April 2002, followed by `highlight` 0.1 in July 2002 and `highlight` 1.0 in August 2002. Early releases added batch conversion, XHTML, RTF, TeX/LaTeX output, and more language definitions.
The 2.x line expanded output formats, language coverage, shared-library targets, filetype mapping, compatibility options for GNU source-highlight, and a rewritten Qt GUI. In 2009, the changelog records a license move from GPLv2 to GPLv3.
The 3.0 beta in June 2010 was a structural change: language definitions, themes, and filetype configuration were converted to Lua scripts, and a plug-in option was added. The 4.x line continued the Lua-script model while adding service-mode, LSP-related improvements, more languages, CMake/Meson work, and C++17 refactoring.
highlight spread through Unix package managers because it is useful in documentation pipelines, static-site generation, editor/tool integrations, and terminal workflows. The input package map lists Alpine, Homebrew, Chocolatey, Debian/Ubuntu, Fedora, MacPorts, Nix, Arch, Scoop, and openSUSE-style packages.
Official extras also show integration beyond one-off CLI use. The Pandoc example demonstrates using highlight as an external highlighter inside document preprocessing, including importing external source files and inline themes.
Common use is `highlight -i main.cpp -o main.cpp.html` for HTML, `highlight < main.cpp > main.cpp.html --syntax cpp` for standard-input workflows, or `highlight -O latex` for TeX/LaTeX output. Batch and recursive options let it process trees of source files.
Users customize behavior through language definitions, themes, plug-ins, file mappings, and output-format flags. The manual documents terminal truecolor and xterm256 output as well as document formats, making the tool relevant both on the command line and in generated artifacts.
highlight is package-nerd material because it is old-school Unix plumbing that still tracks new languages and output targets. It can sit behind manpage/documentation generation, static websites, code samples, and terminal previews without forcing a runtime-heavy web stack.
Its Lua-definition architecture is also useful for downstreams: language and theme behavior can be patched or extended as data files, which fits distribution packaging better than editing core parser code for every syntax tweak.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
highlight | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
http://andre-simon.de/doku/highlight/en/highlight.php
install metadata
| Package key | brew:highlight |
|---|---|
| Version | 4.20 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/highlight |
| Homepage | http://andre-simon.de/doku/highlight/en/highlight.php |
| Repository | https://gitlab.com/saalen/highlight |
| Upstream docs | http://andre-simon.de/doku/highlight/en/highlight.php |
| License | GPL-3.0-or-later |
| Source archive | https://gitlab.com/saalen/highlight/-/archive/v4.20/highlight-v4.20.tar.gz |
| Last updated | 2026-05-24T11:59:53Z |
| Pulse | updated |
| Dependencies | lua |
| Build dependencies | boost, pkgconf |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | highlight |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
highlight 4.10-1+b2
Universal source code to formatted text converter
sudo apt install highlighthighlight-common 4.10-1
source code to formatted text converter (architecture independent files)
sudo apt install highlight-commonlibhighlight-perl 4.10-1+b2
perl bindings for highlight source code to formatted text converter
sudo apt install libhighlight-perlhighlight
nix profile install nixpkgs#highlighthighlight 4.10-1build2
Universal source code to formatted text converter
sudo apt install highlighthighlight-common 4.10-1build2
source code to formatted text converter (architecture independent files)
sudo apt install highlight-commonlibhighlight-perl 4.10-1build2
perl bindings for highlight source code to formatted text converter
sudo apt install libhighlight-perlhighlight 4.19-r0
Fast and flexible source code highlighter
http://www.andre-simon.de/doku/highlight/highlight.html
sudo apk add highlighthighlight-bash-completion 4.19-r0
Bash completions for highlight
http://www.andre-simon.de/doku/highlight/highlight.html
sudo apk add highlight-bash-completionhighlight-doc 4.19-r0
Fast and flexible source code highlighter (documentation)
http://www.andre-simon.de/doku/highlight/highlight.html
sudo apk add highlight-dochighlight-fish-completion 4.19-r0
Fish completions for highlight
http://www.andre-simon.de/doku/highlight/highlight.html
sudo apk add highlight-fish-completionhighlight-zsh-completion 4.19-r0
Zsh completions for highlight
http://www.andre-simon.de/doku/highlight/highlight.html
sudo apk add highlight-zsh-completionhighlight 4.20-4.fc45
Universal source code to formatted text converter
sudo dnf install highlighthighlight-gui 4.20-4.fc45
GUI for the highlight source code formatter
sudo dnf install highlight-guihighlight 4.20-1
Fast and flexible source code highlighter - CLI version
http://www.andre-simon.de/doku/highlight/highlight.html
sudo pacman -S highlighthighlight 4.18-1.4
Universal Source Code to Formatted Text Converter
sudo zypper install highlightsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.