Overview
vg update checks for new CLI versions and optionally installs updates automatically.
Usage
vg update [options]
Options
| Flag | Description |
|---|---|
--check | Only check for updates, don't install |
--pm <manager> | Force package manager: npm, pnpm, yarn, bun |
--global | Update the global installation |
-y, --yes | Skip confirmation prompts (e.g. installing at a workspace root) |
-w, --workspace-root | Allow updating a pnpm workspace root (implies --yes for that prompt) |
Examples
Check for Updates
vg update --check
Output (update available):
ℹ️ Update available: 1.0.0 → 1.1.0
→ Run 'vg update' to install
Output (up to date):
✓ You're running the latest version (1.1.0)
Install Update
vg update
Output:
↓ Downloading @vibgrate/cli@latest@1.1.0...
✓ Updated to version 1.1.0
Use Specific Package Manager
# Force pnpm
vg update --pm pnpm
# Force yarn
vg update --pm yarn
# Force bun
vg update --pm bun
Package Manager Detection
Vibgrate auto-detects your package manager in this order:
| Priority | Detection Method |
|---|---|
| 1 | --pm flag (explicit) |
| 2 | pnpm-lock.yaml present |
| 3 | yarn.lock present |
| 4 | bun.lockb present |
| 5 | Default to npm |
Monorepo / workspace roots
When you run vg update at the root of a pnpm workspace (a directory with a
pnpm-workspace.yaml, or a package.json that declares workspaces), a plain
pnpm add is refused by pnpm — installing there needs the -w flag and writes to
the root package.json. Vibgrate detects this up front instead of failing with
ERR_PNPM_ADDING_TO_ROOT:
- In an interactive terminal it asks before running the workspace-root install.
- Pass
--yes(or--workspace-root) to go ahead without the prompt — handy in CI or scripts. - If you decline, it prints the exact
pnpm add -w …command so you can run it yourself.
# Detected a pnpm workspace root — confirm, or pass --yes to proceed
vg update --yes
Version Information
# Check current version
vg --version
# Or
vg -v
Changelog
View the full changelog at github.com/vibgrate/cli/releases.
Related
- Getting Started — Installation instructions
- CLI Reference — All commands