Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
Find a file
Matthias b0f7a805ef
Use builder pattern and channels (fixes #12) (#33)
This implements a basic builder for the Checker struct as discussed in #12.
It is using derive_builder and uses a custom build method to instantiate the more elaborate fields like reqwest::Client.
It also adds deadpool and tokio::mpsc as dependencies to handle a pool of clients to query websites.
2020-11-24 21:30:06 +01:00
.github/workflows Use more descriptive name for cargo test action 2020-10-16 14:47:54 +02:00
assets Use different icons for feature comparison (#32) 2020-11-09 11:46:45 +01:00
fixtures Make GITHUB_TOKEN optional (#22) 2020-10-26 23:31:31 +01:00
src Use builder pattern and channels (fixes #12) (#33) 2020-11-24 21:30:06 +01:00
tests Use builder pattern and channels (fixes #12) (#33) 2020-11-24 21:30:06 +01:00
.gitignore Extract from hello-rust/show repository 2020-08-05 00:32:37 +02:00
Cargo.lock Use builder pattern and channels (fixes #12) (#33) 2020-11-24 21:30:06 +01:00
Cargo.toml Use builder pattern and channels (fixes #12) (#33) 2020-11-24 21:30:06 +01:00
lychee.example.toml Add support for include patterns (#23) 2020-10-25 13:41:06 +01:00
README.md Formatting 2020-11-23 13:10:32 +01:00

lychee

Rust

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.

Lychee demo

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
Static binary yes no yes no no no no no
Markdown files yes yes no no no no yes no
HTML files yes no no yes yes no no 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 lib no yes no yes yes no yes no
Quiet mode yes no no no yes yes yes yes
Amazing lychee logo yes no no no no no no no
Config file yes no no no yes yes yes no

Planned features. Please help out!

  • Report output in HTML, SQL, CSV, XML, JSON, YAML... format
  • Report extended statistics: request latency
  • Recursion
  • Use colored output (https://crates.io/crates/colored)
  • Skip duplicate URLs
  • Request throttling

Users

How?

cargo install lychee

Optional (to avoid being rate limited for GitHub links): set an environment variable with your token like so GITHUB_TOKEN=xxxx, or use the --github-token CLI option. This can also be set in the config file.

Run it inside a repository with a README.md or specify a file with

lychee <yourfile>

CLI exit codes

  • 0 for success (all links checked successfully or excluded/skipped as configured)
  • 1 for any unexpected runtime failures or config errors
  • 2 for link check failures (if any non-excluded link failed the check)

Comparison

Collecting more link checkers here for comparison:

Thanks

...to my Github sponsors and Patreon sponsors for supporting these projects. If you want to help out as well, go here.