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 directoryfortly secrets .# Scan a specific directoryfortly 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 applyingfortly fix scan_abc123# Auto-apply all fixes (critical + high)fortly fix scan_abc123 --auto# Dry run — show diffs without applyingfortly fix scan_abc123 --dry-run 6
fortly sbom [path]
Generate a Software Bill of Materials
# Generate CycloneDX SBOMfortly sbom --format cyclonedx# Generate SPDX SBOMfortly sbom --format spdx# Output to filefortly sbom --format cyclonedx --output sbom.json# Scan a specific pathfortly sbom ./packages/api --format cyclonedx 7
fortly diff <scan1> [scan2]
Compare two scans or show recent changes
# Compare two specific scansfortly diff scan_abc123 scan_def456# Compare with most recent scan (omit scan2)fortly diff scan_abc123# Show changes in the last 7 daysfortly diff --since 7d# Show changes in the last 30 daysfortly diff --since 30d 8
fortly report <path>
Generate scan reports in various formats
# Generate JSON reportfortly report ./scan-results --format json# Generate HTML report (shareable)fortly report ./scan-results --format html# Generate PDF reportfortly report ./scan-results --format pdf# Generate SARIF for GitHubfortly report ./scan-results --format sarif 9
fortly config
Manage CLI configuration
# Set a config valuefortly config set api-key ft_sk_your_keyfortly config set default-format sarif# Get a config valuefortly config get api-key# List all configfortly config list# Reset to defaultsfortly config reset 10
fortly completions
Generate shell completions
fortly completions bash >> ~/.bashrcsource ~/.bashrc