Skip to content

🔗 lychee

lychee is a fast, asynchronous link checker written in Rust. It finds broken hyperlinks in Markdown, HTML, and other text files.

🛠 Installation

You can download pre-compiled binaries from the GitHub releases page, or install it using a package manager.

sudo apt install lychee
brew install lychee
cargo install lychee

⚙ Config

Lychee can be configured with a configuration file. In this repository, the configuration file is lychee.toml at the repo root.

lychee.toml

timeout = 5
max_retries = 2
max_concurrency = 20
accept = [200, 201, 202, 204, 206, 403, 405, 429, 520]
exclude_all_private = true

📝 Usage

Task Tasks

1. Run link checker (online)

task linkcheck

2. Run link checker (offline)

task linkcheck-offline

3. Run link checker on a specific file

task linkcheck-file FILE="docs/index.md"

CLI Commands

1. Check links in a directory or file

lychee .

2. Check links offline (skip checking external URLs)

lychee --offline .

3. Check links in a specific file

lychee file.md

🔗 References