# Holehe CLI Options: Complete Guide to Command-Line Flags and Tool Behavior

> Explore holehe CLI options to customize scans, format output, and handle requests. Learn about flags like --only-used, --no-color, --csv, and --timeout for effective email verification.

- Repository: [Palenath/holehe](https://github.com/megadose/holehe)
- Tags: how-to-guide
- Published: 2026-08-25

---

**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`](https://github.com/megadose/holehe/blob/main/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`](https://github.com/megadose/holehe/blob/main/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`](https://github.com/megadose/holehe/blob/main/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

- **`-C` or `--csv`**: Exports the complete result set to a timestamped file named `holehe_<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

- **`-NP` or `--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.
- **`-T` or `--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`](https://github.com/megadose/holehe/blob/main/holehe/core.py), the `maincore()` function instantiates the argument parser and stores results in the `args` namespace. This object propagates through the application:

1. **`launch_module()`** consults `args.timeout` for the async HTTP client and `args.nopasswordrecovery` to conditionally skip specific site modules.
2. **`print_result()`** checks `args.onlyused`, `args.nocolor`, and `args.noclear` to determine display formatting.
3. When `args.csvoutput` is `True`, the program routes data to a CSV writer instead of the terminal formatter.

## Practical Command Examples

Basic scan against a single target:

```bash
holehe alice@example.com

```

Display only confirmed registrations:

```bash
holehe alice@example.com --only-used

```

Generate a CSV report with extended timeout:

```bash
holehe alice@example.com --csv --timeout 30

```

Run quietly without clearing screen or using colors:

```bash
holehe alice@example.com --no-color --no-clear

```

Fast scan skipping password recovery:

```bash
holehe alice@example.com --no-password-recovery

```

Combine multiple flags:

```bash
holehe alice@example.com --only-used --csv --timeout 20 --no-password-recovery

```

## Summary

- Holehe defines seven CLI options in [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) using Python's `argparse`, with parsing logic centered at lines 181–194.
- The **`--only-used`** flag filters the final output to show only sites confirming email registration.
- Output control flags (**`--no-color`**, **`--no-clear`**, **`--csv`**) modify the `print_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 `args` namespace, 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`](https://github.com/megadose/holehe/blob/main/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.