Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai agents Install Script

From Leeroopedia
Knowledge Sources
Domains DevOps, Configuration, CLI
Last Updated 2026-10-22 12:00 GMT

Overview

Concrete installer script for deploying AI agent definitions, slash commands, findings database, and CLI tools provided by the pentest-ai-agents toolkit.

Description

The install.sh script is the primary distribution mechanism for pentest-ai-agents. It supports multiple installation modes (global, project, lite), findings database setup, underlying CLI tool installation via system package managers and language ecosystems (pipx, go, cargo), and uninstall/status commands. It can be run from a cloned repository or bootstrapped directly via `curl | bash`.

The script detects whether it is being piped from curl (via `BASH_SOURCE[0]`) and automatically clones the repo to a temp directory before re-executing the cloned installer. In lite mode, advisory agents have their YAML frontmatter `model: sonnet` replaced with `model: haiku` via `sed` for lower token cost, while execution-capable (Tier 2) agents remain on Sonnet.

Usage

  • Global install: Run `./install.sh --global` to install agents to `~/.claude/agents/` for all Claude Code sessions.
  • Project install: Run `./install.sh --project` to install to `.claude/agents/` for the current project only.
  • Lite mode: Add `--lite` to use Haiku for advisory agents (lower token cost).
  • Tool installation: Run `./install.sh --tools` to install underlying CLI tools (nmap, nuclei, sqlmap, etc.).
  • One-liner: `curl -sSL https://raw.githubusercontent.com/0xSteph/pentest-ai-agents/main/install.sh | bash` bootstraps and installs globally.
  • Status check: Run `./install.sh --status` to see current installation state.
  • Uninstall: Run `./install.sh --uninstall` to remove all pentest-ai agents.

Code Reference

Source Location

Signature

#!/usr/bin/env bash
VERSION="3.3.0"
REPO_URL="https://github.com/0xSteph/pentest-ai-agents.git"

# Configuration
GLOBAL_DIR="${HOME}/.claude/agents"       # Global install destination
PROJECT_DIR=".claude/agents"              # Project install destination
GLOBAL_CMD_DIR="${HOME}/.claude/commands" # Global slash commands
PROJECT_CMD_DIR=".claude/commands"         # Project slash commands
LITE_MODE=false                           # Haiku for advisory agents
NO_DB=false                               # Skip DB installation

# Key functions:
bootstrap_from_curl()           # Clone repo + re-exec installer (curl|bash)
check_prereqs()                 # Verify git, Claude Code CLI presence
install_global()                # Copy agents to ~/.claude/agents/
install_project()               # Copy agents to .claude/agents/
install_db()                    # Copy DB scripts to ~/.pentest-ai/bin/ + PATH
install_tools()                 # Install CLI tools via apt/brew/pacman + pipx/go/cargo
detect_pkg_manager() -> str     # Returns apt|brew|pacman|dnf|yum|none
copy_agent(src: str, dest: str) # Copy agent file (with optional lite-mode sed)
install_commands(dest: str)     # Copy slash commands
is_haiku_safe(name: str) -> bool # Check if agent is safe for Haiku model
show_status()                   # Display installation status
uninstall()                      # Remove all pentest-ai agents
interactive()                    # Interactive menu (no args)
count_agents(dir: str) -> int   # Count .md files (excluding _ prefixed)

Import

# Run from disk:
./install.sh [--global | --project | --tools | --uninstall | --status] [--lite] [--no-db]

# Or bootstrap from curl:
curl -sSL https://raw.githubusercontent.com/0xSteph/pentest-ai-agents/main/install.sh | bash

I/O Contract

Inputs

Name Type Required Description
--global flag No (default when piped) Install agents to ~/.claude/agents/
--project flag No Install agents to .claude/agents/
--tools flag No Install underlying CLI tools
--lite flag No Use Haiku model for advisory agents
--no-db flag No Skip findings database installation
--uninstall flag No Remove all pentest-ai agents
--status flag No Show installation status
PENTEST_AI_TOOLS_YES env No Set to "1" to skip tool install confirmation

Outputs

Name Type Description
Agent files filesystem .md files copied to global or project .claude/agents/
Slash commands filesystem .md files copied to .claude/commands/
DB scripts filesystem findings.sh, handoff.sh, etc. copied to ~/.pentest-ai/bin/
PATH update shell RC Export added to ~/.zshrc or ~/.bashrc
CLI tools system Tools installed via apt/brew/pacman/pipx/go/cargo
Summary stdout Install/update/skip counts and locations

Usage Examples

Global Install

# Standard global install (all agents on Sonnet)
./install.sh --global

# Lite mode (advisory agents on Haiku for cost savings)
./install.sh --global --lite

# Skip findings database
./install.sh --global --no-db

One-Liner Install

# Bootstrap from GitHub (defaults to --global)
curl -sSL https://raw.githubusercontent.com/0xSteph/pentest-ai-agents/main/install.sh | bash

# With lite mode
curl -sSL https://raw.githubusercontent.com/0xSteph/pentest-ai-agents/main/install.sh | bash -s -- --global --lite

Install CLI Tools

# Install all underlying CLI tools (nmap, nuclei, sqlmap, hydra, etc.)
./install.sh --tools

# Non-interactive (skip confirmation prompt)
PENTEST_AI_TOOLS_YES=1 ./install.sh --tools

Check Status and Uninstall

# Check what's installed
./install.sh --status

# Remove all pentest-ai agents
./install.sh --uninstall

Related Pages

Implements Principles

Requires Environment

Uses Heuristics

Related Implementations

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment