Use npx instead
Some checks failed
Code review / review (pull_request) Failing after 4s
Publish Library / Build NPM Project (push) Failing after 20s
Publish Library / Tag Version (push) Has been skipped

This commit is contained in:
2025-12-27 22:03:14 -05:00
parent e0f3a3cd82
commit a24961a55c
7 changed files with 84 additions and 115 deletions

View File

@@ -6,29 +6,29 @@
<img src="https://git.zakscode.com/repo-avatars/d2c56ffd0220751c2f4a9f6fc1e8125a9a63aeed452ae4f4ab696c084330faa2" alt="Logo" width="200" height="200">
<!-- Title -->
### AI Reviewer
### AI Agents
<!-- Description -->
Automated AI-powered code review for pull requests 🤖
Automated AI-powered agents for automated reviews and code assistance
<!-- Repo badges -->
[![Version](https://img.shields.io/badge/dynamic/json.svg?label=Version&style=for-the-badge&url=https://git.zakscode.com/api/v1/repos/ztimson/ai-reviewer/tags&query=$[0].name)](https://git.zakscode.com/ztimson/ai-reviewer/tags)
[![Pull Requests](https://img.shields.io/badge/dynamic/json.svg?label=Pull%20Requests&style=for-the-badge&url=https://git.zakscode.com/api/v1/repos/ztimson/ai-reviewer&query=open_pr_counter)](https://git.zakscode.com/ztimson/ai-reviewer/pulls)
[![Issues](https://img.shields.io/badge/dynamic/json.svg?label=Issues&style=for-the-badge&url=https://git.zakscode.com/api/v1/repos/ztimson/ai-reviewer&query=open_issues_count)](https://git.zakscode.com/ztimson/ai-reviewer/issues)
[![Version](https://img.shields.io/badge/dynamic/json.svg?label=Version&style=for-the-badge&url=https://git.zakscode.com/api/v1/repos/ztimson/ai-agents/tags&query=$[0].name)](https://git.zakscode.com/ztimson/ai-agents/tags)
[![Pull Requests](https://img.shields.io/badge/dynamic/json.svg?label=Pull%20Requests&style=for-the-badge&url=https://git.zakscode.com/api/v1/repos/ztimson/ai-agents&query=open_pr_counter)](https://git.zakscode.com/ztimson/ai-agents/pulls)
[![Issues](https://img.shields.io/badge/dynamic/json.svg?label=Issues&style=for-the-badge&url=https://git.zakscode.com/api/v1/repos/ztimson/ai-agents&query=open_issues_count)](https://git.zakscode.com/ztimson/ai-agents/issues)
<!-- Links -->
---
<div>
<a href="https://git.zakscode.com/ztimson/ai-reviewer/releases" target="_blank">Release Notes</a>
• <a href="https://git.zakscode.com/ztimson/ai-reviewer/issues/new?template=.github%2fissue_template%2fbug.md" target="_blank">Report a Bug</a>
• <a href="https://git.zakscode.com/ztimson/ai-reviewer/issues/new?template=.github%2fissue_template%2fenhancement.md" target="_blank">Request a Feature</a>
<a href="https://git.zakscode.com/ztimson/ai-agents/releases" target="_blank">Release Notes</a>
• <a href="https://git.zakscode.com/ztimson/ai-agents/issues/new?template=.github%2fissue_template%2fbug.md" target="_blank">Report a Bug</a>
• <a href="https://git.zakscode.com/ztimson/ai-agents/issues/new?template=.github%2fissue_template%2fenhancement.md" target="_blank">Request a Feature</a>
</div>
---
</div>
## Table of Contents
- [AI Reviewer](#top)
- [AI Agents](#top)
- [About](#about)
- [Built With](#built-with)
- [Setup](#setup)
@@ -37,7 +37,7 @@ Automated AI-powered code review for pull requests 🤖
## About
Automated code reviewer that uses AI to analyze git diffs and provide inline comments on pull requests. Supports Anthropic, OpenAI, and Ollama models with tool-based reviewing for precise feedback.
Automated code agents that uses AI to analyze git diffs and provide inline comments on pull requests. Supports Anthropic, OpenAI, and Ollama models with tool-based reviewing for precise feedback.
### Built With
[![Docker](https://img.shields.io/badge/Docker-384d54?style=for-the-badge&logo=docker)](https://docker.com/)
@@ -54,40 +54,7 @@ Automated code reviewer that uses AI to analyze git diffs and provide inline com
</summary>
#### Instructions
1. Add the following git action:
```yaml
name: Code review
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
review:
runs-on: ubuntu-latest
container: docker
steps:
- name: Fetch code
run: |
git clone "$(echo ${{github.server_url}}/${{github.repository}}.git | sed s%://%://${{github.token}}@% )" .
git checkout ${{ github.event.pull_request.head.sha }}
git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Run AI Review
run: |
echo $GITHUB_WORKSPACE
docker pull "git.zakscode.com/ztimson/ai-reviewer:test"
docker run --rm -v $GITHUB_WORKSPACE:/app \
-e AI_HOST=anthropic \
-e AI_MODEL=claude-sonnet-4-5 \
-e AI_TOKEN="${{ secrets.ANTHROPIC_TOKEN }}" \
-e GIT_HOST="${{ github.server_url }}" \
-e GIT_OWNER="${{ github.repository_owner }}" \
-e GIT_REPO="${{ github.event.repository.name }}" \
-e GIT_TOKEN="${{ secrets.ASSISTANT_TOKEN }}" \
-e GIT_BRANCH="origin/${{ github.event.pull_request.base.ref }}" \
-e PULL_REQUEST="${{ github.event.pull_request.number }}" \
"git.zakscode.com/ztimson/ai-reviewer:test"
```
1. Run using npx: `npx @ztimson/ai-agents review`
</details>