Skip to content

Rushabh5000/md-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md-check

Zero dependencies Node License: MIT Platform

Markdown link checker for local files, HTTP/HTTPS URLs, and heading anchors. Zero dependencies.


Why?

markdown-link-check requires node-fetch and other deps. lychee needs a Rust binary. awesome-bot needs Ruby. md-check runs anywhere Node.js is installed.


Install

npm install -g md-check

Or without installing:

npx md-check

Usage

md-check                           # Check all .md files in current directory
md-check README.md                 # Check a single file
md-check docs/                     # Check all .md files in docs/
md-check . --no-external           # Skip HTTP checks (local links only)
md-check . --quiet                 # Only show failures
md-check . --timeout 5000          # 5s HTTP timeout
md-check . --concurrency 4         # 4 parallel HTTP requests

Example Output

md-check  /my-project

  Scanning 3 file(s)...

  ✓ README.md
      ✓ https://example.com [200] line 12
      ✓ docs/guide.md [local] line 24
      ✓ #installation [local] line 30

  ✗ docs/guide.md
      ✓ https://nodejs.org [200] line 5
      ✗ https://old-url.example.com/gone [HTTP 404] line 18 — HTTP 404
      ✗ ../missing-file.md [local] line 22 — file not found
      ✗ #nonexistent-anchor [local] line 40 — anchor #nonexistent-anchor not found

  2 broken links of 7 checked

What Gets Checked

Link type Example Check
HTTP/HTTPS [text](https://example.com) HEAD request, follows redirects
Relative file [guide](./docs/guide.md) File existence
Anchor [section](#installation) Heading exists in target
Cross-file anchor [ref](other.md#section) Heading exists in that file
HTML href <a href="url"> Same as above
Reference defs [id]: https://... Same as above
mailto: / ftp: [email](mailto:...) Skipped

CI Integration

- name: Check Markdown links
  run: npx md-check . --no-external  # local links only for speed

Exit code is 1 if any broken links are found.


Options

Flag Default Description
--no-external off Skip HTTP/HTTPS links
--no-local off Skip local file/anchor links
--concurrency N 8 Max parallel HTTP requests
--timeout N 10000 HTTP timeout in milliseconds
--quiet off Only show failures
--strict off Exit 1 on warnings too

License

MIT


Keywords

markdown link checker · broken links · dead links · link validator · check markdown links · markdown-link-check alternative · lychee alternative · docs ci · zero dependencies · cli


Scan your dependencies for free

This tool has zero dependencies by design — but your other projects might not be so lean. DepWarden scans any package.json, pom.xml, requirements.txt, go.mod, or lockfile for vulnerabilities, licence issues, and supply-chain risks. Anonymous, no account needed, results in seconds.


Support & Feedback

Found a bug or have a suggestion? Email hello@depwarden.in or raise a support ticket.


Built to solve, shared to help — Rushabh Shah 🛠️✨

One of 40+ zero-dependency developer CLI tools — no node_modules, ever.

Releases

No releases published

Packages

 
 
 

Contributors