Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 18:30 UTC
feat(cli): add composio version --check for machine-readable update status (#3944)
Part of [PRDE-1143](https://linear.app/composio/issue/PRDE-1143/prompt-users-to-upgrade-composio-cli-when-new-versions-are-available). ## What `composio version --check` prints one JSON object to stdout and exits 0: ```json {"current":"0.2.31","latestStable":"0.2.32","updateAvailable":true,"lastChecked":"2026-07-24T19:15:15.413Z"} ``` The startup upgrade banner is TTY-gated, so scripts and agent-driven (piped) CLI usage never learn a newer stable exists. `--check` gives them an explicit query: if `updateAvailable`, run `composio upgrade`. It reuses the update notice's self-throttled release cache (`~/.composio/update-check.json`, unchanged shape — PRDE-1144 reads it): fresh <24h means no network call; stale means a synchronous GitHub fetch with a 10s timeout whose failures degrade to the cached/absent state instead of erroring. Purely additive — the existing banner behavior is untouched. ## Verification Before writing anything, the existing notice pipeline was verified empirically with a real stale install (stable `0.2.31` binary, isolated `$HOME`, real pty): background fetch completes even on fast commands, the banner fires on the next TTY run, piped output stays silent, and symlinked installs resolve `release-tag.txt` correctly. - 4 unit tests for `getUpdateStatus`; full CLI suite 955 passed, typecheck clean. - Exercised live from source: pure JSON on stdout, empty stderr, exit 0. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
No changes.