gandalf export scans local AI agent configurations and writes a canonical gandalf.toml. It is the local-environment → manifest direction. Applying that manifest back onto local agent configs is gandalf apply.
gandalf import is a backward-compatible alias for gandalf export. Prefer export in new scripts and docs.
Synopsis
Flags
Examples
--json, --dry-run, and piped I/O stay headless. On a TTY, export opens a wizard to toggle servers/skills, preview a masked manifest, and confirm overwrite.
Behavior
- Discovers project and (unless
--project-only) user-home agent configs for Cursor, Claude Code, and Codex. - Reconciles sources with project-over-global precedence.
- Redacts secrets into
[env_template]. - Mirrors team skills into
.gandalf/skills/with symlink-safe path confinement and atomic rollback. - Writes
gandalf.tomlunless--dry-runis set. Existing manifests require--force.
Export is manifest only (local agent config →
gandalf.toml). Secrets, logins, and agent installs are out of scope. Other machines need gandalf apply (agents already installed; ${ENV} filled there). Use gandalf check to detect drift.