Reference

Complete reference for all qtz-discovery-cli commands, global flags, environment variables, and the .qtz-discovery.yaml configuration file format.

Global Flags

These flags apply to every command.

FlagEnv varDefaultDescription
--serverQTZ_SERVER_URLQuantizant portal base URL
--org-idQTZ_SERVER_ORG_IDOrganization ID
--api-keyQTZ_SERVER_API_KEYPortal API key
--uploadQTZ_UPLOADfalseUpload findings to portal after scan
--log-levelQTZ_LOG_LEVELinfodebug | info | warn | error
--formatQTZ_FORMATcbomOutput format (see Output Formats)
--outputQTZ_OUTPUTstdoutOutput file path
--config.qtz-discovery.yamlConfig file path

scan source

Source targeting

FlagDefaultDescription
--branchmainGit branch to scan
--commitPin to specific commit SHA
--depth0Shallow clone depth (0 = full history)
--tokenGit access token for private repos (QTZ_GIT_TOKEN)
--excludeGlob patterns to exclude (e.g. vendor/**,*.pb.go)
--git-historyfalseScan git commit history for past crypto patterns
--since90dGit history time window (e.g. 30d, 2024-01-01)

Scan control

FlagDefaultDescription
--sasttrueEnable SAST (static pattern detection)
--scatrueEnable SCA (dependency analysis)
--ecosystemallSCA ecosystem filter: go|npm|python|maven|cargo|ruby|php|nuget|dart|elixir|swift|scala|clojure|haskell|r|erlang|perl|ocaml|nim|all

Filtering & severity

FlagDefaultDescription
--min-severityinfoFilter findings below: critical|high|medium|low|info
--ignoreSuppress specific pattern IDs (e.g. RSA-001,HASH-001)
--ignore-categorySuppress entire categories (e.g. Asymmetric,Hash)
--fail-onExit 2 if findings at or above severity: critical|high|medium|low|info

Baseline comparison

FlagDefaultDescription
--baselineJSON file of previous findings — only report new findings
--update-baselinefalseOverwrite baseline file with current findings

Portal upload

FlagEnv varDefaultDescription
--source-idQTZ_SOURCE_IDSource UUID. Omit to auto-create a new source; provide to append scan results to an existing source.

AI analysis (requires portal connection)

FlagDefaultDescription
--llmfalseEnable AI-driven deep analysis (requires --server)
--llm-qualityautoAnalysis depth: auto|fast|deep|chain
--llm-max-files50Max source files sent to AI per scan (0 = unlimited)
--llm-batch-size10File chunks per AI server request
--llm-chunk-window300Lines per chunk for large-file splitting
--llm-chunk-overlap50Overlap lines between adjacent chunks (0 = none)
--scan-budgetMax USD for AI analysis (e.g. 2.50; 0 = unlimited)
--dry-runfalseCount candidate files without running AI analysis (requires --llm)
--resumefalseResume an interrupted AI scan
--checkpoint-fileExplicit checkpoint file path (default: auto-computed)

Reporting

FlagDefaultDescription
--show-scorefalsePrint transition readiness score (0–100)

scan network

FlagDefaultDescription
--timeout10sConnection timeout per target
--sniOverride Server Name Indication (default: hostname)
--insecurefalseSkip TLS certificate verification
--protocolsautoProtocols to probe: tls | ssh (default: auto-detect by port)
--skip-vulnsfalseSuppress individual vulnerability findings
--skip-quantumfalseSkip quantum-risk analysis

report summary

report summary <cbom.json> renders a human-readable summary to stdout. It inherits the global --format and --output flags — no command-specific flags.

# Default table output
qtz-discovery-cli report summary cbom.json

# Interactive terminal dashboard
qtz-discovery-cli report summary cbom.json --format dashboard

# Write JSON summary to file
qtz-discovery-cli report summary cbom.json --format json --output summary.json

report convert

FlagDefaultDescription
--toRequired. Target format: json | sarif
--outputstdoutWrite to file path

mcp serve

Starts the MCP server. Without --addr, listens on stdin/stdout (stdio transport).

FlagDefaultDescription
--addrListen address for HTTP transport (e.g. 127.0.0.1:8080); omit for stdio
--transportsseHTTP transport variant (only when --addr is set): sse | streamable-http
TransportEndpoints
stdiostdin / stdout
sse/sse (events) & /message (commands)
streamable-http/mcp (MCP 2025-03-26)

Environment Variables

VariableDescription
QTZ_SERVER_URLQuantizant portal base URL
QTZ_SERVER_ORG_IDOrganization ID
QTZ_SERVER_API_KEYPortal API key
QTZ_SOURCE_IDSource UUID for upload tagging (scan source only)
QTZ_GIT_TOKENGit access token for private repositories
QTZ_UPLOADUpload findings after scan when set to true
QTZ_LOG_LEVELLog verbosity: debug | info | warn | error
QTZ_FORMATDefault output format
QTZ_OUTPUTDefault output file path

Config File (.qtz-discovery.yaml)

Place .qtz-discovery.yaml in your project root or ~/.qtz/. CLI flags always take precedence over config file values.

# .qtz-discovery.yaml

log_level: info             # debug | info | warn | error

# Portal connection (required for AI analysis and uploads)
server:
  url:     https://discovery.quantizant.io/
  org_id:  your-org-id
  api_key: your-api-key     # Better: use QTZ_SERVER_API_KEY env var
  upload:  false            # Set true to auto-upload after every scan

# scan source defaults
scan:
  source:
    branch: main
    depth:  0               # 0 = full history
    excludes:
      - vendor/**
      - "*.pb.go"
      - node_modules/**
    llm:
      enabled:              false
      max_files:            50
      chunk_window_lines:   300
      chunk_overlap_lines:  50

  network:
    timeout:  10s
    insecure: false

# Default output
output:
  format: cbom              # cbom | sarif | json | csv | table | dashboard

Config File Lookup Order

The CLI searches for config files in this order (first found wins):

  1. Path specified by --config flag
  2. .qtz-discovery.yaml in the current directory
  3. config.yaml in the current directory (fallback name)
  4. ~/.qtz/.qtz-discovery.yaml
  5. ~/.qtz/config.yaml

Severity Levels

LevelDescription
criticalImmediate quantum or classical threat (e.g. RSA-1024, expired cert, TLS 1.0)
highSignificant risk — should be remediated before compliance deadline
mediumNotable issue — plan remediation within 12 months
lowBest practice violation — address in next review cycle
infoInformational — inventory item, no immediate action required

Exit Codes

CodeMeaning
0Success
1General error (bad config, auth failure, I/O error, etc.)
2Scan completed but --fail-on threshold was exceeded

Quantum Risk Classifications

ClassificationMeaning
VULNERABLEAlgorithm broken by Shor's or Grover's algorithm on a CRQC
PARTIALClassical algorithm with insufficient key size for post-quantum era
HYBRIDClassical+PQC hybrid in use — transitional but not fully quantum-safe
SAFENIST-approved PQC algorithm (ML-KEM, ML-DSA, SLH-DSA) or equivalent