This guide walks you through installing the CybeDefend CLI on macOS, ensuring you can quickly scan projects locally.

Requirements

  • macOS (Intel or Apple Silicon).
  • API Key from your CybeDefend account.
  • Optional: Homebrew or direct binary installation.

Installation Methods

brew tap cybedefend/cli
brew install cybedefend

Check version:

cybedefend --version

2. Direct Download

  1. Download: cybedefend-darwin-amd64 (for Intel) or cybedefend-darwin-arm64 (for M1/M2) from Releases.
  2. Make Executable:
    chmod +x cybedefend-darwin-*
    
  3. Move to /usr/local/bin:
    sudo mv cybedefend-darwin-* /usr/local/bin/cybedefend
    
  4. Verify:
    cybedefend --help
    

If you encounter a macOS Gatekeeper prompt, right-click the binary in Finder → Open, or remove quarantine attributes with xattr -d com.apple.quarantine cybedefend-darwin-*.


Scanning on macOS

  1. Navigate to Your Code
    cd ~/Projects/my-app
    
  2. Run a Scan
    cybedefend scan --dir . --api-key YOUR_API_KEY --project-id YOUR_PROJECT_ID
    
  3. Check Results
    cybedefend results --project-id YOUR_PROJECT_ID --all
    

You can also store your API key in the CYBEDEFEND_API_KEY environment variable to avoid typing it each time.