Automic VaultAutomic Vault

brew

使用 Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 highlight

查看 highlight 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install highlight

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install highlight

MacPorts ports tree · textproc/highlight/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add highlight

Alpine Linux edge package indexes · highlight · 来源: dl-cdn.alpinelinux.org

Debian apt已验证 · 92%
sudo apt install highlight

Debian stable package indexes · highlight · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install highlight

Fedora Rawhide package metadata · highlight · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#highlight

nixpkgs package indexes · highlight · 来源: raw.githubusercontent.com

Arch Linux pacman已验证 · 92%
sudo pacman -S highlight

Arch Linux sync databases · highlight · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install highlight

openSUSE Tumbleweed package metadata · highlight · 来源: download.opensuse.org

Windows

Chocolatey已验证 · 92%
choco install highlight

Chocolatey community package catalog · highlight · 来源: community.chocolatey.org

Scoop已验证 · 92%
scoop install main/highlight

Scoop official bucket manifest trees · bucket/highlight.json · 来源: api.github.com

概览

软件包摘要

Convert source code to formatted text with syntax highlighting

命令和别名

  • highlight

历史

项目历史与用法

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.

时间线

  • 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.

来源

  • 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

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
highlightcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本4.20
管理器更新时间2026-05-24
本地数据OK
上游not checked
检测到的最新版本未检测到

http://andre-simon.de/doku/highlight/en/highlight.php

安装元数据

软件包元数据

软件包键brew:highlight
版本4.20
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/highlight
主页http://andre-simon.de/doku/highlight/en/highlight.php
仓库https://gitlab.com/saalen/highlight
上游文档http://andre-simon.de/doku/highlight/en/highlight.php
许可证GPL-3.0-or-later
源码归档https://gitlab.com/saalen/highlight/-/archive/v4.20/highlight-v4.20.tar.gz
最后更新2026-05-24T11:59:53Z
Pulseupdated
依赖lua
构建依赖boost, pkgconf
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namehighlight
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

highlight 4.10-1+b2

Universal source code to formatted text converter

http://www.andre-simon.de

sudo apt install highlight
  • Section: devel
  • Architecture: amd64
  • Source Package: highlight
  • 5 依赖
  • normalized package name match
  • 匹配方式:Highlight
Debian stable package indexes · deb.debian.org · Debian stable package indexes: highlight from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

highlight-common 4.10-1

source code to formatted text converter (architecture independent files)

http://www.andre-simon.de

sudo apt install highlight-common
  • Section: devel
  • Architecture: all
  • Source Package: highlight
  • normalized package name match
  • 匹配方式:Highlight
Debian stable package indexes · deb.debian.org · Debian stable package indexes: highlight-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

libhighlight-perl 4.10-1+b2

perl bindings for highlight source code to formatted text converter

http://www.andre-simon.de

sudo apt install libhighlight-perl
  • Section: perl
  • Architecture: amd64
  • Source Package: highlight
  • 7 依赖
  • normalized package name match
  • 匹配方式:Highlight
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libhighlight-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

highlight

nix profile install nixpkgs#highlight
  • normalized package name match
  • 匹配方式:Highlight
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: highlight from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
Ubuntu apt95%

highlight 4.10-1build2

Universal source code to formatted text converter

http://www.andre-simon.de

sudo apt install highlight
  • Section: universe/devel
  • Architecture: amd64
  • 5 依赖
  • normalized package name match
  • 匹配方式:Highlight
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: highlight from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

highlight-common 4.10-1build2

source code to formatted text converter (architecture independent files)

http://www.andre-simon.de

sudo apt install highlight-common
  • Section: universe/devel
  • Architecture: all
  • Source Package: highlight
  • normalized package name match
  • 匹配方式:Highlight
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: highlight-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

libhighlight-perl 4.10-1build2

perl bindings for highlight source code to formatted text converter

http://www.andre-simon.de

sudo apt install libhighlight-perl
  • Section: universe/perl
  • Architecture: amd64
  • Source Package: highlight
  • 7 依赖
  • normalized package name match
  • 匹配方式:Highlight
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libhighlight-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

highlight 4.19-r0

Fast and flexible source code highlighter

http://www.andre-simon.de/doku/highlight/highlight.html

sudo apk add highlight
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: highlight
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Highlight
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: highlight from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

highlight-bash-completion 4.19-r0

Bash completions for highlight

http://www.andre-simon.de/doku/highlight/highlight.html

sudo apk add highlight-bash-completion
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: highlight
  • normalized package name match
  • 匹配方式:Highlight
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: highlight-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

highlight-doc 4.19-r0

Fast and flexible source code highlighter (documentation)

http://www.andre-simon.de/doku/highlight/highlight.html

sudo apk add highlight-doc
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: highlight
  • normalized package name match
  • 匹配方式:Highlight
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: highlight-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

highlight-fish-completion 4.19-r0

Fish completions for highlight

http://www.andre-simon.de/doku/highlight/highlight.html

sudo apk add highlight-fish-completion
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: highlight
  • normalized package name match
  • 匹配方式:Highlight
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: highlight-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

highlight-zsh-completion 4.19-r0

Zsh completions for highlight

http://www.andre-simon.de/doku/highlight/highlight.html

sudo apk add highlight-zsh-completion
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: highlight
  • normalized package name match
  • 匹配方式:Highlight
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: highlight-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf95%

highlight 4.20-4.fc45

Universal source code to formatted text converter

http://www.andre-simon.de/

sudo dnf install highlight
  • License: GPL-3.0-only
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: highlight
  • 6 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Highlight
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: highlight from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

highlight-gui 4.20-4.fc45

GUI for the highlight source code formatter

http://www.andre-simon.de/

sudo dnf install highlight-gui
  • License: GPL-3.0-only
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: highlight
  • 11 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Highlight
Fedora Rawhide package metadata · dl.fedoraproject.org · 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
pacman95%

highlight 4.20-1

Fast and flexible source code highlighter - CLI version

http://www.andre-simon.de/doku/highlight/highlight.html

sudo pacman -S highlight
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • 1 依赖
  • normalized package name match
  • 匹配方式:Highlight
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: highlight from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

highlight 4.18-1.4

Universal Source Code to Formatted Text Converter

http://www.andre-simon.de/

sudo zypper install highlight
  • License: GPL-3.0-or-later
  • Category: Development/Tools/Other
  • Architecture: x86_64
  • Source Package: highlight
  • 6 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Highlight
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: highlight from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

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