A fast, concurrent broken link checker for websites and sitemaps
Brokli (a play on "broken links") is a CLI tool that helps developers validate all links on a page or sitemap during development. It checks HTTP status codes concurrently and displays results with color-coded output, making it easy to spot broken links before deployment.
- π Concurrent Checking - Uses worker pools to check multiple links simultaneously (default: 10 workers)
- π¨ Color-Coded Output - Green for success, red for errors, cyan for redirects
- π Progress Indication - Real-time progress counter shows checking status
- π― Smart Filtering - Shows only broken links by default to reduce noise
- π Verbose Mode - Optional flag to display all links with their status codes
- βοΈ Configurable - Adjust workers, timeouts, redirects, and user agent
- π Sitemap Support - Check entire sitemaps with metadata display
- π§ͺ Well Tested - 94%+ test coverage with comprehensive test suite
The easiest way to install Brokli is to download a pre-built binary from the GitHub Releases page.
Linux / macOS:
# Download the latest release for your platform
# Replace VERSION, OS, and ARCH with appropriate values
# Example: brokli_0.1.0_linux_amd64.tar.gz
# Extract the archive
tar -xzf brokli_VERSION_OS_ARCH.tar.gz
# Move to your PATH
sudo mv brokli /usr/local/bin/
# Verify installation
brokli --versionWindows:
Download the .zip file for Windows from the releases page, extract it, and add the brokli.exe to your PATH.
# Clone the repository
git clone https://github.com/EndlessTrax/brokli.git
cd brokli
# Build the binary
go build -o brokli .
# Optionally, move to your PATH
sudo mv brokli /usr/local/bin/Check all links on a webpage and show only broken ones:
brokli check url https://example.comOutput:
Found 10 links
Checking links... 10/10
β All links are working!
Show all links with their status codes:
brokli check url https://example.com --verbose
# or use the short flag
brokli check url https://example.com -vOutput:
Found 10 links
Checking links... 10/10
All Links:
β 1. [200] Home -> https://example.com
β 2. [200] About -> https://example.com/about
β 3. [301] Old Page -> https://example.com/redirect
β 4. [404] Missing -> https://example.com/missing
Summary: 1 broken link found out of 10 total
Check all URLs in a sitemap:
brokli check sitemap https://example.com/sitemap.xmlOutput:
Found 70 URLs in sitemap
Checking URLs... 70/70
Broken URLs:
β 1. [404] https://example.com/old-page (modified: 2023-09-24T00:00:00+00:00)
β 2. [404] https://example.com/removed (modified: 2024-01-15T00:00:00+00:00)
Summary: 2 broken URLs found out of 70 total
- π’ Green
[200]- Success (2xx status codes) - π΅ Cyan
[301]- Redirects (3xx status codes) - π΄ Red
[404]- Client errors (4xx status codes) - π΄ Bold Red
[500]- Server errors (5xx status codes) - π‘ Yellow
[-1]- Unchecked/errors
Validate links on your local dev server before pushing:
brokli check url https://localhost:3000
brokli check sitemap https://localhost:3000/sitemap.xmlQuick validation before deploying to production:
# Check staging site
brokli check sitemap https://staging.example.com/sitemap.xml -v- Configuration File Support -
.brokli.ymlfor persistent settings - Link Caching - Cache results to avoid re-checking unchanged links
- Export Formats - Output results to JSON, CSV, or Markdown
- Multi-Sitemap Processing - Check multiple sitemaps concurrently
- Go 1.24.0 or higher
- Task (optional, for running tasks)
Run all unit tests:
task test
# or
go test ./...Run tests with coverage:
task test-coverage
# or
go test -v -race -coverprofile=coverage.out ./...Format all Go code:
task fmt
# or
go fmt ./...Check formatting without making changes:
gofmt -s -l .Lint code using golangci-lint:
task ci-lint
# or
golangci-lint run ./...Before pushing, run all CI checks:
task ciThis runs:
- Tests with race detection
- Format check
- Linting
Build the project:
task build
# or
go build -o brokli .This creates a brokli binary in the current directory.
Contributions are welcome! Please read our Contributing Guide for details on:
- Development workflow and branch naming conventions
- Coding standards and architecture patterns
- Testing guidelines
- Pull request process
- Commit message conventions
This project is licensed under the MIT License - see the LICENSE file for details.