urlsup

urlsup (urls up) finds URLs in files and checks whether they are up by
making a GET request and checking the response status code. This tool is
useful for lists, repos or any type of project containing URLs that you want to
be up.
It's written in Rust (stable) and executes the requests async in multiple threads, making it very fast. This in combination with its ease of use makes it the perfect tool for your CI pipeline.
This project is a slim version of
awesome_bot but a lot faster.
š What's New in v2.0
urlsup v2.0 introduces a modern CLI design with breaking changes for better usability:
š Renamed Flags (Breaking Changes)
--white-listā--allowlist(modern terminology)--allowā--allow-status(clearer naming)--threadsā--concurrency(industry standard)--file-typesā--include(shorter, clearer)
⨠New Features
- š Configuration Files: TOML-based config with automatic discovery
- š¤ Output Formats: JSON support for automation (
--format json) - š Progress Reporting: Beautiful progress bars with real-time stats
- š Advanced Filtering: Regex-based URL exclusion patterns
- š Retry Logic: Configurable retry attempts with exponential backoff
- ā±ļø Rate Limiting: Built-in request throttling
- š Quiet/Verbose Modes: Better control over output verbosity
- šØ Enhanced Error Handling: Comprehensive error types with context
- ā” Performance Optimizations: Faster deduplication and connection pooling
š Usage
<FILES>...
)
)
)
)
)
)
)
)
)
š Examples
Basic File Checking
# Check a single file
# Check multiple files
# Check files with wildcards
Directory Processing
Important: urlsup treats files and directories differently:
- Files: Directly processed (e.g.,
urlsup README.md) - Directories: Must use
--recursiveflag (e.g.,urlsup --recursive docs/)
# ā This will fail with an error
# ā
Process all files in a directory recursively
# ā
Process only specific file types
# ā
Process current directory recursively
File Type Filtering
# Only check markdown and text files
# Only check web files
# Multiple extensions
Advanced Options
# Allow specific status codes
# Set timeout and allow timeouts
# Allowlist URLs (partial matches)
# Combine recursive with filtering and options
# Use quiet mode for scripts
# Enable verbose output for debugging
# Use JSON output format
# Exclude URLs with patterns
Git Integration
When using --recursive, urlsup automatically respects your .gitignore files:
# This will skip files/directories listed in .gitignore
# Examples of automatically ignored paths:
# - node_modules/
# - target/
# - .git/
# - *.log files
# - Any patterns in your .gitignore
This means you don't need to manually exclude build artifacts, dependencies, or other generated files.
āļø Configuration File
urlsup supports TOML configuration files for managing complex setups. Place a .urlsup.toml file in your project root:
# .urlsup.toml - Project configuration for urlsup v2.0
= 30
= 8
= false
= ["md", "html", "txt"]
# URL patterns to exclude (regex)
= [
"^https://example\\.com/private/.*",
".*\\.local$",
"^http://localhost.*"
]
# URLs to allowlist
= [
"https://api.github.com",
"https://docs.rs"
]
# HTTP status codes to allow
= [403, 429]
# Advanced network settings
= "MyBot/1.0"
= 3
= 1000 # milliseconds
= 100 # milliseconds between requests
# Security settings
= false
= "http://proxy.company.com:8080"
# Output settings
= "text" # or "json"
= false
Configuration Discovery
urlsup searches for configuration files in this order:
.urlsup.tomlin current directory.urlsup.tomlin parent directories (up to 3 levels)- Default configuration if no file found
CLI arguments always override configuration file settings.
š§ Advanced Features
Retry Logic & Rate Limiting
Handle flaky networks and respect server limits:
# Configure via CLI (basic)
# Configure via .urlsup.toml (advanced)
URL Exclusion Patterns
Exclude URLs matching regex patterns:
# In .urlsup.toml
= [
"^https://internal\\.company\\.com/.*", # Skip internal URLs
".*\\.local$", # Skip .local domains
"^http://localhost.*", # Skip localhost
"https://example\\.com/api/.*" # Skip API endpoints
]
š Progress Reporting
Beautiful progress bars for large operations:
# Progress bars are enabled automatically for TTY terminals
# Output includes:
# ā [00:01:23] [āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā] 150/150 files processed
# ā [00:00:45] [āāāāāāāāāāāāāāāāāāāāāāāāāā ] 245/320 URLs validated (76% successful)
š Custom User Agent & Proxy Support
# In .urlsup.toml
= "MyCompany/URLChecker 2.0"
= "http://proxy.company.com:8080"
= false # Set to true for internal/dev environments
š¤ Output Formats
# Text output (default) - clean, emoji-based
# JSON output for scripts and automation
}
# Or configure in .urlsup.toml
Verbose Logging
# Enable verbose output via CLI
# Or configure in .urlsup.toml
# Quiet mode for scripts (minimal output)
Verbose mode provides detailed information about:
- Files being processed
- URLs found and filtered
- Request progress and timing
- Configuration settings used
š Security Features
SSL Certificate Verification
# Skip SSL verification for internal/development URLs
= true
ā ļø Warning: Only disable SSL verification for trusted internal environments.
Proxy Support
# HTTP/HTTPS proxy configuration
= "http://username:password@proxy.company.com:8080"
Supports both HTTP and HTTPS proxies with optional authentication.
ā” Performance Optimizations
urlsup includes several performance optimizations:
- Optimized Deduplication: Uses
AHashSetfor O(1) URL deduplication instead of O(n²) sorting - Connection Pooling: Reuses HTTP connections for better performance
- Async Processing: Processes multiple URLs concurrently using configurable thread counts
- Smart Caching: Avoids redundant requests for duplicate URLs
- Progress Tracking: Minimal overhead progress reporting for large operations
šØ Error Handling
Comprehensive error handling with specific error types:
- Configuration errors: Invalid TOML, missing files
- Network errors: Timeouts, connection failures, DNS resolution
- Path errors: Invalid file paths, permission issues
- Validation errors: Malformed URLs, regex compilation failures
All errors include helpful context and suggestions for resolution.
š¦ Installation
Install with cargo to run urlsup on your local machine.
š GitHub Actions
See urlsup-action.
š ļø Development
This repo uses a Makefile as an interface for common operations.
- Do code changes
- Run
make build linkto build the project and create a symlink from the built binary to the root of the project - Run
./urlsupto execute the binary with your changes - Profit :star: