dotweave push

Mirror tracked local files into the sync directory, encrypting secret targets on the way in.

Synopsis

dotweave push [--dry-run] [--profile <profile>] [--with-git] [--message <message>]

Read the current state of the tracked local paths and rewrite the artifacts under profiles/<profile>/ to match.

Flags

FlagType and defaultPurpose
--dry-runboolean, manifest or falseBuild and print the plan without writing anything. Use --no-dry-run to override a true manifest default.
--profilestring, manifest or noneUse one registered profile instead of the active profile from settings.jsonc.
--with-gitboolean, manifest or falseCommit the updated artifacts and push them to the git remote. Use --no-with-git to override a true manifest default.
--message, -mnon-empty string, manifest or generatedSet the commit message used by --with-git. Surrounding whitespace is trimmed.

Behavior

Repository-format migration runs first, before any planning, so the plan reflects the migrated state. That step writes to the repository, so --dry-run skips it.

push compares content before it writes, so an unchanged file produces no write at all. For a secret entry the comparison decrypts the stored ciphertext and compares plaintext, which means an unchanged secret is not re-encrypted and its git history stays free of meaningless churn.

The write pass runs in a fixed order: refresh the managed .gitignore block, delete stale replacement directory roots, delete stale artifact keys, then write the artifacts. push protects artifacts owned by another platform's overrides or another profile, so pushing from one machine does not delete what another machine stored.

dotweave push
· Pushing changes...
✔ Push complete
  plain: 2
  encrypted: 1
  symlinks: 0
  dirs: 1
  0 stale artifacts removed

A dry run reports the same counts. The result line and the stale-artifact line change wording to mark the run as a preview.

dotweave push --dry-run
· Pushing changes...
~ Push preview (dry run)
  plain: 2
  encrypted: 1
  symlinks: 0
  dirs: 1
  0 stale artifacts would be removed

With --with-git, push commits the updated sync directory and pushes it to the configured remote. The generated commit message is dotweave: sync configuration. --dry-run skips every git action. Command-line flags override the synchronized defaults in manifest.jsonc.

Errors

push fails when the sync directory is not a git work tree and when manifest.jsonc is missing, unreadable, or invalid. It also fails when a pending repository-format migration cannot complete, and when a stored artifact disagrees with its entry, for example a secret entry whose artifact is stored unencrypted. Read Error messages for each message and its fix.

Read dotweave status to see the same plan without writing anything, or How syncing works for the snapshot model both directions share.