A blazing-fast, audit-grade AI code reviewer powered by Bun, Vercel AI SDK, and @ai-sdk/google.
This agent analyzes Git diffs, streams intelligent feedback, and helps you maintain clean, scalable codebases—file by file.
- 🔍 Git-aware code review: Automatically detects file changes and provides AI-powered suggestions.
- 🧠 Gemini 2.5 Flash: Leverages Google’s latest LLM for fast, insightful feedback.
- 🛠️ Custom tools: Includes
getFileChangesInDirectoryToolfor precise diff analysis. - 📦 Bun-native: Lightning-fast startup, dependency resolution, and native
.envsupport. - 🧵 Real-time streaming: Delivers feedback directly to your terminal as it’s generated.
| Tool | Purpose |
|---|---|
| Bun | Runtime & package manager |
| Vercel AI | Streaming AI orchestration |
| @ai-sdk/google | Gemini model integration |
| Zod | Schema validation for tool inputs |
| simple-git | Git diff parsing and file tracking |
| dotenv | Environment variable management |
Navigate to the agent directory:
cd 007---Setup/my-agentBun is a fast JavaScript runtime. To install it:
curl -fsSL https://bun.sh/install | bashverify:
bun --version💡 If you're using Linux, make sure
~/.bun/binis added to yourPATH.
Run:
bun installThis installs all packages listed in package.json.
Create a .env file in the workspace root (007---Setup/):
touch .envThen add your API key and runtime settings:
# === API Keys ===
GOOGLE_GENERATIVE_AI_API_KEY=your-google-api-key-here
# === Agent Configuration ===
AGENT_NAME=007
AGENT_MODE=diff-summary
LOG_LEVEL=info
# === Git Integration ===
GIT_AUTHOR=Azuka
GIT_EMAIL=example@gmail.com
# === Runtime Settings ===
PORT=3000
TIMEOUT_MS=10000🔐 Important: Never commit
.envto version control. Add it to.gitignore.
In index.ts, you can temporarily add:
console.log("Loaded API key:", process.env.GOOGLE_GENERATIVE_AI_API_KEY);Run:
bun run my-agent/index.tsIf it prints your key, you're good to go.
Start the agent:
bun run my-agent/index.ts It will stream code review output based on your prompt.
- The agent uses
simple-gitto detect file changes in a specified directory. - Changes are analyzed by Gemini 2.5 Flash via
streamText()from Vercel AI. - A custom system prompt ensures consistent tone, style, and focus for reviews.
- Feedback is streamed in real-time to your terminal for immediate insights.
007---Setup/ # 🧠 Workspace root
├── README.md # Workspace-level documentation
├── bun.lock # Bun lockfile for reproducible installs
├── package.json # Workspace config (can declare workspaces)
├── setup.md # Contributor onboarding guide
│
├── my-agent/ # 🧠 Modular agent logic
│ ├── index.ts # Agent entry point
│ ├── package.json # Agent-specific dependencies and scripts
│ ├── tsconfig.json # TypeScript config scoped to agent
│ ├── .env # API keys and runtime settings
│
│ ├── prompts.ts # System prompt for reviewer behavior
│ ├── tools/ # 🔧 Modular tools
│ │ ├── gitDiff.ts # Git diff integration
│ │ ├── markdownWriter.ts # Markdown formatting utility
│ │ ├── commitMessage.ts # Commit message generator
│ │ └── checkDuplicates.ts # Duplicate file detection
│
│ ├── test/ # ✅ Agent tests
│ │ ├── agent.test.ts # Prompt handling and edge cases
│ │ └── tools.test.ts # Git tooling and utilities
│
│ └── setup.md # Agent-specific onboarding
await codeReviewAgent(
"Review the code changes in '../my-agent' directory, make your reviews and suggestions file by file"
);This triggers a file-by-file review of changes in the specified directory, with suggestions streamed to your terminal.
- File filtering: Excludes sensitive files like
bun.lockanddist/. - Audit-grade design: Built for reliable, reproducible code reviews.
- Extensible: Easily integrates with CI pipelines or commit history analysis.
- 🔄 Support for staged vs. committed diff reviews
- 🧪 Test coverage analysis
- �� Summarization of lint and type errors
- 🧭 Contributor onboarding assistant
Built by Azuka, a backend engineer passionate about automation, reproducibility, and scalable systems. Connect on X for updates or collaboration!
MIT License — fork, remix, and deploy your own 007 AI Agent with freedom.
Contributions are welcome! Please open an issue or pull request on GitHub. Let’s build better code review tools together.


