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
- Loads and validates
gandalf.toml. Missing required env vars are warned on stderr. - Scans local agent setup and generates a sync plan.
- Prints “Review Changes before Apply” with numbered items per agent.
- If
--dry-run, stops here. - Otherwise, prompts for confirmation unless
--yesis passed. - Creates a pre-apply safety snapshot.
- Applies changes with Smart Merge: new MCP servers, skills, and hooks are added or updated; existing personal settings are preserved.
Smart Merge never deletes or modifies unrelated personal settings. Only entries declared in the manifest are added or updated.