lychee(1)
๐ lychee(1) โ General Commands Manual
okay bestie, buckle up, because this is lychee(1) straight out of the General Commands Manual and she is thriving. no cap, this page is long, so we're doing it in parts. hydrate first. ๐
โจ NAME โจ
lychee โ a fast, async link checker. that's it, that's the whole vibe. she's fast, she's async, she checks links. iconic behaviour honestly. ๐
๐ธ SYNOPSIS ๐ธ
lychee [-a|--accept] [--accept-timeouts] [--archive] [-b|--base-url]
[--base] [--basic-auth] [-c|--config] [--cache] [--cache-exclude-status]
[--cookie-jar] [--default-extension] [--dump] [--dump-inputs]
[-E|--exclude-all-private] [--exclude] [--exclude-file]
[--exclude-link-local] [--exclude-loopback] [--exclude-path]
[--exclude-private] [--extensions] [-f|--format] [--fallback-extensions]
[--files-from] [--generate] [--github-token] [--glob-ignore-case]
[-h|--help] [-H|--header] [--hidden] [--host-concurrency]
[--host-request-interval] [--host-stats] [-i|--insecure] [--include]
[--include-fragments] [--include-mail] [--include-verbatim]
[--include-wikilinks] [--index-files] [-m|--max-redirects]
[--max-cache-age] [--max-concurrency] [--max-retries] [--min-tls]
[--mode] [-n|--no-progress] [--no-ignore] [-o|--output] [--offline]
[-p|--preprocess] [-q|--quiet]... [-r|--retry-wait-time] [--remap]
[--require-https] [--root-dir] [-s|--scheme] [--skip-missing]
[--suggest] [-t|--timeout] [-T|--threads] [-u|--user-agent]
[-v|--verbose]... [-V|--version] [-X|--method] [inputs]
like, that's a lot of brackets. she's flexible. she contains multitudes. ๐ซถ
๐ฆ DESCRIPTION ๐ฆ
so lychee is a fast, asynchronous link checker that sniffs out broken URLs and mail addresses โ in your local files and on websites. she does Markdown and HTML, and she also plays nice with other file formats. multi-talented. main character energy fr fr. โจ
and plot twist: lychee is powered by lychee-lib, the Rust library for link checking. Rust. of course she's Rust. ๐ฅ
๐ OPTIONS ๐
here comes the wall of flags, bestie. every single one. no skipping, we don't do that here.
-a,--accept<ACCEPT>โ a list of accepted status codes for valid links. ๐
the following accept range syntax is supported: [start]..[[=]end]|code. some valid examples are:
200(accepts the 200 status code only)..204(accepts any status code < 204)..=204(accepts any status code <= 204)200..=204(accepts any status code from 200 to 204 inclusive)200..205(accepts any status code from 200 to 205 excluding 205, same as200..=204)
use lychee --accept '200..=204, 429, 500' <inputs>... to provide a comma-separated list of accepted status codes. this example will accept 200, 201, 202, 203, 204, 429, and 500 as valid status codes.
[default: 100..=103,200..=299]
--accept-timeouts[=<false|true>]โ accept timed out requests and return exit code0when encountering timeouts but not any other errors. she's forgiving, but only about this. ๐--archive<ARCHIVE>โ web archive to use to provide suggestions for--suggest. ๐
[default: wayback]
possible values:
wayback
-b,--base-url<BASE_URL>โ base URL to use when resolving relative URLs in local files. if specified, relative links in local files are interpreted as being relative to the given base URL.
for example, given a base URL of https://example.com/dir/page, the link a would resolve to https://example.com/dir/a and the link /b would resolve to https://example.com/b. this behavior is not affected by the filesystem path of the file containing these links.
note that relative URLs without a leading slash become siblings of the base URL. if, instead, the base URL ended in a slash, the link would become a child of the base URL. for example, a base URL of https://example.com/dir/page/ and a link of a would resolve to https://example.com/dir/page/a.
basically, the base URL option resolves links as if the local files were hosted at the given base URL address.
the provided base URL value must either be a URL (with scheme) or an absolute path. note that certain URL schemes cannot be used as a base, e.g., data and mailto.
--base<BASE>โ deprecated; use--base-urlinstead.
๐ซ girl is old news. she still works but she's deprecated, so likeโฆ use the new one, bestie.
--basic-auth<BASIC_AUTH>โ basic authentication support. e.g.http://example.com username:password. ๐-c,--config<FILE_PATH>โ configuration file to use. can be specified multiple times.
if given multiple times, the configs are merged and later occurrences take precedence over previous occurrences. so, like, the last one wins. classic. ๐
[default: lychee.toml]
--cache[=<false|true>]โ use request cache stored on disk at.lycheecache. she remembers. ๐ธ--cache-exclude-status<CACHE_EXCLUDE_STATUS>โ a list of status codes that will be ignored from the cache.
the following exclude range syntax is supported: [start]..[[=]end]|code. some valid examples are:
429(excludes the 429 status code only)500..(excludes any status code >= 500)..100(excludes any status code < 100)500..=599(excludes any status code from 500 to 599 inclusive)500..600(excludes any status code from 500 to 600 excluding 600, same as500..=599)
use lychee --cache-exclude-status '429, 500..502' <inputs>... to provide a comma-separated list of excluded status codes. this example will not cache results with a status code of 429, 500 and 501.
--cookie-jar<COOKIE_JAR>โ read and write cookies using the given file. cookies will be stored in the cookie jar and sent with requests. new cookies will be stored in the cookie jar and existing cookies will be updated. ๐ช periodt.--default-extension<EXTENSION>โ this is the default file extension that is applied to files without an extension.
this is useful for files without extensions or with unknown extensions. the extension will be used to determine the file type for processing.
examples:
--default-extension md
--default-extension html
--dump[=<false|true>]โ don't perform any link checking. instead, dump all the links extracted from inputs that would be checked. all the tea, zero effort. ๐--dump-inputs[=<false|true>]โ don't perform any link extraction and checking. instead, dump all input sources from which links would be collected. even less work. we stan. ๐-E,--exclude-all-private[=<false|true>]โ exclude all private IPs from checking. equivalent to--exclude-private --exclude-link-local --exclude-loopback. one flag, three vibes. โจ--exclude<EXCLUDE>โ exclude URLs and mail addresses from checking. the values are treated as regular expressions. regex girlies rise. ๐--exclude-file<EXCLUDE_FILE>โ deprecated; use--exclude-pathinstead.
๐ซ yeah she's deprecated too. move on, angel.
--exclude-link-local[=<false|true>]โ exclude link-local IP address range from checking.--exclude-loopback[=<false|true>]โ exclude loopback IP address range and localhost from checking. bye localhost, love you, mean it. ๐--exclude-path<EXCLUDE_PATH>โ exclude paths from getting checked. the values are treated as regular expressions.--exclude-private[=<false|true>]โ exclude private IP address ranges from checking. ๐--extensions<EXTENSIONS>โ a list of file extensions. files not matching the specified extensions are skipped.
multiple extensions can be separated by commas. note that if you want to check filetypes, which have multiple extensions, e.g. HTML files with both .html and .htm extensions, you need to specify both extensions explicitly. an example is: --extensions html,htm,php,asp,aspx,jsp,cgi.
this is useful when the default extensions are not enough and you don't want to provide a long list of inputs (e.g. file1.html, file2.md, etc.)
[default: md,mkd,mdx,mdown,mdwn,mkdn,mkdown,markdown,html,htm,css,txt,xml]
-f,--format<FORMAT>โ output format of final status report. ๐
[default: compact]
possible values:
compactdetailedjsonjunitmarkdown
--fallback-extensions<FALLBACK_EXTENSIONS>โ when checking locally, attempts to locate missing files by trying the given fallback extensions. multiple extensions can be separated by commas. extensions will be checked in order of appearance.
example: --fallback-extensions html,htm,php,asp,aspx,jsp,cgi
note: this option takes effect on file:// URIs which do not exist and on file:// URIs pointing to directories which resolve to themself (by the --index-files logic).
--files-from<PATH>โ read input filenames from the given file or stdin (if path is-).
this is useful when you have a large number of inputs that would be cumbersome to specify on the command line directly.
examples:
lychee --files-from list.txt
find . -name '*.md' | lychee --files-from -
echo 'README.md' | lychee --files-from -
file format:
- each line should contain one input (file path, URL, or glob pattern).
- lines starting with
#are treated as comments and ignored. - empty lines are also ignored.
--generate<GENERATE>โ generate special output (e.g. the man page) instead of performing link checking. meta, honestly. she can generate her own man page. ๐
possible values:
mancomplete-bashcomplete-elvishcomplete-fishcomplete-powershellcomplete-zsh
--github-token<GITHUB_TOKEN>โ GitHub API token to use when checkinggithub.comlinks, to avoid rate limiting. protect her from the rate limit gods. ๐ฅ--glob-ignore-case[=<false|true>]โ ignore case when expanding filesystem path glob inputs. case? never met her. ๐ธ-h,--helpโ print help (see a summary with-h). she keeps it short and cute for the summary version. โจ-H,--header<HEADER:VALUE>โ set custom header for requests.
some websites require custom headers to be passed in order to return valid responses. you can specify custom headers in the format Name: Value. for example, Accept: text/html. this is the same format that other tools like curl or wget use. multiple headers can be specified by using the flag multiple times. the specified headers are used for ALL requests. use the hosts option to configure headers on a per-host basis. ๐
--hidden[=<false|true>]โ do not skip hidden directories and files. she sees you,.dotfiles. ๐--host-concurrency<HOST_CONCURRENCY>โ default maximum concurrent requests per host (default: 10).
this limits the maximum amount of requests that are sent simultaneously to the same host. this helps to prevent overwhelming servers and running into rate-limits. use the hosts option to configure this on a per-host basis. be polite to the servers, bestie. ๐ซถ
okay so picking up right where we left off with --host-concurrency, here are the two example lines from the manual:
--host-concurrency 2 # Conservative for slow APIs
--host-concurrency 20 # Aggressive for fast APIs
--host-request-interval <HOST_REQUEST_INTERVAL>โ Minimum interval between requests to the same host (default:50ms). Sets a baseline delay between consecutive requests to prevent overloading servers. The adaptive algorithm may increase this based on server responses (rate limits, errors). Use thehostsoption to configure this on a per-host basis. Examples:--host-request-interval 50ms(fast for robust APIs) and--host-request-interval 1s(conservative for rate-limited APIs).--host-stats[=<false|true>]โ Show per-host statistics at the end of the run. lowkey so useful for seeing who's being extra ๐ญ-i,--insecure[=<false|true>]โ Proceed for server connections considered insecure (invalid TLS). bestie pls be careful with this one ๐--include <INCLUDE>โ URLs to check (supports regex). Has preference over all excludes. it's giving main character energy ๐--include-fragments[=<none|anchor-only|text-only|full>]โ Enable the checking of fragments in links. Usenoneto disable fragment checks,anchor-onlyfor anchor fragments like#section,text-onlyfor text fragments like#:~:text=example, orfullto check both. If provided without a value, defaults toanchor-only. ok so many options but we love a flexible icon โจ--include-mail[=<false|true>]โ Also check email addresses. yes bestie, even the mailtos get a vibe check ๐ง--include-verbatim[=<false|true>]โ Find links in verbatim sections likepre- andcodeblocks.--include-wikilinks[=<false|true>]โ Check WikiLinks in Markdown files, this requires specifying--base-url. no cap, gotta give it the base ๐ซถ--index-files <INDEX_FILES>โ When checking locally, resolves directory links to a separate index file. The argument is a comma-separated list of index file names to search for. Index names are relative to the link's directory and attempted in the order given.
If --index-files is specified, then at least one index file must exist in order for a directory link to be considered valid. Additionally, the special name . can be used in the list to refer to the directory itself.
If unspecified (the default behavior), index files are disabled and directory links are considered valid as long as the directory exists on disk.
Example 1: --index-files index.html,readme.md looks for index.html or readme.md and requires that at least one exists.
Example 2: --index-files index.html,. will use index.html if it exists, but still accept the directory link regardless.
Example 3: --index-files '' will reject all directory links because there are no valid index files. This will require every link to explicitly name a file.
Note: This option only takes effect on file:// URIs which exist and point to a directory. it's giving very specific but we respect the attention to detail ๐
-m,--max-redirects <MAX_REDIRECTS>โ Maximum number of allowed redirects[default: 10]. no more than 10 little detours bestie ๐ฆ--max-cache-age <MAX_CACHE_AGE>โ Discard all cached requests older than this duration[default: 1d]. old vibes get evicted โจ--max-concurrency <MAX_CONCURRENCY>โ Maximum number of concurrent network requests[default: 128]. highkey a whole squad of requests ๐ฅ--max-retries <MAX_RETRIES>โ Maximum number of retries per request[default: 3]. three strikes and then we move on ๐ค--min-tls <MIN_TLS>โ Minimum accepted TLS Version. Possible values:TLSv1_0,TLSv1_1,TLSv1_2,TLSv1_3. don't be out here accepting ancient handshakes fr fr ๐--mode <MODE>โ Set the output display mode. Determines how results are presented in the terminal[default: color]. Possible values:plain,color,emoji,task. pick your aesthetic bestie ๐จ-n,--no-progress[=<false|true>]โ Do not show progress bar. This is recommended for non-interactive shells (e.g. for continuous integration). no spinning bar, just vibes ๐--no-ignore[=<false|true>]โ Do not skip files that would otherwise be ignored by.gitignore,.ignore, or the global ignore file. ok so it's gonna look at everything, even the stuff you thought was hidden ๐-o,--output <OUTPUT>โ Output file of status report. save the receipt ๐งพ--offline[=<false|true>]โ Only check local files and block network requests. solo local mode, no internet drama ๐ธ-p,--preprocess <COMMAND>โ Preprocess input files with the given command. For each file input, this flag causes lychee to executeCOMMAND PATHand process its standard output instead of the original contents ofPATH. This allows you to convert files that would otherwise not be understood by lychee. The preprocessorCOMMANDis only run on input files, not on standard input or URLs.
To invoke programs with custom arguments or to use multiple preprocessors, use a wrapper program such as a shell script. An example script looks like this:
#!/usr/bin/env bash case "$1" in *.pdf)
exec pdftohtml -i -s -stdout "$1"
;; *.odt|*.docx|*.epub|*.ipynb)
exec pandoc "$1" --to=html --wrap=none
;; *)
# identity function, output input without changes
exec cat
;; esac
it's giving "I can fix him" energy but for file formats ๐ญ๐
-q,--quietโ Less output per occurrence (e.g.-qor-qq). shhh bestie ๐คซ-r,--retry-wait-time <RETRY_WAIT_TIME>โ Minimum wait time in seconds between retries of failed requests[default: 1]. give it a lil breather ๐ฎโ๐จ--remap <REMAP>โ Remap URI matching pattern to different URI. it's giving plot twist ๐--require-https[=<false|true>]โ When HTTPS is available, treat HTTP links as errors. no insecure links on my watch ๐--root-dir <ROOT_DIR>โ Root directory to use when checking absolute links in local files. This option is required if absolute links appear in local files, otherwise those links will be flagged as errors. This must be an absolute path (i.e., one beginning with/).
If specified, absolute links in local files are resolved by prefixing the given root directory to the requested absolute link. For example, with a root-dir of /root/dir, a link to /page.html would be resolved to /root/dir/page.html.
This option can be specified alongside --base-url. If both are given, an absolute link is resolved by constructing a URL from three parts: the domain name specified in --base-url, followed by the --root-dir directory path, followed by the absolute link's own path. it's giving layered like an onion ๐ง
โจ
-s,--scheme <SCHEME>โ Only test links with the given schemes (e.g. https). Omit to check links with any other scheme. At the moment, we supporthttp,https,file, andmailto. pick your scheme bestie ๐--skip-missing[=<false|true>]โ Skip missing input files (default is to error if they don't exist). lowkey forgiving but only if you ask ๐--suggest[=<false|true>]โ Suggest link replacements for broken links, using a web archive. The web archive can be specified with--archive. it's giving "here's what you could've had" ๐-t,--timeout <TIMEOUT>โ Website timeout in seconds from connect to response finished[default: 20]. twenty seconds and then we're out ๐-T,--threads <THREADS>โ Number of threads to utilize. Defaults to number of cores available to the system. let the CPU cook ๐ฅ-u,--user-agent <USER_AGENT>โ User agent[default: lychee/x.y.z]. introduce yourself bestie ๐ซถ-v,--verboseโ Set verbosity level; more output per occurrence (e.g.-vor-vv). tell me everything ๐-V,--versionโ Print version. drop the digits ๐-X,--method <METHOD>โ Request method[default: get]. get is the main character but you can switch it up โจ[inputs]โ Inputs for link checking (where to get links to check from). These can be: files (e.g.README.md), file globs (e.g.'~/git/*/README.md'), remote URLs (e.g.https://example.com/README.md), or standard input (-). Alternatively, use--files-fromto read inputs from a file.
NOTE: Use -- to separate inputs from options that allow multiple arguments. ok so -- is the vibe separator, noted ๐ซก
๐ธ EXAMPLES ๐ธ
Check all links in supported files by specifying a directory:
$ lychee .
Specify files explicitly or use glob patterns:
$ lychee README.md test.html info.txt
$ lychee 'public/**/*.html' '*.md'
Check all links on a website:
$ lychee https://example.com
Check links from stdin:
$ cat test.md | lychee -
$ echo 'https://example.com' | lychee -
Links can be excluded and included with regular expressions:
$ lychee --exclude '^https?://blog\.example\.com' --exclude '\.(pdf|zip|png|jpg)$' .
Further examples can be found in the online documentation at <https://lychee.cli.rs> โ go treat yourself bestie ๐
โญ EXIT CODES โญ
0โ Success. The operation was completed successfully as instructed. slay โ1โ Missing inputs or any unexpected runtime failures or configuration errors. it's giving oops ๐ฌ2โ Link check failures. At least one non-excluded link failed the check. the links did not pass the vibe check ๐3โ Encountered errors in the config file. config said no ๐ โโ๏ธ
๐ REPORTING BUGS ๐
Report any bugs or questions to <https://github.com/lycheeverse/lychee/issues/>
Questions can also be asked on <https://github.com/lycheeverse/lychee/discussions>
we love a community that listens ๐ซถโจ
๐ VERSION ๐
v0.24.2
๐ซถ AUTHORS ๐ซถ
- Matthias Endler <matthias@endler.dev>
- Thomas Zahner <thomas.zahner@protonmail.ch>
A huge thank you to all the wonderful contributors who helped make this project a success. y'all ate and left no crumbs ๐๐
stay slay, bestie ๐ this was lychee 0.24.2, dated 2026-05-01, from the lychee(1) manual. periodt โจ
๐ฆ where this page comes from
- arch rolling: lychee 0.24.2-2 ยท Apache-2.0 OR MIT
- nixpkgs unstable: lychee 0.24.2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms