CLI API Reference
Complete reference for the Bloodhound command-line interface. Installation, authentication, commands, and configuration options.
Overview
The Bloodhound CLI provides powerful security scanning capabilities from your terminal. It's designed for local development, CI/CD pipelines, and automated security workflows.
7 Engines
Deep analysis
CI/CD Ready
Pipeline integration
Multiple Formats
JSON, SARIF, HTML
Installation
Bash
System Requirements
Node.js 18+ required for npm installation. Binary releases available for Windows, macOS (Intel/ARM), and Linux (x64/ARM).
Authentication
Authenticate with your Bloodhound API key for full feature access.
Bash
API Key Locations
The CLI checks for API keys in this order:
- 1.
--keycommand line flag - 2.
BLOODHOUND_API_KEYenvironment variable - 3.
~/.bloodhound/credentialsfile - 4.
.bloodhound.yamlin project root
Basic Usage
Bash
Command Reference
scanRun security analysis on code
bloodhound scan [path] [options]reportGenerate security reports
bloodhound report [type] [options]fixApply automated fixes
bloodhound fix [finding-id] [options]configManage configuration
bloodhound config [action] [options]authManage authentication
bloodhound auth [action]versionShow version information
bloodhound versionBash
Configuration
Configure default behavior via bloodhound.yaml in your project root.
YAML
Bash
Exit Codes
Exit codes for CI/CD integration and scripting.
| Code | Meaning |
|---|---|
0 | Success - No findings or only info-level findings |
1 | Findings detected - Critical or high severity findings present |
2 | Configuration error - Invalid config or missing required options |
3 | Authentication error - Invalid or expired API key |
4 | Scan error - Analysis failed to complete |
5 | Network error - Unable to connect to Bloodhound services |
Bash