Find broken links in markdown files - CLI + GUI in one
Project description
DeadLink Checker
Find broken links in markdown files - CLI + GUI in a single file
Features
- ๐ฅ๏ธ Dual Mode: CLI (with args) or GUI (no args) in one file
- ๐ Local Links: Check relative file paths in markdown
- ๐ Web URLs: Validate HTTP/HTTPS links with caching
- ๐ Wiki Links: Support for Obsidian-style
[[links]] - ๐ Watch Mode: Continuous monitoring with auto-refresh
- ๐ค Export: Save results to JSON/Markdown
- โก Fast: Go version is 20x faster than Python
Quick Start
Python Version
# GUI mode (no arguments)
python3 dead_link_checker.py
# CLI mode
python3 dead_link_checker.py /path/to/markdown
# Check only web URLs
python3 dead_link_checker.py --web /path/to/markdown
# Watch mode (refresh every 5 seconds)
python3 dead_link_checker.py --interval 5s /path/to/markdown
Go Version (Recommended)
# Build
go build -o deadlink dead_link_checker.go
# GUI mode
./deadlink
# CLI mode
./deadlink /path/to/markdown
# Check only local file links
./deadlink --no-web /path/to/markdown
# Watch mode
./deadlink --interval 5s /path/to/docs
CLI Options
| Flag | Description | Default |
|---|---|---|
--web |
Check web URLs | true |
--no-web |
Skip web URL checking | false |
--file, --local |
Check local file links | true |
--no-file |
Skip local file link checking | false |
--timeout |
HTTP timeout in seconds | 10 |
--rate-limit |
Rate limit between requests | 0.1 |
--ignore |
Regex patterns to ignore | - |
--interval |
Watch mode refresh interval (e.g., 5s) |
- |
Screenshots
GUI Mode
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Dead Link Checker โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Directory: [/path/to/markdown ] [Browse...] โ
โ โ
โ โ Check Web URLs โ Check Local Links โ
โ โ
โ [Start] [Stop] [Clear] [Export] โ
โ โ
โ Progress: โโโโโโโโโโโโโโโโโโโโ 65% (130/200) โ
โ Checking: README.md โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Results โ โ
โ โ SUMMARY โ โ
โ โ Total links: 150 โ โ
โ โ Broken links: 5 โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CLI Output
Scanning: /path/to/markdown
Mode: web=true, local=true
============================================================
SUMMARY
============================================================
Total links: 150
By type: {'local': 120, 'web': 25, 'anchor': 5}
By status: {'ok': 145, 'broken': 5}
โ ๏ธ BROKEN LINKS (5):
------------------------------------------------------------
File Line Type Status URL
----------------------------------------------------------------------------------------------------
/Users/project/README.md 42 local broken not_found: ./missing-file.md
/Users/project/docs/guide.md 18 web broken HTTP 404
Installation
Python
# Optional dependencies for better output
pip install httpx rich
Go
go get github.com/rivo/tview
go build -o deadlink dead_link_checker.go
Supported Link Types
| Type | Example | Verified |
|---|---|---|
| Standard markdown | [text](url) |
โ |
| Images |  |
โ |
| Wiki/Obsidian | [[page]] |
โ |
| HTML links | <a href="url"> |
โ |
| Reference links | [text][ref] |
โ |
| Anchors | #section |
โ ๏ธ (not verified) |
Performance
| Metric | Python | Go |
|---|---|---|
| Startup | ~200ms | ~10ms |
| 1000 files | ~30s | ~1.5s |
| Binary size | N/A | ~12MB |
Examples
Check a project for broken links
./deadlink /path/to/project
Continuous monitoring during editing
./deadlink --interval 10s /path/to/docs
Export results for CI/CD
./deadlink --no-web /path/to/project
# Results saved to dead_link_report.json
Project Structure
deadlink/
โโโ dead_link_checker.py # Python version
โโโ dead_link_checker.go # Go version
โโโ README.md # This file
โโโ LICENSE # MIT License
Why Two Versions?
- Python: Quick scripting, easy to modify, familiar to most developers
- Go: Single binary, 20x faster, no runtime dependencies, production-ready
Choose based on your needs - both have identical features!
Contributing
- Fork the repo
- Create a feature branch
- Make your changes
- Submit a PR
License
MIT License - see LICENSE for details.
Related Projects
- markdown-link-check - Node.js link checker
- lychee - Fast link checker in Rust
- muffet - Website link checker in Go
Made with โค๏ธ for maintaining clean documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
md_deadlink-0.1.0.tar.gz
(14.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md_deadlink-0.1.0.tar.gz.
File metadata
- Download URL: md_deadlink-0.1.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3efd61743cff8e1dfc0d8c282917984a33519145c4134279099b4226749b9b7
|
|
| MD5 |
a0540cf863a2977c4c22e1f3aea040f5
|
|
| BLAKE2b-256 |
55224f48a855538c376ef61e235e03c729d4112bed0787cc87792bb447b1e065
|
File details
Details for the file md_deadlink-0.1.0-py3-none-any.whl.
File metadata
- Download URL: md_deadlink-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44d2ca5e5bc10641cf3d78ba691ba251d6155d8cfaa667e3e33be6b6b4ecb0d7
|
|
| MD5 |
f6afe7cec8ccb4421ae77dafa9c5c4ef
|
|
| BLAKE2b-256 |
3f215989a4518e3f3f47bdd0697f2a4a7e751259cac4f892a9a64fa2b3b7146f
|