Overview
Script: cli.py
HTTPXRay 2.0 CLI is the headless companion to the PySide6 application. It crawls targets, stores link intelligence in SQLite, searches and lists records, exports reports, and imports or archives complete HTTPXRay databases.
python cli.py
python cli.py shell
python cli.py --help
Running cli.py without a subcommand launches the interactive shell.
Global Syntax
python cli.py [--db DATABASE] <command> [options]
| Option | Purpose |
|---|---|
--db DATABASE | Use a specific SQLite database instead of the default httpxray.db. |
python cli.py --db scans/site-a.db stats
python cli.py --db archive.db list --limit 50
crawl
Crawl a target and store discovered link intelligence in SQLite.
python cli.py crawl <seed> [--external] [--workers N] [--depth N] [--clear-first]
| Argument / Option | Description | Default |
|---|---|---|
<seed> | Required target URL beginning with http:// or https:// | Required |
--external | Follow external as well as internal links. | Off |
--workers N | Crawler worker threads. | 10 |
--depth N | Maximum crawl depth. | 25 |
--clear-first | Clear active database before crawling. | Off |
python cli.py crawl https://example.com
python cli.py crawl https://example.com --workers 20 --depth 50
python cli.py crawl https://example.com --external --workers 20 --depth 50
python cli.py crawl https://example.com --clear-first
stats
Display counts from the active database.
python cli.py stats
Reports total, visited, internal, external, successful visits, and errors.
list
Print stored records in the terminal.
python cli.py list [--filter TEXT] [--limit N]
| Option | Description | Default |
|---|---|---|
--filter TEXT | Filter stored records. | Empty |
--limit N | Maximum rows printed. | 100 |
python cli.py list
python cli.py list --limit 250
python cli.py list --filter wordpress
python cli.py list --filter ".pdf" --limit 50
export
Export stored records in CSV, JSON, TXT, HTML, or PDF format.
python cli.py export <csv|json|txt|html|pdf> <output> [--filter TEXT]
python cli.py export csv links.csv
python cli.py export json links.json
python cli.py export txt links.txt
python cli.py export html report.html
python cli.py export pdf report.pdf
python cli.py export html wordpress.html --filter wordpress
db-export
Create a complete SQLite backup of the active HTTPXRay database.
python cli.py db-export <output>
python cli.py db-export example-com-2026-08-11.db
Use this before clearing a crawl when you want to preserve it.
db-import
Replace the active database from a compatible HTTPXRay SQLite archive.
python cli.py db-import <input> [--yes]
| Option | Description |
|---|---|
--yes | Skip the replacement confirmation. |
python cli.py db-import archived-crawl.db
python cli.py db-import archived-crawl.db --yes
clear
Clear stored link records while leaving the database/schema ready for another crawl.
python cli.py clear [--yes]
python cli.py clear
python cli.py clear --yes
view
Generate an HTML view of database records and open it in the default browser.
python cli.py view [--filter TEXT] [--output FILE]
| Option | Description | Default |
|---|---|---|
--filter TEXT | Include only matching records. | Empty |
--output FILE | HTML file to create. | links_view.html |
python cli.py view
python cli.py view --filter wordpress
python cli.py view --output site-report.html
python cli.py view --filter ".js" --output javascript-links.html
Interactive Shell
Launch explicitly:
python cli.py shell
Or simply:
python cli.py
Prompt:
httpxray>
Available commands: crawl, stats, list, search, export, db-export, db-import, clear, view, help, quit, exit, q.
crawl
crawl <url> [workers] [depth] [external:y/n]
crawl https://example.com
crawl https://example.com 20
crawl https://example.com 20 50
crawl https://example.com 20 50 y
Accepted true values for the external argument: y, yes, 1, true.
stats
stats
list
list [limit]
list
list 250
search
search <text>
search wordpress
search application/json
search .pdf
export
export <csv|json|txt|html|pdf> <file> [filter]
export csv links.csv
export html report.html
export pdf report.pdf
export html wordpress.html wordpress
db-export
db-export <file.db>
db-import
db-import <file.db>
The shell asks Replace current HTTPXRay database? [y/N]:. Enter y to continue.
clear
clear
The shell asks Clear all stored links? [y/N]:. Enter y to continue.
view
view [filter]
Creates links_view.html beside the application and opens it.
Exit
quit
exit
q
Common Workflows
Archive current crawl and start clean
python cli.py db-export site-before-clear.db
python cli.py crawl https://example.com --clear-first
Large internal crawl
python cli.py crawl https://example.com --workers 25 --depth 75
Include external links
python cli.py crawl https://example.com --external --workers 20 --depth 40
Complete HTML report
python cli.py export html httpxray-report.html
Separate database per target
python cli.py --db example-com.db crawl https://example.com --clear-first
python cli.py --db example-com.db stats
python cli.py --db example-com.db export html example-com.html
Restore archived crawl
python cli.py db-import saved-crawl.db
Help Commands
python cli.py --help
python cli.py crawl --help
python cli.py stats --help
python cli.py list --help
python cli.py export --help
python cli.py db-export --help
python cli.py db-import --help
python cli.py clear --help
python cli.py view --help
python cli.py shell --help
Dependencies & Files
| Item | Purpose |
|---|---|
httpx | HTTP crawler/client. |
beautifulsoup4 | HTML parsing and link extraction. |
reportlab | PDF export. |
sqlite3 | SQLite support from Python standard library. |
| File | Purpose |
|---|---|
cli.py | HTTPXRay 2.0 CLI application. |
httpxray.db | Default live crawl database. |
links_view.html | Default browser-view file generated by view. |