Skip to main content
gandalf apply synchronizes the declarative team manifest to your local agent setup. It runs Smart Merge (non-destructive) and creates a pre-apply safety snapshot before writing so you can roll back with gandalf restore.

Synopsis

Flags

Examples

Behavior

  1. Loads and validates gandalf.toml. Missing required env vars are warned on stderr.
  2. Scans local agent setup and generates a sync plan.
  3. Prints “Review Changes before Apply” with numbered items per agent.
  4. If --dry-run, stops here.
  5. Otherwise, prompts for confirmation unless --yes is passed.
  6. Creates a pre-apply safety snapshot.
  7. Applies changes with Smart Merge: new MCP servers, skills, and hooks are added or updated; existing personal settings are preserved.
On success, Gandalf prints the safety snapshot name and the exact rollback command:
Smart Merge never deletes or modifies unrelated personal settings. Only entries declared in the manifest are added or updated.