Skip to main content

Installation

Pensar Apex can be installed using multiple methods depending on your platform and preferences. Choose the installation method that best suits your workflow.

Prerequisites

Before installing Pensar Apex, ensure you have:
1

API Key

An API key from one of the supported AI providers:
2

System Requirements

  • Node.js 18.0.0 or higher (for npm installation)
  • Bun 1.0.0 or higher (alternative runtime)
  • Internet connection for AI model access
After installation, run pensar doctor to check for optional dependencies like nmap and install additional penetration testing tools.

Installation Methods

The fastest way to install Pensar Apex on macOS and Linux:
curl -fsSL https://pensarai.com/install.sh | bash
This script will:
  • Detect your system architecture
  • Download the appropriate binary
  • Install it to /usr/local/bin/pensar
  • Make it executable and add to PATH
The installation script:
  1. Detects your operating system and architecture (arm64/x64)
  2. Downloads the latest compiled binary from the release server
  3. Installs the binary to /usr/local/bin/ (requires sudo)
  4. Sets executable permissions
  5. Verifies the installation by running pensar version
The script is safe to review before running:
curl -fsSL https://pensarai.com/install.sh

Verify Installation

After installation, verify that Pensar Apex is installed correctly:
pensar version
v0.0.79
You should see the version number displayed. If you see an error, ensure that the installation directory is in your system PATH.

Configuration

Set Up AI Provider API Key

Pensar Apex requires an AI provider API key to function. Set your API key as an environment variable:
export ANTHROPIC_API_KEY="your-api-key-here"
To make these environment variables persistent, add them to your shell configuration file (~/.bashrc, ~/.zshrc, or ~/.profile).

First Launch

On first launch, Pensar Apex will:
  1. Display the Responsible Use Disclosure (press Enter to accept)
  2. If no API key is configured, route to the Provider Manager screen
  3. Create a configuration directory at ~/.pensar/
Launch the interactive TUI:
pensar
The TUI will guide you through the initial setup if needed.

Post-Install Setup with pensar doctor

After installation, run the diagnostic tool to check your environment and install recommended dependencies:
pensar doctor
Pensar Doctor
=============

System Tools
------------
 nmap not found (recommended for network scanning)

AI Providers
------------
 Anthropic
  · OpenAI
  · OpenRouter
  · AWS Bedrock
  · AWS IAM
  · vLLM (local)

Install nmap via Homebrew? (brew install nmap) [y/N]

What pensar doctor Checks

  • nmap: Network scanning and port enumeration tool (highly recommended)
  • Offers to install nmap automatically if a supported package manager is detected
Checks which AI provider API keys are configured:
  • Anthropic (ANTHROPIC_API_KEY)
  • OpenAI (OPENAI_API_KEY)
  • OpenRouter (OPENROUTER_API_KEY)
  • AWS Bedrock (BEDROCK_API_KEY or IAM credentials)
  • vLLM local model (LOCAL_MODEL_URL)

Installing nmap

The pensar doctor command can automatically install nmap on supported systems:
brew install nmap
While nmap is optional, it is highly recommended for comprehensive network scanning capabilities during blackbox penetration testing.
For the best pentesting experience, run Pensar Apex in the included Kali Linux container with all security tools preconfigured:
1

Navigate to Container Directory

cd container
2

Configure Environment

cp env.example .env
# Edit .env and add your API keys
3

Build and Start Container

docker compose up --build -d
4

Access Container

docker compose exec kali-apex bash
5

Run Pensar Inside Container

pensar
Linux users: For comprehensive network scanning, consider using network_mode: host in docker-compose.yml to allow the container direct access to your network interfaces.

Upgrading Pensar Apex

To upgrade to the latest version, use the built-in upgrade command:
pensar upgrade
Current version: v0.0.79
Checking for updates...

Upgraded from v0.0.79 to v0.0.80. Please restart pensar.
The upgrade command automatically detects your installation method and uses the appropriate upgrade mechanism:
  • npm: npm install -g @pensar/apex@latest
  • Homebrew: brew upgrade pensarai/tap/apex
  • Binary: Re-downloads from https://pensarai.com/install.sh
Depending on your installation method:npm:
npm update -g @pensar/apex
Homebrew:
brew upgrade pensarai/tap/apex
Binary (macOS/Linux):
curl -fsSL https://pensarai.com/install.sh | bash
Windows (PowerShell):
irm https://pensarai.com/apex.ps1 | iex

Troubleshooting

The installation directory is not in your PATH.Solution:
  1. Check where pensar was installed:
    which pensar
    
  2. Add the directory to your PATH in ~/.bashrc or ~/.zshrc:
    export PATH="$PATH:/usr/local/bin"
    
  3. Reload your shell configuration:
    source ~/.bashrc  # or ~/.zshrc
    
Insufficient permissions to install to system directories.Solution:
  • Run installation with sudo (be cautious)
  • Use npm with user-owned global directory
  • Install via Homebrew which handles permissions automatically
Missing or incorrect API key configuration.Solution:
  1. Set your API key environment variable:
    export ANTHROPIC_API_KEY="your-key"
    
  2. Verify it’s set:
    echo $ANTHROPIC_API_KEY
    
  3. Run pensar doctor to confirm configuration
nmap is not installed on your system.Solution: Run pensar doctor and follow the prompts to install nmap automatically, or install manually:
# macOS
brew install nmap

# Ubuntu/Debian
sudo apt-get install nmap

Next Steps

Quickstart Guide

Learn how to run your first penetration test with Pensar Apex

Build docs developers (and LLMs) love