Skip to main content

update

Update installed components with the interactive merge TUI. Hunk-by-hunk conflict resolution without git markers.

Usage


npx @gentleduck/cli update [components...]

npx @gentleduck/cli update [components...]

Updates installed components to the latest registry versions. If you have local modifications, the CLI launches an interactive merge TUI for hunk-by-hunk conflict resolution.


Options

FlagDescription
-a, --allUpdate all installed components
-y, --yesSkip confirmation prompts
-c, --cwd <cwd>Working directory
-w, --workspace <path>Target workspace

The merge TUI

For each changed file, hunks are presented one at a time:

KeyAction
1Keep your local version
2Take the registry version
3Keep both
h / lNavigate between files
j / kNavigate between hunks
N / PJump to next/previous unresolved hunk
EnterConfirm and write the merged result
EscAbort, leave files untouched

After resolving all hunks, you see a preview of the merged result before writing to disk.

No git merge markers. No manual conflict resolution. No diff tool required.


Examples

# Update a specific component
npx @gentleduck/cli update button
 
# Update all components
npx @gentleduck/cli update --all
 
# Update inside a workspace
npx @gentleduck/cli update --all --workspace packages/ui
# Update a specific component
npx @gentleduck/cli update button
 
# Update all components
npx @gentleduck/cli update --all
 
# Update inside a workspace
npx @gentleduck/cli update --all --workspace packages/ui

When the merge TUI does NOT open

  • No local changes — file matches registry, replaced silently
  • No registry changes — local file is already up to date

The TUI only triggers when both sides diverged.


Diff first, update second

To preview changes before running update, use diff:


npx @gentleduck/cli diff button   # see what would change
npx @gentleduck/cli update button # apply with the merge TUI

npx @gentleduck/cli diff button   # see what would change
npx @gentleduck/cli update button # apply with the merge TUI