Getting Started

Prerequisites

  • API Key for your chosen AI provider (Anthropic recommended)

After installing, run pensar doctor to check for optional dependencies (like nmap) and install them automatically.

Installation

Install Apex using your preferred method:

bash curl -fsSL https://pensarai.com/install.sh | bash

Apex is now installed! You can run it from anywhere by typing pensar in your terminal.

Configuration

Before running Apex, you need to configure your AI provider API key. Apex supports multiple providers, but Anthropic is recommended for best results.

Get your API key from platform.openai.com.

Get your API key from aistudio.google.com.

Google provides access to Gemini models through the Generative AI API.

Get your API key from openrouter.ai.

OpenRouter provides access to multiple AI models through a single API.

Configure AWS credentials with Bedrock access.

Ensure you have access to Anthropic Claude models in AWS Bedrock.

Use the /auth command inside Apex to connect to Pensar Console for managed inference — no API key required.

Provider selection screen

Tip: You’ll configure your API key directly in Apex using the /providers command — no environment variables needed!

Running Apex

Launch Apex by running:

$pensar

This will start the interactive terminal interface where you can access all Apex commands.

Apex Home Screen

CLI Commands

Apex also supports headless CLI commands for CI/CD and scripting:

$pensar pentest --target <url> # Run a full pentest orchestration
$pensar targeted-pentest --target <url> # Run a targeted pentest
$pensar auth login # Connect to Pensar Console from the CLI
$pensar auth status # Show current auth connection status
$pensar auth logout # Disconnect from Pensar Console
$pensar projects # List workspace projects
$pensar pentests <projectId> # List/get/dispatch pentests
$pensar issues <projectId> # List/get/update security issues
$pensar fixes <issueId> # List/get security fixes
$pensar logs <issueId> # List/search agent execution logs
$pensar upgrade # Update to the latest version
$pensar doctor # Check & install optional dependencies
$pensar uninstall # Fully remove Pensar (interactive)
$pensar uninstall --force # Fully remove Pensar (no confirmation)

Using Kali Linux Container (Optional)

For best performance and maximum compatibility with security tools, we recommend running Apex in the included Kali Linux container:

1

Clone the Repository

bash git clone https://github.com/pensarai/apex.git cd apex/container

2

Configure Environment

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

3

Start Container

bash docker compose up --build -d
4

Enter Container

bash docker compose exec kali-apex bash

5

Run Apex

Inside the container, run: bash pensar

Linux Users: Consider using network_mode: host in docker-compose.yml for comprehensive network scanning capabilities.

First Steps

Now that Apex is installed, here’s how to get started:

1

Login to Pensar

Run /auth to login to Pensar.

2

Select Model

Run /models to choose which AI model to use

3

Start Testing

Run /pentest to launch an autonomous penetration test, or /operator for an interactive session

/pentest

Launch an autonomous penetration testing swarm against your target.

/operator

Start an interactive operator session with step-by-step control.

/providers

Connect your AI provider and configure API keys.

/models

Select which AI model to use for testing.

Next Steps

Need Help?

If you encounter any issues or have questions, reach out to our support team at team@pensarai.com.