Holehe CLI Options: Complete Guide to Command-Line Flags and Tool Behavior
The holehe CLI provides seven primary flags—including --only-used, --no-color, --csv, and --timeout—that modify scan filtering, output formatting, and request handling through Python's argparse module in holehe/core.py.
Holehe is an open-source OSINT tool that checks if an email address is registered across over 120 websites. The command-line interface, implemented using Python's standard argparse library in holehe/core.py, exposes precise controls for filtering results, managing terminal output, and tuning network behavior during asynchronous scans.
Core CLI Flags and Their Functions
The CLI parser defines specific destinations for each flag in holehe/core.py, storing values in an args namespace that controls downstream behavior in launch_module() and print_result().
Target Specification
The email positional argument accepts the target address to probe. While the parser at line 181 accepts multiple email arguments, only the first supplied address is processed.
Output Filtering
--only-used: Restricts results to sites where the email is actively registered. When enabled, the tool omits sites returning "not used", rate-limit errors, or connection failures.--no-color: Disables ANSI escape codes for terminal colors, producing plain text suitable for logging pipelines.--no-clear: Prevents the program from clearing the terminal screen before printing results, preserving prior console history.
Export and Persistence
-Cor--csv: Exports the complete result set to a timestamped file namedholehe_<timestamp>_<email>_results.csv. When this flag is active, the program writes to disk and exits immediately after completion, bypassing terminal formatting logic.
Network Behavior
-NPor--no-password-recovery: Skips password-recovery attempts on sites that support them (e.g., Adobe, Mail.ru). This reduces total HTTP request volume and scan duration.-Tor--timeout: Sets the maximum wait time for individual HTTP requests (default: 10 seconds), configurable for slow or unstable connections.
How Arguments Modify Tool Execution
In holehe/core.py, the maincore() function instantiates the argument parser and stores results in the args namespace. This object propagates through the application:
launch_module()consultsargs.timeoutfor the async HTTP client andargs.nopasswordrecoveryto conditionally skip specific site modules.print_result()checksargs.onlyused,args.nocolor, andargs.noclearto determine display formatting.- When
args.csvoutputisTrue, the program routes data to a CSV writer instead of the terminal formatter.
Practical Command Examples
Basic scan against a single target:
holehe alice@example.com
Display only confirmed registrations:
holehe alice@example.com --only-used
Generate a CSV report with extended timeout:
holehe alice@example.com --csv --timeout 30
Run quietly without clearing screen or using colors:
holehe alice@example.com --no-color --no-clear
Fast scan skipping password recovery:
holehe alice@example.com --no-password-recovery
Combine multiple flags:
holehe alice@example.com --only-used --csv --timeout 20 --no-password-recovery
Summary
- Holehe defines seven CLI options in
holehe/core.pyusing Python'sargparse, with parsing logic centered at lines 181–194. - The
--only-usedflag filters the final output to show only sites confirming email registration. - Output control flags (
--no-color,--no-clear,--csv) modify theprint_result()execution path and export behavior. - Network tuning is managed via
--timeout(request duration) and--no-password-recovery(request volume reduction). - All parsed arguments populate the
argsnamespace, which orchestrates both the asynchronous scan loop and result formatting.
Frequently Asked Questions
What is the default timeout for holehe HTTP requests?
The default timeout is 10 seconds per request, configurable using the -T or --timeout flag followed by an integer value. This parameter is passed directly to the async HTTP client in launch_module().
How does the --only-used flag filter results?
When enabled, this boolean flag instructs the result printer to suppress any site returning negative usage status, rate-limit errors, or connection failures, displaying only confirmed email registrations.
Can I export holehe results to CSV while suppressing terminal output?
Yes. The --csv flag generates a timestamped CSV file and exits immediately after writing, effectively bypassing terminal display regardless of color or screen-clearing settings.
Where is the CLI argument parsing implemented?
All argument parsing occurs in the maincore() function within holehe/core.py using Python's standard argparse module. The resulting namespace is referenced by both the scanning orchestrator and output formatters to modify tool behavior dynamically.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →