Intelligent PR review automation powered by Claude AI & Google Gemini, seamlessly integrated with GitHub and Jira. Featuring advanced code diff views and local Jira ticket management.
Code-Tanuki is an AI-powered development assistant designed for software teams. It leverages Claude AI or Google Gemini to provide intelligent, context-aware code reviews on your GitHub pull requests, and features a robust Jira ticket management system for offline drafting and requirement validation.
- 🚀 Code Review V2 (Diff View)
- A comprehensive GitHub-like diff viewer interface for your AI-generated code reviews.
- Contextual inline comments injected directly below the specific lines they refer to.
- Interactive code suggestions rendered with
+/-diff blocks inside comments. - Editable comment boxes allowing you to seamlessly rewrite or refine AI suggestions before posting to GitHub.
- 🎫 Jira Ticket Writer & Manager
- A dedicated local dashboard to manage Jira tickets with Epic, Story, and standard List views.
- Offline Drafting: Write and refine Jira tickets locally without needing an active internet connection. Un-synced tickets are clearly marked.
- 2-Way Syncing: Fetch latest details from remote, push local drafts as new tickets, or update existing remote Jira issues seamlessly (
Create/Update/Sync).
- 🤖 Multi-AI Support - Choose between Claude AI (Opus, Sonnet, Haiku) or Google Gemini (Pro, Flash).
- 🔗 GitHub Integration - Automatic PR fetching and inline comment posting.
- 📋 Contextual Validation - Uses Jira ticket contexts to validate code against actual acceptance criteria.
- ✨ Legacy Code Review (V1) - A simple, list-based review preview dialog for quick approvals (available alongside V2).
- 📊 Review History - Track past reviews with local JSON storage filtering.
- Frontend: Next.js 16 (App Router), React 19, TypeScript, Material-UI (MUI), Tailwind CSS
- Backend: Next.js API Routes, Anthropic SDK, Google Generative AI SDK, Octokit, Axios
- Storage: Local JSON Storage (extensible for database migrations)
- Node.js 20+ and npm
- AI Provider API Key (at least one required):
- Anthropic API Key (Claude models)
- Google Gemini API Key (Gemini models - Free tier available)
- GitHub Personal Access Token (for PR fetching and commenting)
- Jira API Token (for Local Ticket Manager features)
git clone https://github.com/hongjs/code-tanuki.git
cd code-tanuki
npm installcp .env.example .envEdit .env and add your credentials:
# AI Provider
ANTHROPIC_API_KEY=sk-ant-your_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
# GitHub
GITHUB_TOKEN=ghp_your_github_token_here
# Jira
JIRA_BASE_URL=https://yourcompany.atlassian.net
JIRA_EMAIL=your-email@company.com
JIRA_API_TOKEN=your_jira_token_heremkdir -p data/reviews data/reviews-v2 logs
echo "[]" > data/reviews/all-reviews.jsonnpm run devOpen http://localhost:3000 to start using Code-Tanuki.
Everything in Code-Tanuki starts with a simple chat with the AI!
- Provide the AI with your AI API token (Claude or Gemini).
- The AI will securely provision and create local JSON configuration files (
.env,data/reviews, etc.) to store your settings. - Once the local JSON files are generated, the Code-Tanuki UI comes to life, interacting seamlessly with Jira and GitHub exclusively via API calls.
- Navigate to the Review V2 page.
- Enter your GitHub PR URL and Jira ticket ID.
- Choose your AI model and generate the review.
- Open the generated review to see the GitHub-like Diff UI.
- Read inline comments, edit AI feedback directly on the page, and click Approve to post it straight to the GitHub PR.
(If preferred, the original simple V1 Review is still accessible from the main history/review tools).
- Navigate to the Tickets page.
- Use Sync New Ticket to pull down an existing Jira issue using its ID.
- Use the interface to draft a ticket or update criteria offline.
- Click Publish/Update to push your local edits directly to your remote Atlassian Jira instance.
- Switch between Epic and Story views to visualize ticket parent-child hierarchies.
| Model | Best For | Context | Setup |
|---|---|---|---|
| Claude Opus / Sonnet | Complex reviews, highest accuracy | up to 200k | Paid |
| Claude Haiku | Fast reviews, simple PRs | up to 200k | Paid |
| Gemini Pro Preview | Thorough reviews on a budget | up to 2M | Free tier available |
| Gemini Flash Preview | Fast, efficient scanning | up to 2M | Free tier available |
If using the free tier of Gemini, note that output may truncate for highly complex PRs. We recommend keeping GEMINI_MAX_TOKENS=2048 or transitioning to Claude.
# Build & Run via Docker Compose
docker-compose up -d
# View logs
docker-compose logs -fContributions are welcome! Please fork the repository, create a feature branch, and submit a PR for review.
ISC License
Made with ❤️ by the Code-Tanuki team