doctor command checks your system configuration, verifies dependencies, and helps install missing tools required for penetration testing.
Syntax
Description
Runs a comprehensive system check that verifies:- System Tools: Checks for required penetration testing tools (nmap, etc.)
- AI Providers: Verifies API key configuration for AI models
- Dependencies: Ensures all required system dependencies are available
No Options Required
Thedoctor command runs without any flags or options. Simply execute:
Interactive Installation
When the doctor finds missing tools, it can automatically install them:- macOS: Uses Homebrew (
brew) - Ubuntu/Debian: Uses apt-get
- Fedora/RHEL: Uses dnf
- Arch Linux: Uses pacman
Examples
Basic System Check
Run a complete diagnostic:First-Time Setup
When running on a fresh system:Fully Configured System
When everything is set up correctly:Missing API Keys
When no AI provider is configured:Checked Components
System Tools
nmap
nmap
Purpose: Network discovery and security scanningRequired: Recommended (optional for basic usage)Installation:Used for:
- Port scanning
- Service detection
- Network reconnaissance
AI Providers
The doctor checks for API keys for these providers:Anthropic (Claude)
Anthropic (Claude)
Environment Variable:
ANTHROPIC_API_KEYModels:- claude-sonnet-4-5 (recommended)
- claude-opus-4-0
- claude-3-5-sonnet
OpenAI (GPT)
OpenAI (GPT)
Environment Variable:
OPENAI_API_KEYModels:- gpt-4o
- gpt-4-turbo
- gpt-4
OpenRouter
OpenRouter
Environment Variable:
OPENROUTER_API_KEYModels: Access to 100+ models from multiple providersGet API Key: https://openrouter.ai/keysSetup:AWS Bedrock
AWS Bedrock
Environment Variable:
BEDROCK_API_KEYModels:- Claude models via AWS
- Other AWS Bedrock models
AWS IAM
AWS IAM
Environment Variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
vLLM (Local)
vLLM (Local)
Environment Variable:
LOCAL_MODEL_URLPurpose: Use locally hosted modelsSetup:Status Indicators
The doctor uses these indicators:| Icon | Meaning |
|---|---|
✓ | Installed and configured |
✗ | Missing or not found |
· | Not configured (optional) |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success - all checks passed |
1 | Installation failed (if attempted) |
The doctor command always exits with code
0 unless an installation fails. Missing optional tools don’t cause failures.Use Cases
Pre-Pentest Verification
Before running a pentest, verify your setup:Troubleshooting
If pentests fail, check configuration:- Missing nmap installation
- No AI provider configured
- Outdated tool versions
CI/CD Health Check
Verify CI environment before automated testing:Fresh Installation
After installing Pensar, run doctor to complete setup:Supported Package Managers
The doctor automatically detects and uses your system’s package manager:- macOS
- Ubuntu/Debian
- Fedora/RHEL
- Arch Linux
Manual Installation
If automatic installation fails or is unavailable:nmap
From source:Troubleshooting
Package Manager Not Found
If the doctor cannot detect a package manager:Permission Denied
If installation fails with permission errors:API Key Not Detected
If you set an API key but doctor doesn’t detect it:nmap Version Issues
If you have an old version of nmap:Configuration Files
The doctor reads configuration from:Related Commands
- pensar - Launch TUI after verifying setup
- pentest - Run pentest after verification
- upgrade - Update Pensar itself
Next Steps
Getting Started
Complete setup guide after running doctor
Configuration
Advanced configuration options

