Adoc Link Checker (adocx)
Adoc Link Checker is a command-line tool to detect broken HTTP and HTTPS links
in AsciiDoc (.adoc) files.
It is designed to be:
- reliable (HEAD request with GET fallback),
- fast (parallel processing with caching),
- explicit (JSON report, no implicit output),
- CI-friendly.
Why Adoc Link Checker?
- AsciiDoc / Antora projects often contain hundreds of external links
- Broken links silently degrade documentation quality
- CI pipelines rarely validate link integrity
- This tool provides a deterministic, cache-aware, CI-friendly solution
Features
- Checks HTTP and HTTPS links
- Supports YouTube IDs (
video::ID[]) - Parallel processing (configurable)
- URL and domain exclusion
- Structured JSON report
- Works on a single file or a directory
- Built-in request caching
- Suitable for CI pipelines
Installation
Requirements
- Python 3.8+
- pip
Install from PyPI
pip install adoc-link-checker
This installs the CLI command:
adocx
Quick usage
Check a single AsciiDoc file
adocx check-links README.adoc --output report.json
Check a directory
adocx check-links ./docs --output report.json
⚠️ WARNING
The --output option is mandatory.
No report is generated without it.
Main options
FILE_OR_DIR
.adoc file or directory to scan (required)
--output
JSON output file (required)
--timeout
HTTP timeout in seconds (default: 15)
--max-workers
Number of parallel threads (default: 5)
--delay
Delay between requests in seconds (default: 0.5)
--blacklist
Domain to ignore (repeatable)
--exclude-from
File containing URLs to exclude
--fail-on-broken
Exit with non-zero status code if broken links are found
-v / -vv
Verbosity (INFO / DEBUG)
--quiet
Errors only
Excluding URLs
You can exclude specific URLs using a text file.
Example exclude_urls.txt:
# Comments are allowed
https://example.com/temp
https://dev.example.com
Usage:
adocx check-links ./docs --exclude-from exclude_urls.txt --output report.json
Rules:
- one URL per line
- empty lines are ignored
- lines starting with
#are ignored - URLs are normalized automatically
JSON report format
Only files containing broken links appear in the report.
Example:
{
"docs/page.adoc": [
["https://example.com/broken", "URL not accessible"]
]
}
HTTP behavior
- HEAD request first
- Automatic fallback to GET
- Redirects followed
- Realistic User-Agent
- Automatic retries on server errors
- Shared cache to avoid duplicate requests
CI usage
Typical usage in CI pipelines:
adocx check-links ./docs --output broken_links.json --fail-on-broken
Exit codes:
0: no broken links1: broken links detected
Designed for CI:
- deterministic JSON output
- no implicit stdout noise
- configurable failure behavior
Development
Clone the repository:
git clone https://github.com/dhrions/adoc-link-checker.git
cd adoc-link-checker
Install in editable mode:
pip install -e .[dev]
Run tests:
pytest --cov=.
License
This project is licensed under the MIT License.
See the LICENSE file for details.
Metadata
Release files for adoc-link-checker 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adoc_link_checker-0.2.1.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adoc_link_checker-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.0 kB
Release files / adoc_link_checker-0.2.1.tar.gz
| Download URL | adoc_link_checker-0.2.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10e5d57b9dd2f42b3c031655214d8ad0f817955d3290272736b10c75ff9814ae
|
|
BLAKE2b-256 checksum How to use checksums |
9221605b2712e89bc84c1521e2a4925ada0af3e1fb525d8f0dbc65a96878ea58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / adoc_link_checker-0.2.1-py3-none-any.whl
| Download URL | adoc_link_checker-0.2.1-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d11527164b78734ddc672738bf62f94223851f618605d1e1fd250a7ff503a349
|
|
BLAKE2b-256 checksum How to use checksums |
c6101716806b3d7fdaea22313f506365bc05ed10b4c1c3c7a33c681838138201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|