lychee
⚡ Fast, async, resource-friendly link checker written in Rust.
1M+
⚡ 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.
After installing Rust use Cargo for building and testing.
For Nix we provide a flake so you can use nix develop and nix build.
pacman -S lychee
zypper in lychee
snap install lychee
# available for Alpine Edge in testing repositories
apk add lychee
Via Homebrew:
brew install lychee
Via MacPorts:
sudo port install lychee
docker pull lycheeverse/lychee
Image tags (each also has an -alpine variant, e.g. latest-alpine):
| Tag | Description |
|---|---|
latest | Most recent stable release (recommended) |
X.Y.Z / X.Y | A specific release, e.g. 0.20.0 / 0.20 |
nightly | Bleeding-edge build from the master branch |
master | Alias of nightly |
sha-<sha> | Build for a specific commit |
nix-shell -p lychee
Or let Nix even check a packaged site with testers.lycheeLinkCheck { site = …; }
pkg install lychee
pkg install lychee
conda install lychee -c conda-forge
Via scoop:
scoop install lychee
Via WinGet:
winget install --id lycheeverse.lychee
Via Chocolatey:
choco install lychee
A GitHub Action that runs lychee is available as lycheeverse/lychee-action. See the lychee-action repository for usage instructions.
We provide binaries for Linux, macOS, and Windows for every release. You can download them from the releases page.
You can also use cargo-binstall
to install these binaries:
cargo binstall lychee
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
cargo install lychee
Lychee supports the following feature flags:
email-check enables checking email addresses using the mailify-lib crate.check_example_domains allows checking example domains such as example.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 negatively affects you in any way.
This comparison is made on a best-effort basis. Please create a PR to fix outdated information.
See the lychee website for a guide to lychee's features. Also see the command-line flags for the options you can use to customise lychee.
| lychee | awesome_bot | muffet | broken-link-checker | linkinator | linkchecker | markdown-link-check | fink | |
|---|---|---|---|---|---|---|---|---|
| Language | Rust | Ruby | Go | JS | TypeScript | Python | JS | PHP |
| Async/Parallel | ||||||||
| Static binary | ️ | |||||||
| Check Markdown files | ||||||||
| Check HTML files | ||||||||
| Check text files | ||||||||
| Check a website | ||||||||
| File globbing | ||||||||
| User interface | ||||||||
| Progress bar | ||||||||
| Colored output | ||||||||
| Summary | ||||||||
| Quiet mode | ||||||||
| JSON output | ||||||||
| Config file | ||||||||
| Use as library | ||||||||
| Selecting links | ||||||||
| Include patterns | ||||||||
| Exclude patterns | ||||||||
| Filter by scheme | ||||||||
| Skip private domains | ||||||||
| HTTP features | ||||||||
| Custom user agent | ||||||||
| Basic Auth | ||||||||
| Filter status code | ||||||||
| Custom headers | ||||||||
| Custom timeout | ||||||||
HEAD requests | ||||||||
| Handle redirects | ||||||||
| Per-host throttling | ||||||||
| Respect rate limits | ||||||||
| Retry and backoff | ||||||||
| Ignore insecure SSL | ||||||||
| Chunked encodings | ||||||||
| GZIP compression | ||||||||
| Cookies | ||||||||
| URL features | ||||||||
| Relative URLs | ||||||||
| URL anchor fragments | ||||||||
| URL text fragments | ||||||||
| E-mail addresses | ||||||||
| Other | ||||||||
| Recursion | ||||||||
| Amazing lychee logo |
* May need configuration. Click the icon for more information.
# recursively check all links in supported files inside the current directory
lychee .
# check links in specific local file(s):
lychee README.md test.html info.txt
# check links on a website:
lychee https://endler.dev
For more examples check out our usage guide.
Here's how to mount a local directory into the container and check some input with lychee.
--init parameter is passed so that lychee can be stopped from the terminal.-it to start an interactive terminal, which is required to show the progress bar.--rm removes not used anymore container from the host after the run (self-cleanup).-w /input points to /input as the default workspace-v $(pwd):/input does local volume mounting to the container for lychee access.By default a Debian-based Docker image is used. If you want to run an Alpine-based image, use the
latest-alpinetag. For example,lycheeverse/lychee:latest-alpine
docker run --init -it --rm -w /input -v $(pwd):/input lycheeverse/lychee README.md
docker run --init -it --rm -w /input -v ${PWD}:/input lycheeverse/lychee README.md
To avoid getting rate-limited while checking GitHub links, you can optionally
set an environment variable with your GitHub token like so GITHUB_TOKEN=xxxx,
or use the --github-token CLI option. It can also be set in the config file.
Here is an example config file.
The token can be generated on your GitHub account settings page. A personal access token with no extra permissions is enough to be able to check public repo links.
For more scalable organization-wide scenarios you can consider a GitHub App. It has a higher rate limit than personal access tokens but requires additional configuration steps on your GitHub workflow. Please follow the GitHub App Setup example.
Use lychee --help or man lychee to see all available command line parameters.
Content type
Image
Digest
sha256:71de4409c…
Size
11.6 MB
Last updated
6 days ago
docker pull lycheeverse/lychee:sha-467197f-alpine