Options Reference

This page provides a complete reference of all command-line options available in DeadFinder.

Commands

DeadFinder supports the following commands:

  • url <URL> - Scan a single URL
  • file <FILE> - Scan URLs from a file
  • sitemap <SITEMAP-URL> - Scan URLs from a sitemap
  • pipe - Scan URLs from STDIN
  • completion <SHELL> - Generate shell completion script
  • version - Show version information

Global Options

These options are available for all scan commands (url, file, sitemap, pipe).

Performance Options

OptionAliasTypeDefaultDescription
--concurrency-cNumber50Number of concurrent workers
--timeout-tNumber10Timeout in seconds for each request

Output Options

OptionAliasTypeDefaultDescription
--output-oString-File path to write results
--output-format-fStringjsonOutput format: json, yaml, or csv
--silent-sBooleanfalseSuppress progress output
--verbose-BooleanfalseEnable verbose output
--debug-BooleanfalseEnable debug output

HTTP Options

OptionAliasTypeDefaultDescription
--include30x-rBooleanfalseInclude 30x redirections as dead links
--headers-HArray[]Custom HTTP headers for initial request
--worker-headers-Array[]Custom HTTP headers for worker requests
--user-agent-StringMozilla/5.0...User-Agent string for requests
--proxy-pString-Proxy server URL
--proxy-auth-String-Proxy authentication (username:password)

Filtering Options

OptionAliasTypeDefaultDescription
--match-mString-Only include URLs matching this regex pattern
--ignore-iString-Ignore URLs matching this regex pattern

Analysis Options

OptionAliasTypeDefaultDescription
--coverage-BooleanfalseEnable coverage analysis
--visualize-String-Generate visualization image file

Examples

Performance Tuning

Increase concurrency for faster scans:

deadfinder url https://example.com --concurrency=100

Set a longer timeout for slow sites:

deadfinder url https://example.com --timeout=30

Output Control

Save results in YAML format:

deadfinder url https://example.com -f yaml -o results.yaml

Run in silent mode:

deadfinder url https://example.com --silent

HTTP Configuration

Add custom headers:

deadfinder url https://example.com \
  --headers "Authorization: Bearer token" \
  --headers "X-API-Key: secret"

Use a proxy:

deadfinder url https://example.com \
  --proxy="http://localhost:8080" \
  --proxy-auth="user:pass"

Custom User-Agent:

deadfinder url https://example.com --user-agent="MyBot/1.0"

Filtering

Match only API endpoints:

deadfinder url https://example.com --match="api|v1|v2"

Ignore static resources:

deadfinder url https://example.com --ignore="css|js|png|jpg"

Combine filters:

deadfinder url https://example.com \
  --match="docs|blog" \
  --ignore="static|cdn"

Analysis

Enable coverage analysis:

deadfinder url https://example.com --coverage

Generate visualization:

deadfinder url https://example.com --visualize=report.png

Both together:

deadfinder url https://example.com --coverage --visualize=report.png

Output Format Details

JSON Format

The JSON output follows this structure:

{
  "https://example.com": [
    "https://example.com/broken-link1",
    "https://example.com/broken-link2"
  ],
  "coverage": {
    "total_tested": 100,
    "total_dead": 5,
    "overall_coverage_percentage": 95.0
  }
}

YAML Format

The YAML output provides the same information in YAML format:

---
https://example.com:
  - https://example.com/broken-link1
  - https://example.com/broken-link2
coverage:
  total_tested: 100
  total_dead: 5
  overall_coverage_percentage: 95.0

CSV Format

The CSV output is a flat structure:

target,url
https://example.com,https://example.com/broken-link1
https://example.com,https://example.com/broken-link2

Shell Completion

DeadFinder supports shell completion for bash, zsh, and fish. Generate the completion script for your shell:

Bash

deadfinder completion bash > /etc/bash_completion.d/deadfinder

Or add to your .bashrc:

eval "$(deadfinder completion bash)"

Zsh

deadfinder completion zsh > ~/.zsh/completion/_deadfinder

Make sure your .zshrc includes:

fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit

Fish

deadfinder completion fish > ~/.config/fish/completions/deadfinder.fish

Environment Variables

DeadFinder doesn't use environment variables for configuration, but you can set defaults in your shell profile:

# Example .bashrc/.zshrc aliases
alias df='deadfinder'
alias df-silent='deadfinder --silent'
alias df-verbose='deadfinder --verbose'