Home / Developers / CLI
v2.0

CLI v2.0

10 commands for scanning, secrets detection, SBOM generation, AI remediation, and CI/CD integration. Git hook support built in.

CLI v2.0

10 commands for security scanning, secrets detection, and CI/CD integration

Installation

npm install -g fortly-cli
1

fortly scan <url>

Run a DAST security scan on a target URL

fortly scan https://myapp.com
2

fortly secrets [path]

Detect hardcoded secrets and credentials

# Scan current directory
fortly secrets .
# Scan a specific directory
fortly secrets ./src
3

fortly init

Initialize Fortly for your project

fortly init
# Auto-detects your stack:
# Framework: Next.js 15
# Language: TypeScript
# Package: npm
# CI/CD: GitHub Actions
#
# Generates .fortly.yml with recommended config
4

fortly doctor

Verify your Fortly setup (7 checks)

fortly doctor
# Runs 7 checks:
# 1. API key configured and valid
# 2. CLI version up to date
# 3. .fortly.yml exists and valid
# 4. Git hooks installed
# 5. Network connectivity to API
# 6. Node.js version compatible
# 7. CI/CD integration detected
5

fortly fix <scanId>

AI-powered remediation for vulnerabilities

# Interactive fix — review each fix before applying
fortly fix scan_abc123
# Auto-apply all fixes (critical + high)
fortly fix scan_abc123 --auto
# Dry run — show diffs without applying
fortly fix scan_abc123 --dry-run
6

fortly sbom [path]

Generate a Software Bill of Materials

# Generate CycloneDX SBOM
fortly sbom --format cyclonedx
# Generate SPDX SBOM
fortly sbom --format spdx
# Output to file
fortly sbom --format cyclonedx --output sbom.json
# Scan a specific path
fortly sbom ./packages/api --format cyclonedx
7

fortly diff <scan1> [scan2]

Compare two scans or show recent changes

# Compare two specific scans
fortly diff scan_abc123 scan_def456
# Compare with most recent scan (omit scan2)
fortly diff scan_abc123
# Show changes in the last 7 days
fortly diff --since 7d
# Show changes in the last 30 days
fortly diff --since 30d
8

fortly report <path>

Generate scan reports in various formats

# Generate JSON report
fortly report ./scan-results --format json
# Generate HTML report (shareable)
fortly report ./scan-results --format html
# Generate PDF report
fortly report ./scan-results --format pdf
# Generate SARIF for GitHub
fortly report ./scan-results --format sarif
9

fortly config

Manage CLI configuration

# Set a config value
fortly config set api-key ft_sk_your_key
fortly config set default-format sarif
# Get a config value
fortly config get api-key
# List all config
fortly config list
# Reset to defaults
fortly config reset
10

fortly completions

Generate shell completions

fortly completions bash >> ~/.bashrc
source ~/.bashrc