mirrajabi / aider-github-action

Run Aider AI assistant in your Github Workflows!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aider GitHub Action

This action runs Aider in a container given a set of arguments, let's Aider apply changes, then it pushes the changes to the repository on the branch you pass to it.

Usage

Using Aider Github Workflows

The easiest and recommended way to use this action is to use the aider-github-workflows.

See Issue to PR workflow which is a great place to start.

Using the action by itself

In your workflow file, add the following step to your job:

jobs:
  my_job:
    steps:
      - name: Apply changes with Aider
        uses: mirrajabi/aider-github-action@main
        timeout-minutes: 10 # So that you won't accidentally burn your OpenAI credits!
        with:
          openai_api_key: ${{ secrets.openai_api_key }}
          branch: ${{ fromJson(steps.create_branch.outputs.result).ref }}
          aider_args: '--model ${{ inputs.model }} --yes --message "${{ steps.create_prompt.outputs.result }}"'

Action Inputs

When using the action directly, you can pass the following inputs to it:

Field Name Description Required Type Default
aider_args Space-delimited args to pass to aider (Example: "--yes --message 'Make the dashboard sidebar purple'") true string -
branch Branch to run Aider on true string -
openai_api_key OpenAI API Key true string -

Roadmap

  • Put it out there
  • Get it to a point where tagging it as v1 makes sense.
  • Investigate the possibilities of turning this into a Github App.

Credits

This project uses Paul Gauthier's Aider. It's a great tool, and you should check it out! You can also use it as your local coding assistant.

About

Run Aider AI assistant in your Github Workflows!

License:Apache License 2.0


Languages

Language:Shell 82.1%Language:Dockerfile 17.9%