Skip to main content
The pensar command (with no subcommand) launches the interactive Terminal UI (TUI), providing a full visual interface for penetration testing workflows.

Syntax

pensar

Description

The TUI provides an interactive environment for:
  • Guided Pentesting: Step-by-step workflows for blackbox and whitebox testing
  • Session Management: View, resume, and organize past pentest sessions
  • Real-time Chat: Interact with AI agents during security assessments
  • Visual Dashboard: Monitor agent progress, findings, and system status
  • Configuration: Manage AI providers, models, and tool settings

Features

First-Time Setup

On first launch, the TUI guides you through:
  1. Responsible Use Disclosure: Review and accept ethical hacking guidelines
  2. Provider Configuration: Set up AI provider API keys if not already configured

Main Interface

The TUI offers multiple screens accessible via keyboard shortcuts:
Interactive chat interface with AI security agents. Send messages, review findings, and collaborate on vulnerability discovery.Key Features:
  • Real-time streaming responses
  • Tool call visualization
  • Finding annotations
  • Session context preservation

Keyboard Shortcuts

Press Ctrl+P at any time to see all available shortcuts.
ShortcutAction
Ctrl+POpen command palette
Ctrl+NNew chat session
Ctrl+SView sessions
Ctrl+TToggle theme
Ctrl+CExit / Cancel
EscClose dialog / Go back

Chat Interface

ShortcutAction
EnterSend message
Shift+EnterNew line
/ Navigate message history
Ctrl+LClear chat

Configuration Files

The TUI stores configuration in:
~/.pensar/
├── config.json          # User preferences and API keys
├── sessions/            # Session data and history
│   ├── <session-id>/
│   │   ├── findings.json
│   │   ├── pocs/
│   │   └── report.md
└── logs/                # Error logs and diagnostics

Examples

Launch TUI

pensar
Pensar TUI Main Screen

First-Time Setup Flow

$ pensar

╔══════════════════════════════════════════════════════════╗

              RESPONSIBLE USE DISCLOSURE

  Pensar is designed for authorized security testing
  only. You must have explicit permission to test any
  system or network.

  Press Enter to accept and continue...

╚══════════════════════════════════════════════════════════╝
After accepting, if no AI provider is configured:
╔══════════════════════════════════════════════════════════╗

                   PROVIDER SETUP

  No AI provider configured. Please set up at least
  one provider to continue.

 Anthropic
    OpenAI
    OpenRouter
    AWS Bedrock
    Local vLLM

╚══════════════════════════════════════════════════════════╝

Normal TUI Session

$ pensar

┌─────────────────────────────────────────────────────────┐
 Pensar Apex v0.0.79

 Chat       Sessions       Operator       Config
 ────       ────────       ────────       ──────

 > Start a new pentest or ask me anything...





 [Type message] Ctrl+P: Commands  Ctrl+C: Exit
└─────────────────────────────────────────────────────────┘

Use Cases

1. Interactive Pentest Learning

Start conversations with AI agents to learn about:
  • Vulnerability discovery techniques
  • Exploitation methodologies
  • Security best practices
pensar
# Then in chat:
> Explain how to test for SQL injection in a login form

2. Manual Vulnerability Research

Use the TUI to manually explore targets with AI assistance:
pensar
# Navigate to Operator Dashboard
# Configure target and testing parameters
# Launch guided pentest workflow

3. Session Review and Reporting

Review past pentest findings:
pensar
# Press Ctrl+S to view sessions
# Select a session to review findings
# Export reports or continue testing

Troubleshooting

TUI Won’t Launch

# Check for errors
pensar doctor

# Verify terminal compatibility
echo $TERM
# Should show: xterm-256color, screen-256color, etc.

Display Issues

If you experience rendering problems:
  1. Ensure your terminal supports 256 colors
  2. Try a different theme: Ctrl+T in the TUI
  3. Resize your terminal window (minimum 80x24)

Performance Issues

For slow TUI performance:
# Use CLI commands instead for better performance
pensar pentest --target https://example.com

Environment Variables

The TUI respects these environment variables:
ANTHROPIC_API_KEY
string
Anthropic API key for Claude models (recommended)
OPENAI_API_KEY
string
OpenAI API key for GPT models
OPENROUTER_API_KEY
string
OpenRouter API key for multi-model access
NO_COLOR
flag
Disable colored output (for accessibility)

Advanced Configuration

Custom Themes

The TUI supports multiple themes:
  • Apex (default)
  • Catppuccin
  • Dracula
  • Tokyo Night
  • Nord
  • Gruvbox
  • And more…
Change themes via Ctrl+T or in the Config menu.

Keyboard Customization

Edit ~/.pensar/config.json to customize shortcuts:
{
  "keybindings": {
    "newSession": "ctrl+n",
    "viewSessions": "ctrl+s",
    "commandPalette": "ctrl+p"
  }
}

Next Steps

Getting Started

Complete setup guide for first-time users

Workflows

Learn about pentest workflows and methodologies

Build docs developers (and LLMs) love