Self-Hosted
The GitHub Action is the fastest way to get started, but you may want to run Erode yourself if you:
- Need full control over the runtime environment
- Use GitHub Enterprise Server, self-hosted GitLab, or Bitbucket Cloud
- Run a CI platform other than GitHub Actions or GitLab CI
Option 1: Fork the repo
Section titled “Option 1: Fork the repo”The simplest self-hosted path for GitHub users. Fork the repository and reference your fork as a GitHub Action. The same action.yml inputs and outputs work without changes.
- Fork
erode-app/erodeto your organization - Add repository secrets for your AI key and GitHub token
- Reference the fork in your workflow:
- uses: your-org/erode@main with: model-repo: your-org/architecture github-token: ${{ secrets.GITHUB_TOKEN }} gemini-api-key: ${{ secrets.GEMINI_API_KEY }}All action inputs and outputs work the same way.
Option 2: Docker image
Section titled “Option 2: Docker image”For any CI platform, use the published container image:
docker run --rm \ -e ERODE_GITHUB_TOKEN="$GITHUB_TOKEN" \ -e ERODE_ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \ ghcr.io/erode-app/erode:0 \ analyze /model --url "$PR_URL" --comment --fail-on-violationsMount a local model directory if the model is not in a remote repository:
docker run --rm \ -v ./architecture:/model \ -e ERODE_GITHUB_TOKEN="$GITHUB_TOKEN" \ -e ERODE_GEMINI_API_KEY="$GEMINI_API_KEY" \ ghcr.io/erode-app/erode:0 \ analyze /model --url "$PR_URL" --commentExample: generic CI job
Section titled “Example: generic CI job”analyze: image: ghcr.io/erode-app/erode:0 entrypoint: [''] script: - > node /app/packages/core/dist/ci-entry.js analyze /model --url "$PR_URL" --comment --fail-on-violations variables: ERODE_GITHUB_TOKEN: $MY_GITHUB_TOKEN ERODE_ANTHROPIC_API_KEY: $MY_ANTHROPIC_KEYOverride the entrypoint to call the CI entry point directly. The image includes Node.js and the built Erode package at /app/packages/core/dist/ci-entry.js.
Option 3: CLI
Section titled “Option 3: CLI”Clone the repository, build, and run Erode as a regular Node.js CLI:
git clone https://github.com/erode-app/erode.gitcd corenpm install && npm run buildThen run the analysis:
export ERODE_GITHUB_TOKEN="..."export ERODE_ANTHROPIC_API_KEY="..."
node packages/cli/dist/cli.js analyze ./path/to/model \ --url "https://github.com/org/repo/pull/42" \ --comment \ --fail-on-violationsSee CLI Commands for the full command reference and Configuration for all environment variables.