Skip to main content

CLI Reference

The AIPTx CLI provides full control over your penetration testing workflow from the command line.

Installation

npm install -g @aiptx/cli

Authentication

Login

aiptx auth login
Opens a browser for OAuth authentication with your AIPTx account.

Using API Key

export AIPTX_API_KEY=your_api_key_here
# or
aiptx auth set-key your_api_key_here

Check Auth Status

aiptx auth status

Scanning Commands

aiptx scan

Start a new penetration test scan.
aiptx scan <target> [options]
Arguments:
ArgumentDescription
targetURL, IP address, or domain to scan
Options:
OptionDescriptionDefault
--modeScan mode: quick, standard, deepstandard
--typeScan type: web, api, network, fullweb
--openapiPath to OpenAPI/Swagger specification-
--auth-typeAuthentication type: bearer, basic, cookie, custom-
--auth-tokenAuthentication token or credentials-
--headersCustom headers (JSON format)-
--excludeEndpoints to exclude (comma-separated)-
--outputOutput format: json, table, quiettable
--waitWait for scan to completetrue
Examples:
# Basic web scan
aiptx scan https://example.com

# API scan with OpenAPI spec
aiptx scan https://api.example.com --type api --openapi ./openapi.yaml

# Authenticated scan
aiptx scan https://app.example.com \
  --auth-type bearer \
  --auth-token "eyJhbGciOiJIUzI1NiIs..."

# Deep scan with custom headers
aiptx scan https://example.com \
  --mode deep \
  --headers '{"X-Custom-Header": "value"}'

# Quick scan excluding certain paths
aiptx scan https://example.com \
  --mode quick \
  --exclude "/admin,/internal"

aiptx scan list

List all scans in your account.
aiptx scan list [options]
Options:
OptionDescriptionDefault
--statusFilter by status: running, completed, failed-
--limitNumber of results20
--formatOutput format: json, tabletable

aiptx scan status

Check the status of a running scan.
aiptx scan status <scan-id>

aiptx scan cancel

Cancel a running scan.
aiptx scan cancel <scan-id>

Findings Commands

aiptx findings list

List findings from a scan.
aiptx findings list --scan-id <scan-id> [options]
Options:
OptionDescriptionDefault
--severityFilter by severity: critical, high, medium, low-
--statusFilter by status: open, fixed, accepted-
--formatOutput format: json, tabletable

aiptx findings get

Get detailed information about a specific finding.
aiptx findings get <finding-id>

aiptx findings export

Export findings to a file.
aiptx findings export --scan-id <scan-id> --format csv --output findings.csv

Report Commands

aiptx report generate

Generate a penetration test report.
aiptx report generate --scan-id <scan-id> [options]
Options:
OptionDescriptionDefault
--formatReport format: pdf, html, json, csvpdf
--templateReport template: executive, technical, compliancetechnical
--complianceCompliance framework: soc2, iso27001, pci, hipaa-
--outputOutput file path./report.pdf
Examples:
# Generate PDF report
aiptx report generate --scan-id abc123 --format pdf

# Generate compliance report for SOC 2
aiptx report generate --scan-id abc123 \
  --template compliance \
  --compliance soc2

# Export to multiple formats
aiptx report generate --scan-id abc123 --format pdf --output report.pdf
aiptx report generate --scan-id abc123 --format csv --output findings.csv

Configuration Commands

aiptx config set

Set a configuration value.
aiptx config set <key> <value>
Available Keys:
KeyDescriptionDefault
default_modeDefault scan modestandard
output_formatDefault output formattable
auto_reportGenerate report after scanfalse
notificationsEnable notificationstrue

aiptx config get

Get a configuration value.
aiptx config get <key>

aiptx config list

List all configuration values.
aiptx config list

Global Options

These options are available for all commands:
OptionDescription
--help, -hShow help for a command
--version, -vShow CLI version
--verboseEnable verbose output
--quiet, -qSuppress non-essential output
--no-colorDisable colored output

Exit Codes

CodeDescription
0Success
1General error
2Invalid arguments
3Authentication error
4Network error
5Scan failed