Lychee
⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
Install / Use
/learn @lycheeverse/LycheeREADME
<a name="back-to-top"></a>
⚡ A fast, async, stream-based link checker written in Rust ⚡
Finds broken hyperlinks and mail addresses in websites
and Markdown, HTML, and other file formats!
Available as command-line utility,
library and
GitHub Action.
Table of Contents
- Development
- Installation
- Features
- Commandline usage
- Supported file formats
- Library usage
- GitHub Action Usage
- Pre-commit Usage
- Contributing to lychee
- Troubleshooting and Workarounds
- Users
- Credits
- License
Development
After installing Rust use Cargo for building and testing.
For Nix we provide a flake so you can use nix develop and nix build.
Installation
<details><summary><b>View installation instructions</b></summary>Arch Linux
pacman -S lychee
OpenSUSE Tumbleweed
zypper in lychee
Ubuntu
snap install lychee
Alpine Linux
# available for Alpine Edge in testing repositories
apk add lychee
macOS
Via Homebrew:
brew install lychee
Via MacPorts:
sudo port install lychee
Docker
docker pull lycheeverse/lychee
Nix
nix-shell -p lychee
Or let Nix even check a packaged site with testers.lycheeLinkCheck { site = …; }
FreeBSD
pkg install lychee
Termux
pkg install lychee
Conda
conda install lychee -c conda-forge
Windows
Via scoop:
scoop install lychee
Via WinGet:
winget install --id lycheeverse.lychee
Via Chocolatey:
choco install lychee
</details>
Pre-built binaries
We provide binaries for Linux, macOS, and Windows for every release.
You can download them from the releases page.
Cargo
Build dependencies
On APT/dpkg-based Linux distros (e.g. Debian, Ubuntu, Linux Mint and Kali Linux)
the following commands will install all required build dependencies, including
the Rust toolchain and cargo:
curl -sSf 'https://sh.rustup.rs' | sh
apt install gcc pkg-config libc6-dev libssl-dev
Compile and install lychee
cargo install lychee
Feature flags
Lychee supports the following feature flags:
email-checkenables checking email addresses using the mailify-lib crate.check_example_domainsallows checking example domains such asexample.com. This feature is useful for testing.
By default, email-check is enabled.
Note that in the past lychee could be configured to use either OpenSSL or Rustls.
It was decided
to fully switch to Rustls and drop OpenSSL support.
Please tell us if this this negatively affects you in any way.
Features
This comparison is made on a best-effort basis. Please create a PR to fix outdated information.
| | lychee | [awesome_bot] | [muffet] | [broken-link-checker] | [linkinator] | [linkchecker] | [markdown-link-check] | [fink] |
| -------------------- | ------- | ------------- | -------- | --------------------- | ------------ | -------------------- | --------------------- | ------ |
| Language | Rust | Ruby | Go | JS | TypeScript | Python | JS | PHP |
| Async/Parallel | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] |
| JSON output | ![yes] | ![no] | ![yes] | ![yes] | ![yes] | ![maybe]<sup>1</sup> | ![yes] | ![yes] |
| Static binary | ![yes] | ![no] | ![yes] | ![no] | ![no] | ️![no] | ![no] | ![no] |
| Markdown files | ![yes] | ![yes] | ![no] | ![no] | ![no] | ![yes] | ![yes] | ![no] |
| HTML files | ![yes] | ![no] | ![no] | ![yes] | ![yes] | ![no] | ![yes] | ![no] |
| Text files | ![yes] | ![no] | ![no] | ![no] | ![no] | ![no] | ![no] | ![no] |
| Website support | ![yes] | ![no] | ![yes] | ![yes] | ![yes] | ![yes] | ![no] | ![yes] |
| Chunked encodings | ![yes] | ![maybe] | ![maybe] | ![maybe] | ![maybe] | ![no] | ![yes] | ![yes] |
| GZIP compression | ![yes] | ![maybe] | ![maybe] | ![yes] | ![maybe] | ![yes] | ![maybe] | ![no] |
| Basic Auth | ![yes] | ![no] | ![no] | ![yes] | ![no] | ![yes] | ![no] | ![no] |
| Custom user agent | ![yes] | ![no] | ![no] | ![yes] | ![no] | ![yes] | ![no] | ![no] |
| Relative URLs | ![yes] | ![yes] | ![no] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] |
| Anchors/Fragments | ![yes] | ![no] | ![no] | ![no] | ![no] | ![yes] | ![yes] | ![no] |
| Include patterns | ![yes]️ | ![yes] | ![no] | ![yes] | ![no] | ![no] | ![no] | ![no] |
| Exclude patterns | ![yes] | ![no] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] |
| Handle redirects | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] |
| Ignore insecure SSL | ![yes] | ![yes] | ![yes] | ![no] | ![no] | ![yes] | ![no] | ![yes] |
| File globbing | ![yes] | ![yes] | ![no] | ![no] | ![yes] | ![no] | ![yes] | ![no] |
| Limit scheme | ![yes] | ![no] | ![no] | ![yes] | ![no] | ![yes] | ![no] | ![no] |
| [Custom headers] | ![yes] | ![no] | ![yes] | ![no] | ![no] | ![no] | ![yes] | ![yes] |
| Summary | ![yes] | ![yes] | ![yes] | ![maybe] | ![yes] | ![yes] | ![no] | ![yes] |
| HEAD requests | ![yes] | ![yes] | ![no] | ![yes] | ![yes] | ![yes] | ![no] | ![no] |
| Colored output | ![yes] | ![maybe] | ![yes] | ![maybe] | ![yes] | ![yes] | ![no] | ![yes] |
| [Filter status code] | ![yes] | ![yes] | ![no] | ![no] | ![no] | ![no] | ![yes] | ![no] |
| Custom timeout | ![yes] | ![yes] | ![yes] | ![no] | ![yes] | ![yes] | ![no] | ![yes] |
| E-mail links | ![yes] | ![no] | ![no] | ![no] | ![no] | ![yes] | ![no] | ![no] |
| Progress bar | ![yes] | ![yes] | ![no] | ![no] | ![no] | ![yes] | ![yes] | ![yes] |
| Retry and backoff | 