Command-line interface

syncweaver --help
Usage: syncweaver [OPTIONS] COMMAND [ARGS]...

  syncweaver: synchronize code and weave patches seamlessly.

Options:
  -v, --version   Show the version and exit.
  -c, --citation  Print the citation in BibTeX format and exit.
  -h, --help      Show this message and exit.

Commands:
  add        Add an external repository to the current host repository.
  patch      Create, annotate, and list source patch artifacts.
  remove     Remove a tracked external repository from the current host...
  templates  List and add workflow templates to a repo.
  update     Update a tracked external repository in the current host...
  validate   Validate a lockfile against the syncweaver lockfile JSON...

add

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-url TEXT       External repository URL or local path to clone.
                        [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.

patch

Usage: syncweaver patch [OPTIONS] COMMAND [ARGS]...

  Create, annotate, and list source patch artifacts.

Options:
  -h, --help  Show this message and exit.

Commands:
  annotate-rejected  Record rejected patch metadata in lockfile extension...
  create             Create or update a canonical patch file for a...
  list               List tracked patch file records for a source path.

patch annotate-rejected

Usage: syncweaver patch annotate-rejected [OPTIONS]

  Record rejected patch metadata in lockfile extension fields.

Options:
  --patch PATH     Relative patch path, e.g.
                   code/package1/.syncweaver/package1.diff.  [required]
  --pr-url TEXT    URL of the upstream pull request associated with this
                   patch.  [required]
  --reason TEXT    Free-text reason for rejection.  [required]
  --lockfile PATH  Path to .syncweaver-lock.json in the host repository.
                   [default: .syncweaver-lock.json]
  -h, --help       Show this message and exit.

patch create

Usage: syncweaver patch create [OPTIONS]

  Create or update a canonical patch file for a tracked source path.

Options:
  --path PATH       Tracked source path in the host repository, e.g.
                    code/package1.  [required]
  --repo-url TEXT   Repository URL as it appears in .syncweaver-lock.json.
                    [required]
  --lockfile PATH   Path to .syncweaver-lock.json in the host repository.
                    [default: .syncweaver-lock.json]
  --patch-dir PATH  Optional directory for the generated patch file.
  -h, --help        Show this message and exit.

patch list

Usage: syncweaver patch list [OPTIONS]

  List tracked patch file records for a source path.

Options:
  --path PATH      Tracked source path in the host repository, e.g.
                   code/package1.  [required]
  --lockfile PATH  Path to .syncweaver-lock.json in the host repository.
                   [default: .syncweaver-lock.json]
  -h, --help       Show this message and exit.

remove

Usage: syncweaver remove [OPTIONS]

  Remove a tracked external repository from the current host repository.

Options:
  --path PATH      Tracked destination path in the host repository, e.g.
                   code/package1.  [required]
  --lockfile PATH  Path to .syncweaver-lock.json in the host repository.
                   [default: .syncweaver-lock.json]
  -h, --help       Show this message and exit.

templates

Usage: syncweaver templates [OPTIONS] COMMAND [ARGS]...

  List and add workflow templates to a repo.

Options:
  -h, --help  Show this message and exit.

Commands:
  add   Copy TEMPLATE_NAME into the output directory.
  list  List available workflow templates.

templates add

Usage: syncweaver templates add [OPTIONS] TEMPLATE_NAME

  Copy TEMPLATE_NAME into the output directory.

  TEMPLATE_NAME may omit the .yml extension.

Options:
  -o, --output PATH  Directory to write the template file.  [default:
                     .github/workflows]
  --overwrite        Overwrite an existing file.
  -h, --help         Show this message and exit.

templates list

Usage: syncweaver templates list [OPTIONS]

  List available workflow templates.

Options:
  -h, --help  Show this message and exit.

update

Usage: syncweaver update [OPTIONS]

  Update a tracked external repository in the current host repository.

Options:
  --path PATH           Tracked destination path in the host repository, e.g.
                        code/package1.  [required]
  --ref TEXT            Git ref to vendor (branch, tag, or commit). Defaults
                        to lockfile ref.
  --remote-subdir TEXT  Optional repository subdirectory to vendor, e.g.
                        src/package1. Defaults to lockfile remote_subdir when
                        present.
  --lockfile PATH       Path to .syncweaver-lock.json in the host repository.
                        [default: .syncweaver-lock.json]
  -h, --help            Show this message and exit.

validate

Usage: syncweaver validate [OPTIONS]

  Validate a lockfile against the syncweaver lockfile JSON schema.

Options:
  --lockfile PATH  Path to .syncweaver-lock.json in the host repository.
                   [default: .syncweaver-lock.json]
  --schema PATH    Optional path to a JSON schema file. Defaults to bundled
                   schema.
  -h, --help       Show this message and exit.