Skip to main content
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

  1. Discovers project and (unless --project-only) user-home agent configs for Cursor, Claude Code, and Codex.
  2. Reconciles sources with project-over-global precedence.
  3. Redacts secrets into [env_template].
  4. Mirrors team skills into .gandalf/skills/ with symlink-safe path confinement and atomic rollback.
  5. Writes gandalf.toml unless --dry-run is 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.