FIRE is an AI-powered FastAPI service designed to automatically fix and review code on GitHub repositories using large language models via Ollama and Langchain.
It consists of:
/fix– Fix code automatically usingdeepseek-coder-v2/review– Review GitHub PRs using intelligent AI prompts/fire– End-to-end automation: Fix → PR → Review
- Python 🐍
- FastAPI 🚀
- Langchain
- Ollama (LLM runtime)
- GitHub REST APIs
- deepseek-coder-v2:latest (LLM model)
git clone https://github.com/sremehro/FIRE.git
cd FIRE
pip install -r requirements.txtMake sure Ollama is installed and start the model:
ollama run deepseek-coder-v2:latestuvicorn api:app --host 0.0.0.0 --port 8080Purpose: Analyzes a file and applies improvements (bugs, performance, code quality), then creates a Pull Request on GitHub.
POST /fix
{
"file_url": "https://github.com/user/repo/blob/main/file.py",
"github_token": "ghp_YourGithubToken"
}{
"has_solution": true,
"solution": "Modified code here...",
"pr_url": "https://github.com/user/repo/pull/123"
}Purpose: Fetches details of a GitHub Pull Request and runs an automated code review, including inline comments.
POST /review
{
"pr_url": "https://github.com/user/repo/pull/123",
"github_token": "ghp_YourGithubToken"
}{
"has_comments": true,
"review_comments": [...],
"approve": false
}Purpose: End-to-end automation. Fix a file → Create PR → Review the PR.
POST /fire
Same as /fix
{
"file_url": "https://github.com/user/repo/blob/main/file.py",
"github_token": "ghp_YourGithubToken"
}{
"fix": {
"has_solution": true,
"solution": "...",
"pr_url": "https://github.com/user/repo/pull/123"
},
"review": {
"has_comments": true,
"review_comments": [...],
"approve": false
}
}- Uses
deepseek-coder-v2:latestthrough Ollama - Powered by Langchain agents to orchestrate prompt execution
- GitHub interactions via REST API:
- Read file content from a repo
- Create pull requests
- Post inline PR reviews
Use a Personal Access Token (PAT) with:
repo(all)pull_requestandcontentsscope
Generate it from: GitHub Developer Settings
Feel free to submit PRs or raise issues to improve the tool. Future enhancements could include:
- CLI wrapper
- Support for batch file processing
- Web dashboard for results
- Implement MCP to get full repo context.
This project is licensed under the MIT License.