> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade & Uninstall

> One-line install, in-place upgrade, clean uninstall — plus a non-blocking new-version hint

Install PraisonAI with one command, keep it current with `praisonai upgrade`, and remove it cleanly with `praisonai uninstall`.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
```

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    A[curl install.sh]:::tool --> B{uv or pipx?}:::config
    B --> C[managed env]:::process
    C --> D[praisonai run]:::agent
    D --> E{new version?}:::config
    E -->|yes| F[hint on startup]:::warn
    F --> G[praisonai upgrade]:::process
    G --> D
    D -->|done with it| H[praisonai uninstall]:::success

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef config fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef warn fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef success fill:#10B981,stroke:#7C90A0,color:#fff
```

<Note>
  This is the managed CLI experience. It does **not** replace `pip install praisonai` — that still works exactly as before for library and embedded use. `praisonaiagents` is untouched.
</Note>

## Quick Start

<Steps>
  <Step title="Install with one line">
    No Python knowledge needed. The installer provisions an isolated environment and puts `praisonai` on your PATH.

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
    ```

    Then start:

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai setup
    ```
  </Step>

  <Step title="Check for a newer release">
    `--check` reports whether an update exists without changing anything.

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai upgrade --check
    ```
  </Step>

  <Step title="Upgrade in place">
    Run without flags to update via the detected tool manager (`uv tool` / `pipx`).

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai upgrade
    ```
  </Step>

  <Step title="Uninstall cleanly">
    Remove the managed environment and the global `praisonai` shim.

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai uninstall
    ```
  </Step>
</Steps>

***

## The One-Liner

One command detects your platform and installs PraisonAI into an isolated, managed environment.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
```

The installer:

* Detects your platform, architecture, and shell
* Provisions an isolated environment via `uv tool install` (bootstrapping `uv` when absent) or `pipx`
* Is idempotent and safe to re-run
* Wires PATH for bash, zsh, and fish
* Prints a first-run hint (`praisonai setup`)

### Environment Overrides

| Env var                        | Purpose                           |
| ------------------------------ | --------------------------------- |
| `PRAISONAI_VERSION=x.y.z`      | Pin to a specific version         |
| `PRAISONAI_INSTALLER=uv\|pipx` | Force a specific tool manager     |
| `PRAISONAI_NONINTERACTIVE=1`   | CI/headless installs — no prompts |

<CodeGroup>
  ```bash Pin a version theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  PRAISONAI_VERSION=4.6.0 curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
  ```

  ```bash Force pipx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  PRAISONAI_INSTALLER=pipx curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
  ```

  ```bash CI / headless theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  PRAISONAI_NONINTERACTIVE=1 curl -fsSL https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/install.sh | sh
  ```
</CodeGroup>

***

## Commands

<Tabs>
  <Tab title="upgrade">
    Updates the managed install in place, or reports availability with `--check`.

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    # Upgrade to the latest release
    praisonai upgrade

    # Report-only: never mutates anything
    praisonai upgrade --check

    # Machine-readable output for scripts
    praisonai upgrade --check --json
    ```

    `--check` JSON reports the current and latest versions plus whether an update is available:

    ```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    { "current": "2.4.0", "latest": "2.5.0", "update_available": true }
    ```

    An actual upgrade reports the manager and version transition:

    ```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    { "manager": "uv", "previous": "2.4.0", "current": "2.5.0" }
    ```

    | Flag      | Description                                             |
    | --------- | ------------------------------------------------------- |
    | `--check` | Report whether a newer version exists without upgrading |
  </Tab>

  <Tab title="uninstall">
    Removes the managed environment and shim. Use `--yes` to skip the prompt.

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    # Interactive: confirms before removing
    praisonai uninstall

    # Non-interactive (CI): skip the confirmation prompt
    praisonai uninstall --yes

    # Machine-readable output
    praisonai uninstall --yes --json
    ```

    JSON output records the manager and the removed version:

    ```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    { "manager": "uv", "removed": "2.5.0" }
    ```

    | Flag          | Description                                       |
    | ------------- | ------------------------------------------------- |
    | `--yes`, `-y` | Skip the confirmation prompt (non-interactive/CI) |
  </Tab>
