gandalf.toml is the team manifest that Gandalf reads when you run gandalf init, gandalf check, and gandalf apply. It declares the MCP servers, skills, hooks, and environment templates your team wants present in local agent setups. This page describes every supported field and shows a complete annotated example.
File structure overview
A manifest is a TOML file with a top-level metadata section, plus optional sections for MCP servers, skills, hooks, and environment templates. Not all sections are required: include only the ones your team manages centrally.
Top-level fields
MCP servers
Declare MCP (Model Context Protocol) servers under [mcp_servers.<name>]. Each server must define either a command with optional args, or a url for HTTP-based servers.
Any field that accepts ${ENV_VAR} will be expanded at apply time, not when the manifest is parsed. This lets you commit shared manifests without embedding secrets.
Skills
Declare skills in a [[skills]] array-of-tables. Each entry names a skill and its source.
Hooks
Declare agent hooks under [hooks.<name>]. Each hook binds an event to a command.
Environment templates
Use [env_template] to document expected environment variables. Gandalf does not write these into shell profiles; it uses them for drift checks and reports.
Each key is the environment variable name, and each value is an example default. Gandalf compares these against the current environment during check and highlights missing variables.
Full annotated example
Check and apply behavior
gandalf check compares your manifest against the current local agent setup and reports drift. When run with --ci, it exits with code 1 if any drift is found. This makes it suitable for CI pipelines that enforce team standards.
gandalf apply runs Smart Merge (non-destructive) and creates a pre-apply safety snapshot before changing anything. If the manifest targets an unsupported agent directory, apply skips that agent and logs a warning.
For command-line flags and workflow details, see /cli/init, /cli/check, and /cli/apply.
gandalf.toml is the team manifest that Gandalf reads when you run gandalf init, gandalf check, and gandalf apply. It declares the MCP servers, skills, hooks, and environment templates your team wants present in local agent setups. This page describes every supported field and shows a complete annotated example.
File structure overview
A manifest is a TOML file with a top-level metadata section, plus optional sections for MCP servers, skills, hooks, and environment templates. Not all sections are required: include only the ones your team manages centrally.
Top-level fields
MCP servers
Declare MCP (Model Context Protocol) servers under [mcp_servers.<name>]. Each server must define either a command with optional args, or a url for HTTP-based servers.
Any field that accepts ${ENV_VAR} will be expanded at apply time, not when the manifest is parsed. This lets you commit shared manifests without embedding secrets.
Skills
Declare skills in a [[skills]] array-of-tables. Each entry names a skill and its source.
Hooks
Declare agent hooks under [hooks.<name>]. Each hook binds an event to a command.
Environment templates
Use [env_template] to document expected environment variables. Gandalf does not write these into shell profiles; it uses them for drift checks and reports.
Each key is the environment variable name, and each value is an example default. Gandalf compares these against the current environment during check and highlights missing variables.
Full annotated example
Check and apply behavior
gandalf check compares your manifest against the current local agent setup and reports drift. When run with --ci, it exits with code 1 if any drift is found. This makes it suitable for CI pipelines that enforce team standards.
gandalf apply runs Smart Merge (non-destructive) and creates a pre-apply safety snapshot before changing anything. If the manifest targets an unsupported agent directory, apply skips that agent and logs a warning.
For command-line flags and workflow details, see /cli/init, /cli/check, and /cli/apply.