Lychee link checker

Kishore Nemalipuri
2 min readSep 3, 2022

--

Broken pages in a web page
Broken links in a website (taken from google images)

As the technical owners of a production website, we have always been intrigued with broken links in the application. We tried to build a script that would allow the developer to find any broken links. The main problem in building such generic production is that —

  • concurrency — in order to fasten the process of validation
  • tracking real-time status — to see which file is being checked
  • offline/online links — be in a position to check within VPN

After spending some time with broken-link-checker and markdown-link-check we thought none of open source utilities (at that time in 2020) came close to our needs as we wanted a little more power to validate the links/assets etc. We have built a custom typescript-based solution that works well for most of the cases. But it warranted us numerous development cycles and maintainaning/extending on top of it got harder.

But in order to solve this problem, the open-source community came up with a solution in the form of lychee link checker in the past 1–2 years. I have tried it and this solution covers most of the problems with the broken links. Here are some of my noteworthy points —

  • Installation & Integration: Super easy either in local machine or using any CI tools (example circleCI, Github Actions or docker)
  • Verbose option: To provide the information of which links worked
  • Caching: enables faster feedback cycles if you are running on the same content with few modifications
  • online/offline: to help test the external vs relative links within the code.
  • Website support: literally it checks the production web page (non-recursively), I liked the power it gives to us.

Although “lychee” offers a lot more features, the above points definitely won my heart to use this tool. Please give it a try and appreciate the work (in form of stars in git) to the owners of it.

For a quick start on Mac:

  1. Open a terminal, and run brew install lychee
  2. Try lychee --versbose <folder of the files> . Here is an example lychee --verbose content
  3. lychee --verbose <web-page url> . Example: lychee — verbose https://kishorenl-official.medium.com/leader-election-in-distributed-systems-8228bc63f31

Try this, you would definitely appreciate the sheer genius of the utility. Thanks for reading!

--

--

Kishore Nemalipuri
Kishore Nemalipuri

Written by Kishore Nemalipuri

Full-stack developer - fascinated to build enterprise level distributed applications.

No responses yet