DARKMATTER SOFTWARE // HTTPXRAY 2.0

CLI Command Reference

Complete operational reference for cli.py, including direct command mode, interactive shell commands, exports, database archive operations, clean-crawl workflows, filters, and examples.

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]
OptionPurpose
--db DATABASEUse 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 / OptionDescriptionDefault
<seed>Required target URL beginning with http:// or https://Required
--externalFollow external as well as internal links.Off
--workers NCrawler worker threads.10
--depth NMaximum crawl depth.25
--clear-firstClear 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]
OptionDescriptionDefault
--filter TEXTFilter stored records.Empty
--limit NMaximum 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
Filtering changes only the exported result set. It does not modify the SQLite database.

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]
OptionDescription
--yesSkip the replacement confirmation.
python cli.py db-import archived-crawl.db
python cli.py db-import archived-crawl.db --yes
Database import replaces the active database contents. Archive the current database first if it must be preserved.

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]
OptionDescriptionDefault
--filter TEXTInclude only matching records.Empty
--output FILEHTML 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

ItemPurpose
httpxHTTP crawler/client.
beautifulsoup4HTML parsing and link extraction.
reportlabPDF export.
sqlite3SQLite support from Python standard library.
FilePurpose
cli.pyHTTPXRay 2.0 CLI application.
httpxray.dbDefault live crawl database.
links_view.htmlDefault browser-view file generated by view.