Skip to Content
Alprina is in active development. Join us in building the future of security scanning.
CLI ReferenceCLI Commands Overview

CLI Commands Overview

Complete reference for all Alprina CLI commands. Based on the actual implementation in alprina-cli.

All Commands at a Glance

alprina --help # Show help and version alprina version # Show CLI version alprina scan <target> # Scan files, URLs, or IPs alprina recon <target> # Perform reconnaissance alprina mitigate [finding_id] # Get AI-powered fix suggestions alprina fix <target> # AI-powered vulnerability fixes alprina quickstart # Interactive tutorial for new users alprina history # View scan history and results alprina chat # Interactive AI security assistant alprina auth login # Authenticate with Alprina alprina auth logout # Remove authentication alprina auth status # Check authentication status alprina policy init # Initialize policy configuration alprina policy test <target> # Test if target is allowed alprina config --init # Initialize default configuration alprina report --format <type> # Generate security reports alprina billing status # Check billing and usage

Core Scanning Commands

alprina scan

Run AI-powered security scan on code, APIs, or infrastructure.

alprina scan <target> [OPTIONS]

Arguments:

  • <target> - File path, directory, URL, or IP address to scan

Options:

  • --profile, -p - Scan profile (default: default)
    • default - Standard security scan
    • code-audit - Deep code analysis
    • web-recon - Web application scanning
    • api-security - API endpoint testing
  • --safe-only - Only run non-intrusive scans (default: true)
  • --output, -o - Save results to file

Examples:

# Scan local directory alprina scan ./src # Scan with specific profile alprina scan ./src --profile code-audit # Scan remote API alprina scan https://api.example.com --profile api-security # Scan IP address alprina scan 192.168.1.1 --safe-only # Save results to file alprina scan ./src --output results.json

→ Complete scan command reference


alprina recon

Perform reconnaissance on a target (passive or active).

alprina recon <target> [OPTIONS]

Arguments:

  • <target> - Domain, URL, or IP to reconnaissance

Options:

  • --passive - Use only passive techniques (default: true)

Examples:

# Passive reconnaissance alprina recon example.com # Active reconnaissance (requires confirmation) alprina recon example.com --passive=false

alprina mitigate

Get AI-powered mitigation suggestions for security findings.

alprina mitigate [finding_id] [OPTIONS] alprina fix <target> # AI-powered vulnerability fixes alprina quickstart # Interactive tutorial for new users alprina history # View scan history and results alprina chat # Interactive AI security assistant

Arguments:

  • [finding_id] - Specific finding ID (optional)

Options:

  • --report, -r - Process findings from report file

Examples:

# Get suggestions for all findings alprina mitigate # Get suggestion for specific finding alprina mitigate VULN-2024-001 # Process from report file alprina mitigate --report ~/.alprina/out/latest-report.json

Authentication Commands

alprina auth login

Authenticate with Alprina platform.

alprina auth login [OPTIONS]

Options:

  • --api-key - Provide API key directly
  • --provider - OAuth provider (github, google)

Examples:

# Interactive login alprina auth login # Login with API key alprina auth login --api-key YOUR_API_KEY # OAuth login alprina auth login --provider github

Note: Authentication is optional for local scans but required for remote targets.


alprina auth logout

Remove authentication credentials.

alprina auth logout

alprina auth status

Check current authentication status.

alprina auth status

Shows:

  • Authentication state (logged in/out)
  • User information
  • API key status
  • Subscription tier

Policy Commands

alprina policy init

Initialize a new policy configuration file.

alprina policy init

Creates alprina-policy.yaml with default security policies.

Example output:

version: "1.0" allowed_targets: - localhost - 127.0.0.1 - "*.internal.com" blocked_targets: - "*.gov" - "*.mil" scan_options: safe_only: true max_depth: 3

alprina policy test

Test if a target is allowed by current policy.

alprina policy test <target>

Arguments:

  • <target> - Target to test against policy

Examples:

# Test if target is allowed alprina policy test api.example.com # Test IP address alprina policy test 192.168.1.1

Configuration Commands

alprina config

Manage Alprina configuration.

alprina config [OPTIONS]

Options:

  • --init - Initialize default configuration

Examples:

# Initialize config alprina config --init # View current config location alprina config

Configuration file location: ~/.alprina/config.yaml


Reporting Commands

alprina report

Generate security reports from scan results.

alprina report [OPTIONS]

Options:

  • --format, -f - Report format (default: html)
    • html - Interactive HTML report
    • pdf - PDF document
    • json - Machine-readable JSON
  • --output, -o - Output file path

Examples:

# Generate HTML report alprina report --format html # Generate PDF report alprina report --format pdf --output security-report.pdf # Generate JSON for CI/CD alprina report --format json

Reports are saved to: ~/.alprina/out/


Billing Commands

alprina billing status

Check billing status and usage statistics.

alprina billing status

Shows:

  • Current subscription tier (Free/Pro/Enterprise)
  • Scans used this month
  • Remaining quota
  • Next billing date
  • Payment method

Global Flags

These flags work with all commands:

FlagDescription
--verbose, -vEnable verbose output
--debugEnable debug mode with detailed logs
--help, -hShow help message for any command

Examples:

# Verbose output alprina scan ./src --verbose # Debug mode alprina scan ./src --debug # Get help for specific command alprina scan --help

Version Information

alprina version

Show Alprina CLI version.

alprina version

Example output:

Alprina CLI version 0.2.2

Exit Codes

Alprina uses standard exit codes:

CodeMeaning
0Success
1General error
2Authentication required
3Policy violation
10High severity findings detected
130Operation cancelled by user (Ctrl+C)

Example usage in CI/CD:

alprina scan ./src || exit $?

Command Completion

Enable shell completion for faster command entry:

# Bash alprina --install-completion bash # Zsh alprina --install-completion zsh # Fish alprina --install-completion fish

Next Steps

Last updated on