Upgrade cordon to the latest version using the detected package manager.Documentation Index
Fetch the complete documentation index at: https://docs.codezero.io/llms.txt
Use this file to discover all available pages before exploring further.
Usage
Behavior
- Checks for the latest version via the update API (always performs a network call, even if
CORDON_NO_UPDATE_CHECKis set). - If already on the latest version, prints a message and exits.
- Detects the install method from the executable path:
- Homebrew — binary under
/opt/homebrew/,/usr/local/Cellar/, or/home/linuxbrew/.linuxbrew/ - npm — binary under a
node_modulesdirectory or npm’s global prefix - Unknown — prints a link to the GitHub releases page and exits with an error
- Homebrew — binary under
- Runs the appropriate upgrade command (
brew upgrade cordonornpm install -g @codezero-io/cordon@latest). - Verifies the upgraded binary reports the expected version.
Interactive prompt
You don’t need to runcordon upgrade explicitly. When a newer version is available and the session is interactive (stdin and stderr are terminals), most commands will prompt before running:
upgrade, help, env, and status --quiet.
In non-interactive sessions (piped input, CI, scripts), a one-line notice is printed to stderr with no prompt.