Skip to main content
Commands

vg update

Check for and install CLI updates.

Overview

vg update checks for new CLI versions and optionally installs updates automatically.


Usage

vg update [options]

Options

FlagDescription
--checkOnly check for updates, don't install
--pm <manager>Force package manager: npm, pnpm, yarn, bun
--globalUpdate the global installation
-y, --yesSkip confirmation prompts (e.g. installing at a workspace root)
-w, --workspace-rootAllow 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:

PriorityDetection Method
1--pm flag (explicit)
2pnpm-lock.yaml present
3yarn.lock present
4bun.lockb present
5Default 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

No live demo for this command

vg update checks npm for a newer release and upgrades the CLI on your machine, so there is nothing meaningful to replay here.

Related Documentation