Update Command
Updates the CLI to the latest version from npm.
Usage
writechoice update
How It Works
- Checks npm for the latest published version
- Compares it with your currently installed version
- If a newer version is available, installs it globally
- Displays the new version number
Examples
$ writechoice update
Checking for updates...
Update available: 0.0.7 → 0.0.8
Updating @writechoice/mint-cli...
✓ Successfully updated to version 0.0.8
Already up to date:
$ writechoice update
Checking for updates...
✓ You're already on the latest version (0.0.8)
Automatic Update Notifications
When you run any command, the CLI automatically checks for updates in the background and shows a notice if a newer version is available:
┌─────────────────────────────────────────────────┐
│ Update available: 0.0.7 → 0.0.8 │
│ Run: writechoice update │
└─────────────────────────────────────────────────┘
Manual Update (Alternative)
npm install -g @writechoice/mint-cli@latest
Troubleshooting
Permission errors on Linux/macOS:
sudo npm install -g @writechoice/mint-cli@latest
Or use nvm to avoid needing sudo.
Check available versions:
npm view @writechoice/mint-cli versions