syncweaver add

Add an external repository (or subdirectory) to the current host repository. The command vendors the source content into the specified --path, records the reference in .syncweaver-lock.json, and snapshots the file state so future update and patch operations can track drift.

Usage

Usage: syncweaver add [OPTIONS]

  Add an external repository to the current host repository.

Options:
  --path PATH              Destination path in the host repository, e.g.
                           code/package1.  [required]
  --repo, --repo-url TEXT  External repository URL or OWNER/REPO shorthand.
                           [required]
  --ref TEXT               Git ref to vendor (branch, tag, or commit).
                           Defaults to remote HEAD.
  --remote-subdir TEXT     Optional repository subdirectory to vendor, e.g.
                           src/package1. When omitted, vendors repository
                           root.
  --lockfile PATH          Path to .syncweaver-lock.json in the host
                           repository.  [default: .syncweaver-lock.json]
  --overwrite              Overwrite destination path if it already exists.
  -h, --help               Show this message and exit.

Examples

# Add a full repository at a specific tag
syncweaver add --path code/mypackage --repo OWNER/mypackage --ref v1.2.3

# Add only a subdirectory from the repository
syncweaver add \
  --path code/mypackage \
  --repo OWNER/mypackage \
  --ref main \
  --remote-subdir src/mypackage

# Use a custom lockfile location
syncweaver add \
  --path code/mypackage \
  --repo OWNER/mypackage \
  --lockfile config/syncweaver-lock.json