Update Hint

Non-blocking notice that a newer PraisonAI is available, refreshed in a detached background process

The update hint prints a one-line “a newer version is available” notice at start-up, refreshing its cache in a fully detached background process so it never blocks or slows the CLI.

Diagram

Newer available

praisonai run …

Read cache

stderr hint

Spawn detached child

Refresh cache for next start

Command runs normally

Quick Start

  1. See the hint

    Run any command. If a newer release is cached, PraisonAI prints this to stderr:

    A newer PraisonAI is available: 4.6.145 -> 4.6.146. Run: praisonai upgrade
  2. Opt out
    bash
    export PRAISONAI_NO_UPDATE_CHECK=1

    Suppresses both the hint and the background refresh.


How It Works

Every text-mode, non-quiet start reads a cached version file, prints a hint if a newer release is known, then warms the cache for the next start in a detached child.

Diagram
detached childstate/update_check.jsonpraisonaiUserdetached childstate/update_check.jsonpraisonaiUserpraisonai run “…”read (no network)latest = 4.6.146stderr hint (if newer)spawn (start_new_session)refresh from PyPIcommand runs normally
AspectBehaviour
Cache location<user_config_dir>/state/update_check.json
Cache TTL24 hours
Where it printsstderr, text mode only
Parent-process network I/ONever — the parent only reads the cache
Refresh processFully detached child (start_new_session=True on POSIX; `CREATE_NO_WINDOWDETACHED_PROCESS` on Windows)

Options

Control the hint with one environment variable.

VariableValuesDescription
PRAISONAI_NO_UPDATE_CHECK1, true, yes, on (case-insensitive)Suppress both the hint and the background cache refresh.

The hint is also suppressed automatically in --output json mode — only text mode emits it.


Common Patterns

Disable the hint for a single command.

bash
PRAISONAI_NO_UPDATE_CHECK=1 praisonai run "2+2"

Disable it permanently in CI by exporting the variable in your environment.

bash
export PRAISONAI_NO_UPDATE_CHECK=1

Best Practices

Leave it on for interactive use

The hint costs nothing at start-up (cache-only read) and reminds you when a fix or feature ships. Keep it enabled on developer machines.

Opt out in CI and headless jobs

Set PRAISONAI_NO_UPDATE_CHECK=1 in pipelines to avoid stderr noise and the background refresh spawn.

Warm the cache with –check

praisonai upgrade --check refreshes the same cache, so a one-off check makes the next start’s hint accurate without waiting for the 24h TTL.


Related