A fast, async, resource-friendly link checker written in Rust. \
For GitHub links, it can optionally use a GITHUB_TOKEN
to avoid getting blocked by the rate
limiter.
This comparison is made on a best-effort basis. Please create a PR to fix
outdated information.
use
| | 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]1 | ![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] |
| Skip relative URLs | ![yes] | ![no] | ![no] | ![maybe] | ![no] | ![no] | ![no] | ![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 | ![yes] | ![no] | ![no] | ![no] | ![yes] | ![no] | ![yes] | ![no] |
| Skip private domains | ![yes] | ![no] | ![no] | ![no] | ![no] | ![no] | ![no] | ![no] |
| [Use as library] | ![yes] | ![yes] | ![no] | ![yes] | ![yes] | ![no] | ![yes] | ![no] |
| Quiet mode | ![yes] | ![no] | ![no] | ![no] | ![yes] | ![yes] | ![yes] | ![yes] |
| Config file | ![yes] | ![no] | ![no] | ![no] | ![yes] | ![yes] | ![yes] | ![no] |
| Recursion | ![no] | ![no] | ![no] | ![yes] | ![yes] | ![yes] | ![yes] | ![no] |
| Amazing lychee logo | ![yes] | ![no] | ![no] | ![no] | ![no] | ![no] | ![no] | ![no] |
1 Other machine-readable formats like CSV are supported.
We'd be thankful for any contribution. \ We try to keep the issue-tracker up-to-date so you can quickly find a task to work on.
Try one of these links to get started:
You can run lychee directly from the commandline.
cargo install lychee
docker pull lycheeverse/lychee
We provide binaries for Linux, macOS, and Windows for every release. \ You can download them from the releases page.
Run it inside a repository with a README.md
:
lychee
You can also specify various types of inputs:
```
lychee https://endler.dev/
lychee https://raw.githubusercontent.com/lycheeverse/lychee/master/README.md
lychee README.md lychee test.html info.txt
lychee ~/projects/*/README.md
lychee "~/projects/big_project/*/README."
lychee --glob-ignore-case --progress --verbose "~/projects/*/[r]eadme." ```
Optionally, to avoid getting rate-limited while checking GitHub links, you can
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.
The token can be generated in your GitHub account settings page. A personal token with no extra permissions is enough to be able to check public repos links.
There is an extensive list of commandline parameters to customize the behavior, see below for a full list.
``` USAGE: lychee [FLAGS] [OPTIONS] [--] [inputs]...
FLAGS:
-E, --exclude-all-private Exclude all private IPs from checking. Equivalent to --exclude-private --exclude-link-
local --exclude-loopback
--exclude-link-local Exclude link-local IP address range from checking
--exclude-loopback Exclude loopback IP address range from checking
--exclude-private Exclude private IP address ranges from checking
--glob-ignore-case Ignore case when expanding filesystem path glob inputs
--help Prints help information
-i, --insecure Proceed for server connections considered insecure (invalid TLS)
-p, --progress Show progress
--skip-missing Skip missing input files (default is to error if they don't exist)
-V, --version Prints version information
-v, --verbose Verbose program output
OPTIONS:
-a, --accept username:password
-c, --config
ARGS:
README.md
), file globs
(e.g. "~/git/*/README.md"
), remote URLs (e.g. https://example.com/README.md
) or standard
input (-
). Prefix with --
to separate inputs from options that allow multiple arguments
[default: README.md]
```
0
for success (all links checked successfully or excluded/skipped as configured)1
for missing inputs and any unexpected runtime failures or config errors2
for link check failures (if any non-excluded link failed the check)You can use lychee as a library for your own projects. Simply add it as a dependency and build your client:
```rust use http::StatusCode
let client = lychee::ClientBuilder::default().build()?; let url = Url::parse("https://github.com/lycheeverse/lychee")?; let response = client.check(Website(url)).await?; assert!(matches!(response.status, Status::Ok(_))); ```
The client is very customizable, e.g.
rust
let client = lychee::ClientBuilder::default()
.includes(includes)
.excludes(excludes)
.max_redirects(cfg.max_redirects)
.user_agent(cfg.user_agent)
.allow_insecure(cfg.insecure)
.custom_headers(headers)
.method(method)
.timeout(timeout)
.verbose(cfg.verbose)
.github_token(cfg.github_token)
.scheme(cfg.scheme)
.accepted(accepted)
.build()?;
See the builder documentation for all options.
We collect a list of common workarounds for various websites in our troubleshooting guide.
If you are using lychee for your project, we'd be delighted to hear about it.
lychee is licensed under either of
at your option.
The first prototype of lychee was built in episode 10 of Hello Rust. Thanks to all Github- and Patreon sponsors for supporting the development since the beginning. Also, thanks to all the great contributors who have since made this project more mature.