Skip to content

Reapply

Leonard Ramminger edited this page Aug 22, 2026 · 2 revisions

Reapply & Diff

Safely synchronize existing projects with a new template version.

Prerequisites

  • Target directory was previously rendered with Tempify
  • .tempify-lock.json is in the target (or is managed)
  • Same template ID as in the lock file

Diff (display only)

tempify basic_cpp my-app --diff
tempify basic_cpp my-app --diff --json
  • No file changes
  • No hooks
  • Shows changes to managed files, origin metadata, update kind

Reapply (apply)

# Report only
tempify reapply basic_cpp my-app --report --json

# Apply
tempify reapply basic_cpp my-app --json

Alias:

tempify basic_cpp my-app --reapply

What reapply does

  • Applies safe actions: create, update, delete on managed files
  • Keeps local edits with action keep
  • Blocks on conflict or review
  • Does not run hooks (first slice)

Version policy

Transition Typical
Patch / prerelease Allowed
Major Blocked → review
Pre-1.0 minor Blocked → review
Downgrade Blocked
Different template (ID mismatch) Blocked

JSON example (success)

{
  "status": "ok",
  "mode": "reapply",
  "template": { "id": "basic_cpp", "version": "0.1.0" },
  "origin": {
    "detected": true,
    "matches_requested_template": true,
    "template_id": "basic_cpp",
    "template_version": "0.1.0-rc.1"
  },
  "update": {
    "kind": "upgrade",
    "from_version": "0.1.0-rc.1",
    "to_version": "0.1.0",
    "policy": {
      "action": "allow",
      "reason": "forward_version_change"
    }
  }
}

JSON example (blocked)

{
  "status": "error",
  "code": "REAPPLY_BLOCKED",
  "blocked": {
    "origin_mismatch": {
      "origin_template": { "id": "layered_cpp_product" },
      "requested_template": { "id": "basic_cpp" }
    }
  }
}

Authors

Versioning for safe reapply: Versioning & Reapply

See also

Glossary · FAQ

Clone this wiki locally