#88

feat: one-line remote installer (closes #9)

Openeajajhossainwants to merge intofrom

Closes #9.

Problem

scripts/setup.sh and scripts/setup.ps1 already handle the full setup (venv, deps, Playwright, .env), but the README still requires users to clone the repo, cd into it, and then run setup by hand. The issue asked for a shortcut like the gemini-cli installer — a single paste-and-go command.

Changes

  • scripts/install.sh (new) — one-line bootstrap for Linux/macOS. Checks for git/python3, clones the repo (or reuses/updates an existing checkout), then hands off to scripts/setup.sh.
  • scripts/install.ps1 (new) — same bootstrap for Windows PowerShell.
  • README.md — adds a prominent "Quick install (one line)" section and moves the manual clone/setup steps into a collapsible
    block.

Usage

Linux/macOS

curl -fsSL https://raw.githubusercontent.com/GH05TCREW/pentestagent/main/scripts/install.sh | bash

Windows (PowerShell)

irm https://raw.githubusercontent.com/GH05TCREW/pentestagent/main/scripts/install.ps1 | iex

Notes

  • The installers don't duplicate any setup logic — they only clone and delegate to the existing setup.sh/setup.ps1.
  • Idempotent: an existing clone is reused and fast-forwarded instead of failing.
  • Supports PENTESTAGENT_REPO, PENTESTAGENT_DIR, and PENTESTAGENT_REF env overrides for forks, custom target dirs, or pinning a branch/tag.
  • Both scripts pass bash -n / PowerShell parse checks.

Testing

Tested against a fork without touching the default target dir

PENTESTAGENT_REPO=https://github.com//pentestagent.git bash scripts/install.sh

Activity

2
copilot-pull-request-reviewer[bot]reviewed3mo ago
copilot-pull-request-reviewer[bot]3mo ago

Pull request overview

Adds paste-and-go installers so users can bootstrap PentestAgent without manually cloning the repo first, addressing the “quick install script” request in issue #9.

Changes:

  • Added scripts/install.sh (Linux/macOS) to clone/reuse a checkout and delegate to scripts/setup.sh.
  • Added scripts/install.ps1 (Windows) to clone/reuse a checkout and delegate to scripts/setup.ps1.
  • Updated README.md with a prominent “Quick install (one line)” section and moved manual steps into a collapsible <details> block.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

FileDescription
scripts/install.shNew bash bootstrap installer that clones/reuses the repo and runs scripts/setup.sh.
scripts/install.ps1New PowerShell bootstrap installer that clones/reuses the repo and runs scripts/setup.ps1.
README.mdDocuments the new one-line install commands and demotes manual install instructions into a <details> section.
Suppressed comments (2)

scripts/install.sh:44

  • When $TARGET_DIR already exists, the script always runs git pull and never applies PENTESTAGENT_REF. This makes installs non-idempotent with respect to the requested pin (users can’t reliably stick to a tag/branch).
    echo "[OK] Existing clone found at '$TARGET_DIR' — updating"
    git -C "$TARGET_DIR" pull --ff-only || echo "[WARN] Could not fast-forward; continuing with existing checkout"
    REPO_DIR="$TARGET_DIR"

scripts/install.ps1:42

  • When an existing clone is found, the script runs git pull but never applies $env:PENTESTAGENT_REF. If the user expects a pinned branch/tag, the install will silently use whatever branch the checkout is currently on.
} elseif (Test-Path (Join-Path $TargetDir ".git")) {
    Write-Host "[OK] Existing clone found at '$TargetDir' - updating"
    try { git -C $TargetDir pull --ff-only } catch { Write-Host "[WARN] Could not fast-forward; continuing with existing checkout" }
    $RepoDir = $TargetDir

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.