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.
Prerequisites
Section titled “Prerequisites”- A GitHub repository with pull requests
- An architecture model describing your system (see Model Formats)
- An API key for Gemini, OpenAI, or Anthropic
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).
2. Create the workflow file
Section titled “2. Create the workflow file”Add .github/workflows/erode.yml to your repository:
name: Architecture Drift Checkon: [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.
3. Open a pull request
Section titled “3. Open a pull request”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.
What’s next
Section titled “What’s next”- GitHub Actions reference — all action inputs, outputs, and advanced examples
- CLI usage — run erode locally against any PR
- Configuration — environment variables for tuning the analysis engine