# Install highlight with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, zypper

Convert source code to formatted text with syntax highlighting. Version 4.20 via Homebrew; verified 2026-05-24.

## Install

```sh
sudo av install brew:highlight
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install highlight
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install highlight
```

  Evidence: MacPorts ports tree: textproc/highlight/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add highlight
```

  Evidence: Alpine Linux edge package indexes: highlight from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install highlight
```

  Evidence: Debian stable package indexes: highlight from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install highlight
```

  Evidence: Fedora Rawhide package metadata: highlight from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#highlight
```

  Evidence: nixpkgs package indexes: highlight from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S highlight
```

  Evidence: Arch Linux sync databases: highlight from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install highlight
```

  Evidence: openSUSE Tumbleweed package metadata: highlight from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install highlight
```

  Evidence: Chocolatey community package catalog: highlight from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='6.8399997','dnscrypt-proxy'

- Scoop (92%):

```sh
scoop install main/highlight
```

  Evidence: Scoop official bucket manifest trees: bucket/highlight.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:highlight
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/highlight>
- **Version:** 4.20
- **Source summary:** Convert source code to formatted text with syntax highlighting
- **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
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- highlight (cli)
- highlight (alias)

## Dependencies

- lua

## Build dependencies

- boost
- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.20
- Package-manager updated: 2026-05-24
- Local data: ok
- Upstream repository: http://andre-simon.de/doku/highlight/en/highlight.php
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 2002: src2css 0.1 appears, followed by highlight 0.1 and highlight 1.0.
- 2008: 2.6-14 adds GNU source-highlight compatibility options.
- 2009: 2.10 changes the project license from GPLv2 to GPLv3.
- 2010: 3.0 beta converts language definitions, themes, and filetype data to Lua scripts.
- 2021: 4.0 starts the 4.x line.
- 2023: 4.6 adds service-mode support.
- 2026: 4.20 records C++17 refactoring and more language/build-system updates.

### Related projects

- GNU source-highlight is a related converter; highlight explicitly added compatibility options for some of its CLI behavior.
- Artistic Style is bundled or updated through the changelog for source-code reformatting features.
- Pandoc is a documented integration target via highlight's extras, where highlight can provide external code highlighting in document workflows.

### Sources

- Changelog: https://gitlab.com/saalen/highlight/-/blob/master/ChangeLog.adoc
- Language list: https://gitlab.com/saalen/highlight/-/blob/master/README_LANGLIST.adoc
- Manual: http://andre-simon.de/doku/highlight/en/highlight.php
- Pandoc extra: https://gitlab.com/saalen/highlight/-/blob/master/extras/pandoc/README.html
- README: https://gitlab.com/saalen/highlight#readme


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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:** head, stable

## Other Package-Manager Records

- Debian apt - highlight - 4.10-1+b2: normalized package name match | Debian stable package indexes: highlight from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Universal source code to formatted text converter | http://www.andre-simon.de
- Debian apt - highlight-common - 4.10-1: normalized package name match | Debian stable package indexes: highlight-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | source code to formatted text converter (architecture independent files) | http://www.andre-simon.de
- Debian apt - libhighlight-perl - 4.10-1+b2: normalized package name match | Debian stable package indexes: libhighlight-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | perl bindings for highlight source code to formatted text converter | http://www.andre-simon.de
- Nix - highlight: normalized package name match | nixpkgs package indexes: highlight from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - highlight - 4.10-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: highlight from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Universal source code to formatted text converter | http://www.andre-simon.de
- Ubuntu apt - highlight-common - 4.10-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: highlight-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | source code to formatted text converter (architecture independent files) | http://www.andre-simon.de
- Ubuntu apt - libhighlight-perl - 4.10-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libhighlight-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | perl bindings for highlight source code to formatted text converter | http://www.andre-simon.de
- apk - highlight - 4.19-r0: normalized package name match | Alpine Linux edge package indexes: highlight from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Fast and flexible source code highlighter | http://www.andre-simon.de/doku/highlight/highlight.html
- apk - highlight-bash-completion - 4.19-r0: normalized package name match | Alpine Linux edge package indexes: highlight-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash completions for highlight | http://www.andre-simon.de/doku/highlight/highlight.html
- apk - highlight-doc - 4.19-r0: normalized package name match | Alpine Linux edge package indexes: highlight-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Fast and flexible source code highlighter (documentation) | http://www.andre-simon.de/doku/highlight/highlight.html
- apk - highlight-fish-completion - 4.19-r0: normalized package name match | Alpine Linux edge package indexes: highlight-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Fish completions for highlight | http://www.andre-simon.de/doku/highlight/highlight.html
- apk - highlight-zsh-completion - 4.19-r0: normalized package name match | Alpine Linux edge package indexes: highlight-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for highlight | http://www.andre-simon.de/doku/highlight/highlight.html
- dnf - highlight - 4.20-4.fc45: normalized package name match | Fedora Rawhide package metadata: highlight from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Universal source code to formatted text converter | http://www.andre-simon.de/
- dnf - highlight-gui - 4.20-4.fc45: normalized package name match | Fedora Rawhide package metadata: highlight-gui from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | GUI for the highlight source code formatter | http://www.andre-simon.de/
- pacman - highlight - 4.20-1: normalized package name match | Arch Linux sync databases: highlight from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Fast and flexible source code highlighter - CLI version | http://www.andre-simon.de/doku/highlight/highlight.html
- zypper - highlight - 4.18-1.4: normalized package name match | openSUSE Tumbleweed package metadata: highlight from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Universal Source Code to Formatted Text Converter | http://www.andre-simon.de/


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [lua](https://www.automicvault.com/pkg/brew/lua/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [source-highlight](https://www.automicvault.com/pkg/brew/source-highlight/) - Shares av.db curated category or tags: cli, developer-tools, source-code, syntax-highlighting.
- [ccat](https://www.automicvault.com/pkg/brew/ccat/) - Shares av.db curated category or tags: cli, developer-tools, syntax-highlighting.
- [chroma](https://www.automicvault.com/pkg/brew/chroma/) - Shares av.db curated category or tags: cli, developer-tools, syntax-highlighting.
- [pygments](https://www.automicvault.com/pkg/brew/pygments/) - Shares av.db curated category or tags: cli, developer-tools, syntax-highlighting.
- [shiki](https://www.automicvault.com/pkg/brew/shiki/) - Shares av.db curated category or tags: cli, developer-tools, syntax-highlighting.
- [skylighting](https://www.automicvault.com/pkg/brew/skylighting/) - Shares av.db curated category or tags: cli, developer-tools, syntax-highlighting.
- [enscript](https://www.automicvault.com/pkg/brew/enscript/) - Shares av.db curated category or tags: cli, developer-tools, html, syntax-highlighting.
- [latexml](https://www.automicvault.com/pkg/brew/latexml/) - Shares av.db curated category or tags: cli, developer-tools, html, latex.
- [ansifilter](https://www.automicvault.com/pkg/brew/ansifilter/) - Both packages work with overlapping file formats or content types. Shared terms: cli, convert, developer, developer-tools, html.
- [html2text](https://www.automicvault.com/pkg/brew/html2text/) - Both packages work with overlapping file formats or content types. Shared terms: cli, developer, developer-tools, html, text.

## Combined YAML source

View the package source record on GitHub. [combined/highlight.yml](https://github.com/automic-vault/db/blob/main/combined/highlight.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
