update
Check for and install updates to the OpenTrace CLI (opentraceai). Use when: "update opentraceai", "update cli", "check for updates", "upgrade opentraceai", "new version"
Check for updates to the OpenTrace CLI (opentraceai) and optionally install them.
Arguments
$ARGUMENTS
Instructions
-
Get the installed version:
uvx opentraceai --version 2>/dev/null -
Get the latest version from PyPI:
curl -sS https://pypi.org/pypi/opentraceai/json | python3 -c "import sys,json; print(json.load(sys.stdin)['info']['version'])" -
Compare versions:
- If the installed version matches the latest, tell the user they're up to date.
- If a newer version is available, show both versions and ask the user if they'd like to upgrade.
-
Upgrade (if the user confirms, or if they passed
--yesoryesas an argument):uv tool upgrade opentraceaiIf
opentraceaiis not installed as a uv tool (i.e. the user relies onuvx), the cache will refresh automatically on nextuvxrun. In that case, clear the uvx cache to force a fresh install:uv cache clean opentraceai -
Verify: Run
uvx opentraceai --versionto confirm the new version is active.