AI-powered code reviewer using OpenRouter LLMs
Project description
Iara - AI Code Reviewer 🧜♀️
Iara is an automated, project-agnostic, configurable code review tool designed to run in CI/CD pipelines or locally via CLI. It connects directly to the LLM provider of your choice — OpenRouter (free models), OpenAI, Google Gemini, or Anthropic Claude.
Table of Contents
- Features
- Capabilities
- Installation and Setup
- How to Use
- Privacy & Security
- Documentation
- Tests
- Contributing
- License
🚀 Features
- Agnostic: Configure your project context (Tech Stack, Rules) via JSON.
- Multi-Provider: Connect directly to OpenRouter, OpenAI, Google Gemini, Anthropic Claude, or Groq.
- Smart Fallback: Automatically tries free models if the preferred one fails (OpenRouter only).
- Rules-Based (Static): Identifies dangerous patterns instantly without spending tokens (e.g.,
GetComponentin loops in Unity). - LLM-Based (Intelligent): Uses AI to understand logic, security, and context, going beyond syntax.
- GitHub + GitLab: Native integration with both platforms, with automatic comments on PRs/MRs.
- Multi-Language Reviews: Configure the output language — reviews can be written in English, Portuguese, Spanish, French, and more.
🧠 Capabilities
Iara combines different types of analysis for a complete review:
| Type | What does it do? | Does Iara cover it? | How? |
|---|---|---|---|
| Static Analysis | Finds bugs by reading code (fast). | ✅ Yes | Via Extensions (Regex) and LLM. |
| Linting | Fixes style and formatting. | ✅ Yes | LLM can suggest Clean Code. |
| SAST | Finds security flaws in code. | ✅ Yes | Primary focus on vulnerability detection. |
| Dynamic Analysis | Finds bugs by running the app (slow). | ❌ No | Focus on fast CI/CD (Code Review). |
What does it detect?
-
Unity / Game Dev:
- Use of slow APIs (
Find,GetComponent) in critical loops (Update). - Excessive memory allocation (Garbage Collection).
- Excess logging (
Debug.Log) in final builds.
- Use of slow APIs (
-
Security (General):
- Hardcoded credentials (Passwords, API Keys).
- Injection vulnerabilities (SQL, Command).
- Missing input validation.
-
Code Quality:
- Complex or confusing logic.
- Exception handling errors.
- Refactoring suggestions for readability.
📦 Installation and Setup
1. Install
pip install iara-reviewer
2. Configure (Interactive Setup)
iara init
The wizard guides you through 5 steps:
- Language — Choose the review output language (en, pt-br, es, fr, etc.)
- Provider — Choose your LLM provider:
openrouter(default, free),openai,gemini,anthropic, orgroq - API Key — Enter the key for the chosen provider (validated and saved to
~/.iara/config.json) - Project — Name, tech stack, description
- Preferences — Focus areas (Security, Performance, etc.)
Done! Project config is saved at .iara.json.
3. Use
git diff main | iara
Check authentication
iara auth status
Manual setup (without wizard)
Set the provider and its key via environment variables:
# OpenRouter (default — free models available)
export OPENROUTER_API_KEY="sk-or-..."
# OpenAI
export IARA_PROVIDER="openai"
export OPENAI_API_KEY="sk-..."
# Google Gemini
export IARA_PROVIDER="gemini"
export GEMINI_API_KEY="AIza..."
# Anthropic Claude
export IARA_PROVIDER="anthropic"
export ANTHROPIC_API_KEY="sk-ant-..."
API key resolution priority: environment variable > global config (~/.iara/config.json).
From source (Development)
git clone https://github.com/felipefernandes/iara.git
cd iara
pip install -e .
🏃 How to Use
Via Pipe (Git Diff)
git diff main | iara
Via Environment Variable
export PR_DIFF=$(git diff main)
iara
Scan Mode (Static Analysis)
iara --scan ./path/to/project
Forcing a Provider and Model
# Anthropic Claude
export IARA_PROVIDER="anthropic"
export ANTHROPIC_API_KEY="sk-ant-..."
export IARA_MODEL="claude-sonnet-4-5-20250929"
git diff | iara
# OpenAI GPT-4o
export IARA_PROVIDER="openai"
export OPENAI_API_KEY="sk-..."
export IARA_MODEL="gpt-4o"
git diff | iara
# Google Gemini
export IARA_PROVIDER="gemini"
export GEMINI_API_KEY="AIza..."
export IARA_MODEL="gemini-2.5-flash"
git diff | iara
🔒 Privacy & Security
Important: Iara sends your code to third-party LLM providers for analysis. While convenient, this has privacy implications you should be aware of.
What happens to your code?
- Code diffs are sent to external APIs (OpenRouter, OpenAI, Gemini, Anthropic, Groq)
- Providers may temporarily store data for processing
- Data retention and training policies vary by provider
Provider Privacy Comparison
| Provider | Training on API Data | Data Retention | Enterprise Options | Best For |
|---|---|---|---|---|
| Anthropic | ❌ No | Temporary | ✅ Yes | Sensitive code |
| OpenAI | ⚠️ Opt-out required | 30 days | ✅ Yes | General use |
| Gemini | ⚠️ Varies | Not documented | ✅ Yes | General use |
| Groq | ⚠️ Not documented | Not documented | ❌ No | Public code |
| OpenRouter | ⚠️ Depends on model | Varies | ❌ No | Public code |
Recommendations by Use Case
- Open Source Projects: Any provider (code is already public)
- Private Projects (non-sensitive): Anthropic or Groq
- Sensitive/Proprietary Code: Anthropic Enterprise or self-hosted LLM
- Regulated Industries (HIPAA, PCI-DSS): Self-hosted LLM only (e.g., Ollama - see Issue #76)
For detailed privacy information and self-hosted options, see Privacy & Security Guide.
📚 Documentation
For detailed guides and configuration options, see:
- Configuration Guide - Project configuration, providers, models, RAG memory setup
- CI/CD Integration - GitHub Actions, GitLab CI, Docker, inline PR comments
- Privacy & Security Guide - Data privacy, provider policies, self-hosted options
- Contributing Guide - Development setup, testing, pull requests
Configuration Examples
Complete configuration examples are available in examples/:
examples/iara-example.json- Standard configurationexamples/iara-example-inline.json- Inline PR comments modeexamples/github-workflow.yml- GitHub Actions workflowexamples/gitlab-ci.yml- GitLab CI pipeline
Quick Links
- GitHub Marketplace - Add Iara to your repository
- PyPI Package - Install via pip
- Changelog - Version history and release notes
🧪 Tests
python -m unittest discover tests
🤝 Contributing
We welcome contributions! See our Contributing Guide for:
- Development setup
- Running tests
- Code quality standards
- Pull request guidelines
- Release process
📜 License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iara_reviewer-1.11.0.tar.gz.
File metadata
- Download URL: iara_reviewer-1.11.0.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e66ac66d412c14acafd51bc87d58f17d1f6a95aa49f4cc75be4b8a42c2a1eb3
|
|
| MD5 |
b7a767b04f490c3be19d7f92220eb9d4
|
|
| BLAKE2b-256 |
4e06ba5175f2b6abd8f7d33373a7276fef7552b158e42b83c57f9faaebab684d
|
Provenance
The following attestation bundles were made for iara_reviewer-1.11.0.tar.gz:
Publisher:
publish-pypi.yml on felipefernandes/iara
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iara_reviewer-1.11.0.tar.gz -
Subject digest:
5e66ac66d412c14acafd51bc87d58f17d1f6a95aa49f4cc75be4b8a42c2a1eb3 - Sigstore transparency entry: 1189268266
- Sigstore integration time:
-
Permalink:
felipefernandes/iara@46f51e551d5d66160fe036ae05cfa3bcb4e4ed56 -
Branch / Tag:
refs/tags/v1.11.0 - Owner: https://github.com/felipefernandes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@46f51e551d5d66160fe036ae05cfa3bcb4e4ed56 -
Trigger Event:
push
-
Statement type:
File details
Details for the file iara_reviewer-1.11.0-py3-none-any.whl.
File metadata
- Download URL: iara_reviewer-1.11.0-py3-none-any.whl
- Upload date:
- Size: 52.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7db670fc8b06b5bc8e45fa7375a5aa576fe7dbdda386449474ede8e046a05a1
|
|
| MD5 |
53061abde61fcf7ed8b82c5ceebf61cd
|
|
| BLAKE2b-256 |
117bc598d77dcb0b1797c98cbdc81101e802e1829e75b9006dcfa1f33868e6bf
|
Provenance
The following attestation bundles were made for iara_reviewer-1.11.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on felipefernandes/iara
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iara_reviewer-1.11.0-py3-none-any.whl -
Subject digest:
d7db670fc8b06b5bc8e45fa7375a5aa576fe7dbdda386449474ede8e046a05a1 - Sigstore transparency entry: 1189268271
- Sigstore integration time:
-
Permalink:
felipefernandes/iara@46f51e551d5d66160fe036ae05cfa3bcb4e4ed56 -
Branch / Tag:
refs/tags/v1.11.0 - Owner: https://github.com/felipefernandes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@46f51e551d5d66160fe036ae05cfa3bcb4e4ed56 -
Trigger Event:
push
-
Statement type: