Skip to content

Getting Started

erode detects architecture drift by comparing pull requests against your architecture model. When a PR introduces an undeclared dependency, erode flags it as a violation and comments directly on the pull request.

1. Add your AI provider API key as a repository secret

Section titled “1. Add your AI provider API key as a repository secret”

Go to your repository’s Settings > Secrets and variables > Actions and add the API key for your chosen AI provider (e.g. GEMINI_API_KEY for the default Gemini provider).

Add .github/workflows/erode.yml to your repository:

name: Architecture Drift Check
on: [pull_request]
jobs:
erode:
runs-on: ubuntu-latest
steps:
- uses: erode-app/core@main
with:
model-repo: your-org/architecture
github-token: ${{ secrets.GITHUB_TOKEN }}
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}

Replace your-org/architecture with the repository that contains your architecture model. The action clones the model repo automatically — no actions/checkout step is needed.

erode runs on every PR and posts a comment listing any undeclared dependencies, their severity, and how to fix them. If no violations are found, it confirms the PR aligns with the declared architecture.