Skip to content

montcao/aztec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aztec

Aztec is an automated code-review service powered by an LLM running inside a container. It integrates directly with GitHub pull requests and posts AI-generated review comments based on the diff.

Aztec uses a GitHub Actions workflow that:

  1. Spins up the Aztec container (running an LLM such as codellama:7b) note: this can be sped up by hosting your own LLM server
  2. Computes the diff between the PR branch and main
  3. PR description allows user for flexibility for varying prompt and output from the LLM
  4. Sends the diff + PR description to the LLM
  5. Posts the generated review as a PR comment

How It Works

When a pull request is opened the workflow:

  1. Fetches the diff between the PR branch and main
  2. Specifying prompt the description of the PR provides the prompt for the LLM to use to review the code
  3. Sends the diff (plus the PR body as context) to the Aztec container via curl
  4. Captures the model output and stores it as review.txt
  5. Publishes the review directly as a comment on the pull request using GitHub’s API

This allows fully automated LLM-powered reviews without needing to run external cloud services.


Using Aztec

To enable Aztec in your repository:

  1. Add a GitHub Actions workflow file (e.g. .github/workflows/aztec.yml)
  2. Configure the Aztec container as a service
  3. Provide the required credentials (see below)
  4. Ensure your model is available in the container—by default the workflow uses codellama:7b

The container image defaults to:

ghcr.io/montcao/aztec:latest

This image runs an Ollama-compatible API on port 11434.


Credentials

Two credentials are required:

1. REG_TOKEN

A GitHub container registry token used to authenticate the Aztec container image pull.

Store it as a GitHub Actions secret:

REG_TOKEN

2. GH_PAT (Personal Access Token)

Used to write PR comments. Must be created with at least the repo scope.

Example:

Name: Aztec Code Review
Token: GH_PAT

Add it to repository secrets:

GH_PAT

Notes

  • The workflow supports incremental updates—every time the PR changes, Aztec reruns and posts a fresh comment.
  • You can swap codellama:7b for any model supported by your Aztec container.
  • The PR body is included as context for the LLM (e.g., requirements, intent, flags, explanations).
  • Dockerfile is what ghcr.io/montcao/aztec:latest contains
  • Description of PR allows user to prompt the LLM for specific comments or fields

About

LLM service reviews code repo and MR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published