cub upgrade¶
Upgrade cub to a newer version or reinstall from local source for development.
Synopsis¶
Description¶
The cub upgrade command updates your cub installation to a newer version. It automatically detects how cub was installed (pipx, pip, or editable mode) and uses the appropriate upgrade method.
The command supports several workflows:
- Upgrade to latest: Default behavior, upgrades to the newest release
- Install specific version: Pin to a particular version with
--version - Local development: Install from a local repository with
--local - Editable mode: Install for development with live code changes using
--editable
Options¶
| Option | Short | Description |
|---|---|---|
--local | -l | Install from current directory (must be a cub repository) |
--check | -c | Check for updates without installing |
--force | -f | Force reinstall even if same version |
--version VERSION | -v | Install specific version (e.g., 0.23.3) |
--editable | -e | Install in editable/development mode (implies --local) |
--help | -h | Show help message and exit |
Installation Methods¶
The upgrade command detects how cub was originally installed:
| Method | Detection | Upgrade Command |
|---|---|---|
| pipx | pipx list contains cub | pipx upgrade cub |
| pip | cub importable from site-packages | pip install --upgrade cub |
| editable | cub not in site-packages | Prompts to use --local |
pipx Installation¶
If you installed cub with pipx (recommended), upgrades use:
pip Installation¶
For pip installations:
Editable Installation¶
Editable installs are typically development setups. For these:
- The command prompts you to use
--localorgit pull - Changes to the source code take effect immediately
- No reinstall needed for most changes
Version Checking¶
Check your current version:
Check available versions:
Examples¶
Upgrade to latest release¶
Output:
cub v0.26.2
Installed via: pipx
Upgrading to latest version...
Upgrade complete!
Updated: v0.26.2 -> v0.26.3
Check for updates¶
Shows whether updates are available without installing.
Install specific version¶
Useful for testing or pinning to a known-good version.
Force reinstall¶
Reinstalls even if already at the latest version. Useful for repairing broken installations.
Install from local repository¶
For developers working on cub:
# Clone the repo
git clone https://github.com/lavallee/cub.git
cd cub
# Install from local source
cub upgrade --local
Install in editable mode¶
For active cub development where you want changes to take effect immediately:
This runs pip install -e . which links the package to your source directory.
Force local reinstall¶
Reinstalls from local even if versions match.
Troubleshooting¶
"Current directory is not a cub repository"¶
When using --local, you must run from a directory containing cub source code:
Editable install detected¶
If you see:
Your cub is installed in development mode. Either:
- Pull latest changes:
git pull - Reinstall with:
cub upgrade --local
Version mismatch after upgrade¶
If the version doesn't change after upgrade:
- Check if the correct pip/pipx is in your PATH
- Try
cub upgrade --force - Verify with
which cubandcub version
Permission denied¶
If you get permission errors:
# With pipx (recommended)
pipx upgrade cub
# With pip using user install
pip install --user --upgrade cub
Related Commands¶
cub --version- Show current versioncub doctor- Diagnose installation issuescub uninstall- Remove cub from your system
See Also¶
- Installation Guide - Initial installation
- Upgrading Guide - Detailed upgrade information
- Contributing - Development setup