# Gandalf - [Gandalf: local control console for AI agent setup](https://docs.usegandalf.com/index.md): Gandalf lets you inspect, review, and roll back local AI agent setup for Codex and Claude Code with snapshots, diffs, and reviewed writes. - [Quickstart: capture a baseline and preview a restore](https://docs.usegandalf.com/quickstart.md): Install Gandalf, capture a content-backed baseline of your Codex or Claude Code setup, diff it, and preview a safe restore in under five minutes. - [Install Gandalf on macOS or Linux](https://docs.usegandalf.com/install.md): Install the Gandalf CLI via Homebrew, the install.sh script, or Go source builds. Prebuilt binaries are published for darwin and linux on every v-tag release. - [Trust contract: safety boundaries Gandalf promises](https://docs.usegandalf.com/trust-contract.md): Gandalf's trust contract: read-only discovery, no MCP or hook execution, no network by default, path-confined writes, symlink refusal, and explicit apply flags. - [Core concepts in Gandalf](https://docs.usegandalf.com/concepts/overview.md): Learn the core concepts behind Gandalf: snapshots, Review Changes, provider-backed actions, agent-native marketplace sources, evidence, and the trust contract. - [Snapshots: point-in-time agent setup captures](https://docs.usegandalf.com/concepts/snapshots.md): Snapshots persist your Codex or Claude Code user-global agent state. Content-backed snapshots power safe restore; metadata-only snapshots capture inventory. - [Review Changes: preview before every mutation](https://docs.usegandalf.com/concepts/review-changes.md): Review Changes is Gandalf's mandatory preview step. It lists writable items, unsupported evidence, risk, and rollback instructions before any apply. - [Provider-backed actions in Gandalf](https://docs.usegandalf.com/concepts/providers.md): Only setup action providers can make a Gandalf inventory row executable. Inventory visibility never implies mutation is available or safe. - [Agent-native marketplace and source browsing](https://docs.usegandalf.com/concepts/marketplace.md): Gandalf browses agent-native marketplace and source entries for Codex and Claude Code. It never owns or certifies catalogs; mutations require providers. - [Navigate the Gandalf terminal workspace](https://docs.usegandalf.com/guides/terminal-workspace.md): Use the Gandalf TUI setup console to inspect Hooks, Plugins, Marketplace, Skills, and MCP Servers. Preview changes, review drift, and navigate with keyboard shortcuts. - [Snapshot and restore Codex or Claude Code setup](https://docs.usegandalf.com/guides/snapshot-and-restore.md): Capture a content-backed baseline of your Codex or Claude Code user-global setup, diff it, and safely restore with dry-run, apply, and rollback flags. - [Export and import portable .gandalf bundles](https://docs.usegandalf.com/guides/bundles.md): Package your Gandalf snapshot into a portable .gandalf bundle, verify it, inspect it, and import on another machine with dry-run and quarantine safeguards. - [Share agent environments with gandalf.toml](https://docs.usegandalf.com/guides/team-manifest.md): Declare team-wide MCP servers, skills, and hooks in gandalf.toml. Detect drift with gandalf check and apply safely with a pre-apply snapshot. - [Gandalf agent support matrix and boundaries](https://docs.usegandalf.com/reference/support-matrix.md): Current Gandalf capabilities per agent, including discovery, marketplace browsing, provider-backed actions, and safety features for Codex and Claude Code. - [gandalf.toml team manifest reference](https://docs.usegandalf.com/reference/manifest.md): Full reference for the gandalf.toml manifest, including MCP servers, skills, hooks, and env templates, with annotated examples and drift checks. - [Gandalf environment variables reference](https://docs.usegandalf.com/reference/environment-variables.md): Reference for Gandalf's environment variables: store location, experimental mutation gating, update-check opt-in, and how they interact with CLI flags. - [Gandalf CLI reference overview](https://docs.usegandalf.com/cli/overview.md): Overview of all gandalf subcommands, common flags, and the TUI entry point. Use this page as your map to the complete local AI agent control console. - [gandalf scan: discover local agent configuration](https://docs.usegandalf.com/cli/scan.md): Use gandalf scan for read-only discovery of installed skills, hooks, MCP servers, and plugins for Codex and Claude Code. Safe to run anytime. - [gandalf snapshot: create, list, and show snapshots](https://docs.usegandalf.com/cli/snapshot.md): Create content-backed or metadata-only snapshots of your Codex or Claude Code setup, list saved snapshots, and inspect the manifest for any snapshot. - [gandalf diff: compare two snapshots](https://docs.usegandalf.com/cli/diff.md): Show semantic and raw-source changes between any two Gandalf snapshots, or between a saved snapshot and current live state, with text or JSON output. - [gandalf restore: preview and apply a snapshot](https://docs.usegandalf.com/cli/restore.md): Preview a restore plan from a Gandalf snapshot, then apply with explicit experimental flags. Optional rollback on failure and fail-fast execution. - [gandalf bundle: export, import, inspect, verify](https://docs.usegandalf.com/cli/bundle.md): Package snapshots into portable .gandalf bundles and move them between machines with verification, dry-run import, quarantine, and experimental apply. - [gandalf timeline: list and undo local history](https://docs.usegandalf.com/cli/timeline.md): List local Gandalf timeline entries, inspect a single entry as JSON, and build a dry-run undo plan. Timeline undo is always non-writing. - [gandalf tui: open the interactive setup console](https://docs.usegandalf.com/cli/tui.md): Launch the Bubble Tea terminal setup console for Gandalf. Same as running gandalf with no arguments; opens the Changes-first Home by default. - [gandalf init: create a team manifest scaffold](https://docs.usegandalf.com/cli/init.md): Create a starter gandalf.toml and .gandalf/skills/ in your repository, optionally scaffolded from your current local agent setup, to enable team sync. - [gandalf check: detect drift from the team manifest](https://docs.usegandalf.com/cli/check.md): Compare gandalf.toml against local Codex and Claude Code setup and report missing MCP servers, skills, or hooks. Add --ci to exit non-zero on drift. - [gandalf apply: sync the team manifest locally](https://docs.usegandalf.com/cli/apply.md): Apply gandalf.toml to local Codex and Claude Code setups with Smart Merge. A pre-apply safety snapshot is created automatically for easy rollback. - [gandalf doctor: check readiness for setup portability](https://docs.usegandalf.com/cli/doctor.md): Run a readiness report on the target machine before importing a bundle or applying a manifest. Reports missing tools and env keys without installing anything. - [gandalf report: render a markdown state report](https://docs.usegandalf.com/cli/report.md): Render a markdown report of trust posture, evidence, findings, and blind spots for a snapshot or for current live state. Optional file output and JSON.