Installer Internals
How the PraisonAI install.sh works — uv/pipx detection, uv bootstrap, and PATH management
The PraisonAI installer picks a tool manager (uv tool → pipx → bootstrap uv) so you get a working praisonai CLI in an isolated environment without touching your global Python. Windows has its own install.ps1 that installs praisonai[all] into a per-user venv.
flowchart TD
S{Which OS?}:::agent
S -->|macOS / Linux / WSL| A[curl install.sh | sh]:::tool
S -->|Windows| W[iwr install.ps1 | iex]:::tool
A --> B[Detect platform via uname]:::agent
B --> C{Have uv?}:::agent
C -->|Yes| U[uv tool install --force praisonai]:::tool
C -->|No| D{Have pipx?}:::agent
D -->|Yes| P[pipx install --force praisonai]:::tool
D -->|No| E[Bootstrap uv from astral.sh]:::process
E --> U
U --> H[Wire ~/.local/bin onto PATH]:::process
P --> H
H --> K[Print Get started panel]:::success
W --> WV[Create ~/.praisonai/venv]:::process
WV --> WI[pip install praisonai[all]]:::tool
WI --> WP[Prepend venv Scripts to PATH]:::process
WP --> WO[Run praisonai setup wizard]:::process
WO --> K
classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff
classDef process fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef success fill:#10B981,stroke:#7C90A0,color:#fffinstall.sh (macOS / Linux / WSL)
Run it with:
curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | shHow It Works
- Detect platform
Reads
uname -s/uname -mto report the OS and architecture. - Require curl
Errors out immediately if
curlis not available. - Check PRAISONAI_INSTALLER override
If set to
uvorpipx, forces that manager.pipxerrors if not installed;uvbootstraps itself when missing. Any other value errors. - Pick a tool manager
In auto mode: use
uv toolifuvis present → elsepipxif present → else bootstrapuv. - Bootstrap uv (only if neither exists)
Downloads
https://astral.sh/uv/install.shto a temp file first, so a failed or empty download fails loudly instead of a lateruv: command not found. Runs it, then verifiesuvis on PATH. - Install praisonai
- uv:
uv tool install --force praisonai - pipx:
pipx install --force praisonai+pipx ensurepath
Add
PRAISONAI_VERSION=x.y.zto installpraisonai==x.y.z. - uv:
- Wire ~/.local/bin onto PATH
Appends an idempotent block (grepped for the bin dir before writing) to the correct rc file(s): – zsh →
~/.zshrc– fish →~/.config/fish/config.fish(fish_add_pathwhen available, POSIX-safe fallback otherwise) – bash → both~/.bashrcand the applicable login profile (~/.bash_profile→~/.bash_login→~/.profile, first that exists) – anything else →~/.profile - Print Get started panel
Points at
praisonai setup,praisonai upgrade,praisonai upgrade --check, andpraisonai uninstall.
User Interaction Flow
Environment Variables (the only knobs)
The installer has no CLI flags. Its only inputs are three environment variables.
| Variable | Values | Behaviour | |
|---|---|---|---|
PRAISONAI_VERSION | x.y.z | Pin a specific version. Appended as praisonai==VERSION (default: latest from PyPI). | |
PRAISONAI_INSTALLER | uv \ | pipx | Force a tool manager. pipx errors if not installed; uv bootstraps itself if missing. Any other value errors. |
PRAISONAI_NONINTERACTIVE | any truthy | Non-interactive/CI mode (only changes an info message during uv bootstrap; the script never prompts). |
# Pin a version
PRAISONAI_VERSION=0.14.0 curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
# Force pipx
PRAISONAI_INSTALLER=pipx curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | shPower-User Alternatives (No Installer Needed)
These are first-class supported paths — no installer required:
# Zero-install one-shot via uv
uvx praisonai "2+2"
# Isolated persistent install
pipx install praisonai
# Install into the active Python environment
pip install praisonaiManage Your Install
After installation, the installer’s “Get started” panel points at these self-management commands:
praisonai upgrade # update in place
praisonai upgrade --check # is a newer version available?
praisonai uninstall # remove cleanlySee praisonai upgrade and praisonai uninstall.
Choosing a Manager
CI/CD Usage
GitHub Actions
- name: Install PraisonAI
run: curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
env:
PRAISONAI_NONINTERACTIVE: "1"GitLab CI
install:
script:
- curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
variables:
PRAISONAI_NONINTERACTIVE: "1"Docker
FROM python:3.12-slim
RUN apt-get update && apt-get install -y curl \
&& curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | shUninstall
Use the built-in self-management command, which removes the managed install via the detected manager:
praisonai uninstall # confirms first
praisonai uninstall --yes # CI-safe, no promptSee the praisonai uninstall page for details and JSON output.
Troubleshooting
praisonai not found after install
Restart your terminal or source your shell rc:
source ~/.zshrc # zsh
source ~/.bashrc # bashOr add ~/.local/bin to PATH manually:
export PATH="$HOME/.local/bin:$PATH"Force a specific manager
PRAISONAI_INSTALLER=pipx curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | shI have both uv and pipx — which runs?
The installer picks uv first. Override with PRAISONAI_INSTALLER=pipx.
uv bootstrap failed (network/DNS)
The installer downloads astral.sh/uv/install.sh to a temp file and fails loudly if the download is empty or the network is unreachable. Install uv or pipx manually, then re-run:
# https://docs.astral.sh/uv/getting-started/installation/
curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | shinstall.ps1 (Windows)
Run it with:
iwr -useb https://praison.ai/install.ps1 | iexTo pass parameters, use the script-block form so the params are honoured:
& ([scriptblock]::Create((iwr -useb https://praison.ai/install.ps1))) -Extras "ui,chat"How It Works
- Detect Python
Requires Python >= 3.10. If missing, tries
winget install Python.Python.3.12→choco install python→scoop install python. - Ensure pip
Bootstraps pip via
ensurepip, falling back toget-pip.py. - Create venv
Creates a venv at
%USERPROFILE%\.praisonai\venv(unless-NoVenv). - Install praisonai[all]
Installs
praisonai[all]into the venv — this is the PR #3029 fix. Previously it installedpraisonaiagents, leaving thepraisonaiwrapper absent. - Wire PATH
Prepends
<venv>\Scriptsto the userPathenvironment variable. - Verify
Confirms the install can
import praisonaiagentsand (if on PATH)praisonai --version. - Run onboarding
Runs
python -m praisonai setup. Skipped if-NoOnboard,-DryRun,PRAISONAI_NO_PROMPTis set, or the session is non-interactive / stdin-redirected. - Print Next steps
Prints the venv activate command, a quick-start Python one-liner, the docs link, and an
OPENAI_API_KEYreminder.
Parameters
| Parameter | Env var | Default | Behaviour |
|---|---|---|---|
-Version <x.y.z> | PRAISONAI_VERSION | latest | Pins a specific version. Appended as praisonai[all]==<x.y.z>. |
-Extras <csv> | PRAISONAI_EXTRAS | (none — install is praisonai[all]) | Comma-separated extras. Overrides the default [all] to [<csv>]. If the extras include ui, chat, or code, the wrapper is also installed with those extras. |
-NoVenv | PRAISONAI_SKIP_VENV=1 | off | Skip creating %USERPROFILE%\.praisonai\venv. Installs into the detected Python instead. |
-NoOnboard | PRAISONAI_NO_ONBOARD=1 | off | Skip the interactive python -m praisonai setup wizard. |
-Python <path> | PRAISONAI_PYTHON | auto-detect | Use a specific Python executable. Otherwise the script probes python, python3, py -3.12, py -3.11, py -3.10, py. |
-DryRun | PRAISONAI_DRY_RUN=1 | off | Print every command that would run without making changes. |
-Help | — | — | Print the built-in help panel and exit. |