Skip to content

Commands

registry-sync provides four commands that form a progressive workflow: audit to observe, plan to decide, diff to compare, and apply to act.

Scans all repositories in a GitHub org, reads each repo’s package.json and checks for Dockerfile, then queries the npmjs and GHCR registries to build a full presence matrix.

Terminal window
registry-sync audit [--org <org>] [--format table|json|markdown]

The audit output uses these symbols to show drift status per registry:

SymbolMeaningDescription
CurrentPublished version matches the repo version
BehindRepo version is ahead of the published version
MissingNot yet published to this registry
AheadPublished version is ahead of repo (rollback or hotfix)
OrphanPublished package with no matching repo
  • table (default) — human-readable terminal output
  • json — machine-readable for piping to other tools
  • markdown — ready to paste into issues or docs

Runs an audit internally, then generates a risk-rated action plan describing what needs to change.

Terminal window
registry-sync plan [--org <org>] [--target npmjs|ghcr|all]
ActionDescriptionRisk
publishFirst-time publish to a registryLow
updateVersion bump needed — repo is ahead of publishedMedium
scaffold-workflowAdd a CI publish workflow via PRLow
pruneOrphaned package needs cleanupHigh

Actions are sorted by risk level so you can review the most impactful changes first.

Compares two previously-saved audit snapshots to surface what changed between runs. No new API calls are made — the diff is pure computation over the two JSON files.

Terminal window
registry-sync diff --before audit-old.json --from audit-new.json [--format table|json|markdown]
ChangeMeaning
new_driftRepo was current, now behind/missing/ahead
resolvedDrift was present, now current
worsenedDrift deepened (e.g. behind → missing)
new_repoRepo appeared in the newer snapshot
removed_repoRepo disappeared from the newer snapshot

The diff also tracks orphan changes (new and resolved orphaned packages).

Terminal window
# Save a baseline audit
registry-sync audit --json -o baseline.json
# ... time passes, repos change ...
# Save a new audit
registry-sync audit --json -o current.json
# See what changed
registry-sync diff --before baseline.json --from current.json

Executes the plan. All actions in v1 are non-destructive:

  • Creates GitHub issues for publish, update, and prune actions
  • Opens GitHub PRs with CI workflow files for scaffold actions
Terminal window
registry-sync apply --confirm [--target npmjs|ghcr|all]

Without --confirm, apply shows a dry-run — identical output to plan. Nothing is created or modified until you pass --confirm explicitly.

Terminal window
# Preview what would happen (no changes made)
registry-sync apply
# Execute for real
registry-sync apply --confirm

Use --target to limit actions to a specific registry:

Terminal window
# Only npm-related actions
registry-sync apply --confirm --target npmjs
# Only GHCR-related actions
registry-sync apply --confirm --target ghcr