</Tabs>

<Note>
  Both commands are grouped under **Get started** in `praisonai --help`. When installed via `pip` instead of the managed one-liner, `praisonai upgrade` points you to `pip install --upgrade praisonai`.
</Note>

***

## How Your Install Is Detected

Detection mirrors the installer: isolated tool managers are preferred, with `pip` as the fallback for library installs.

| Manager          | Upgrade                           | Uninstall                     |
| ---------------- | --------------------------------- | ----------------------------- |
| `uv tool`        | `uv tool upgrade praisonai`       | `uv tool uninstall praisonai` |
| `pipx`           | `pipx upgrade praisonai`          | `pipx uninstall praisonai`    |
| `pip` (fallback) | `pip install --upgrade praisonai` | `pip uninstall -y praisonai`  |

***

## CI Usage

Combine `--yes` and `--json` for non-interactive automation.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Fail the job if an update is pending
praisonai upgrade --check --json

# Tear down the managed install without prompts
praisonai uninstall --yes --json
```

***

## Update-Available Hint

PraisonAI hints when a newer version is out — without ever slowing down start-up.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant CLI as praisonai
    participant Cache as ~/.praison/state
    participant PyPI

    User->>CLI: praisonai run
    CLI->>Cache: read cached hint (no network)
    Cache-->>CLI: newer version? show hint
    CLI-->>User: run + optional hint
    CLI->>PyPI: refresh cache in background
    PyPI-->>Cache: latest version stored for next run
```

The hint:

* Is **non-blocking** on start (text mode only)
* Is backed by a time-boxed cache at `~/.praison/state/update_check.json` (24-hour freshness)
* Never performs network I/O at start-up, never blocks, and never raises
* Refreshes the cache in a detached background process for the *next* run

### Opt Out

Set one environment variable to disable the hint entirely:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export PRAISONAI_NO_UPDATE_CHECK=1
```

| Env var                       | Effect                                        |
| ----------------------------- | --------------------------------------------- |
| `PRAISONAI_NO_UPDATE_CHECK=1` | Disables the background update check and hint |

***

## Which Install Do I Choose?

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph TB
    Q{How do I want to install?}:::config
    Q -->|Managed, single-command| ONE[curl install.sh]:::success
    Q -->|Control the venv myself| PIP[pip install praisonai]:::tool

    ONE --> U[praisonai upgrade / uninstall]:::process
    PIP --> P[pip install --upgrade praisonai]:::process

    classDef config fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef success fill:#10B981,stroke:#7C90A0,color:#fff
```

This feature lives entirely in the CLI (`praisonai-code/cli`) plus `install.sh` at the repo root. Choose the one-liner for a managed, single-command experience; choose pip when you want to control the virtual environment yourself.

***

## Best Practices

<AccordionGroup>
  <Accordion title="Use the one-liner for a managed experience">
    The `curl … | sh` installer keeps PraisonAI in an isolated environment, so your global Python is untouched and `praisonai upgrade` / `praisonai uninstall` work cleanly.
  </Accordion>

  <Accordion title="Pin versions in CI">
    Set `PRAISONAI_VERSION=x.y.z` and `PRAISONAI_NONINTERACTIVE=1` for reproducible, prompt-free installs in pipelines.
  </Accordion>

  <Accordion title="Script upgrade checks with --check">
    Run `praisonai --json upgrade --check` in automation to detect newer releases without mutating the install.
  </Accordion>

  <Accordion title="Silence the hint in shared environments">
    Set `PRAISONAI_NO_UPDATE_CHECK=1` to disable the update hint on machines where outbound network checks are unwanted.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card title="One-line Installer" icon="download" href="/docs/install/installer">
    Install PraisonAI with a single command via uv or pipx.
  </Card>

  <Card title="Isolation Backends" icon="box" href="/docs/install/isolation-backends">
    How the CLI is isolated from your project's Python environment.
  </Card>

  <Card title="Installation" icon="gear" href="/docs/installation">
    All install options, including pip and npm.
  </Card>
</CardGroup>
