Skip to Content
Configuration

Configuration

The drift tool is configured using a .drift.yaml file in the root of your project.

Top-Level Fields

  • version (required): The version of the configuration file format. Currently, this should be 1.
  • provider (required): The backend provider to use for assessing drift. Currently supported providers are:
    • "gemini": Uses the Google Gemini API. Requires the GEMINI_API_KEY environment variable to be set.
    • "openai": Uses the OpenAI API. Requires the OPENAI_API_KEY environment variable to be set.
  • rules (required): A list of rules to check.

Rule Fields

  • name (required): A descriptive name for the rule.
  • code (required): A list of glob patterns for the code files.
  • docs (required): A list of glob patterns for the documentation files.

Example .drift.yaml

version: 1 provider: gemini rules: - name: "User API Documentation" code: - "src/api/user.go" docs: - "docs/api/users.md" - name: "Authentication Service" code: - "src/auth/**/*.go" docs: - "docs/auth.md"
Last updated on