Quickstart: 2-Minute Setup
Connect your GitHub repository, add your free Google or Groq API key, and receive AI-powered code reviews on your next pull request.
Connect your GitHub repository, add your free Google or Groq API key, and receive AI-powered code reviews on your next pull request.
Prerequisites
Step 1: Install GitHub App
Step 2: Add Your BYOK Key
GitCaptain never marks up token costs. Individual builders connect directly to model providers:
# Provider Key Setup Verification
curl -X POST https://api.gitcaptain.com/v1/auth/verify-key \
-H "Authorization: Bearer <your-session-token>" \
-d '{"provider": "google", "model": "gemini-2.5-flash"}'Step 3: Open a Test PR
```bash
git checkout -b test-gitcaptain
echo "function calculateDiscount(price, pct) { return price - (price * pct); }" >> utils.js
git commit -am "test: add discount utility function"
git push origin test-gitcaptain
```
Next Steps
The Review Engine & AST Pipeline
How Tree-sitter concrete syntax trees, ephemeral RAM execution, and sub-second multi-model failover power zero-latency code reviews.
How Tree-sitter concrete syntax trees, ephemeral RAM execution, and sub-second multi-model failover power zero-latency code reviews.
The Problem with Raw LLMs
Traditional AI review tools feed raw 2,000-line git diffs directly into commercial LLM context windows. This approach causes:
The 5-Stage Pipeline
GitCaptain addresses this with a compiler-inspired architecture:
[GitHub Webhook]
│ (HMAC Verified in 2ms)
▼
[Tree-sitter CST Engine] ─── Isolates modified AST function scopes in RAM
│
▼
[Targeted Prompt Assembly] ─── 70% fewer tokens, includes exact parent symbol signatures
│
▼
[BYOK Inference Router] ─── Sub-500ms failover across Google / Groq / OpenRouter
│
▼
[GitHub Markdown Emitter] ─── Inline review comments & complexity radar metrics
│
▼
[tmpfs Zero-Fill Wipe] ─── Complete in-memory teardown. Zero code on disk.Tree-sitter AST Delta Isolation
When a PR webhook arrives, GitCaptain's worker loads the modified files into a temporary in-memory Linux virtual filesystem (tmpfs).
Sub-Second Multi-Model Failover
If your primary model provider (e.g., Google AI Studio) responds with a 429 Rate Limit or temporary outage, GitCaptain's worker automatically reroutes the prompt payload to your secondary configured fallback provider (e.g., Groq Llama-3.3-70B) in under 500ms. The PR webhook never drops.
Ephemeral RAM Teardown
Once review comments are delivered to GitHub's REST API, the worker unmounts the tmpfs partition and zeros the memory space. No user repository source code is ever written to disk, and no code is ever used for model training.
Bring-Your-Own-Keys (BYOK)
Connect your personal API keys directly from Google AI Studio, Groq, Mistral, or OpenRouter for 100% free individual usage with zero token markups.
Connect your personal API keys directly from Google AI Studio, Groq, Mistral, or OpenRouter for 100% free individual usage with zero token markups.
Why Bring-Your-Own-Keys?
Most AI developer tools act as billing middlemen, charging $20-$40/seat/month while marking up token prices by 300-500%.
GitCaptain is fundamentally different:
Supported Inference Providers
Google AI Studio (Recommended for $0 Free Tier)
gemini-2.5-flash or gemini-1.5-pro.Groq Cloud (Recommended for Speed)
llama-3.3-70b-versatile or mixtral-8x7b-32768.OpenRouter & Custom Gateways
Key Storage & Cryptographic Security
Your API keys are encrypted at rest using AES-256-GCM with a unique Initialization Vector (IV) per record.
PR Summaries & Inline Suggestions
Understand the scope, architectural blast radius, and exact line-level improvements of every pull request.
Understand the scope, architectural blast radius, and exact line-level improvements of every pull request.
PR Walkthrough Comments
On every pull request, GitCaptain generates a concise, human-readable walkthrough comment pinned to the discussion thread:
Complexity Radar & AST Metrics
GitCaptain analyzes AST node depth and cyclomatic branches to compute code complexity metrics:
1-Click GitHub Suggestions
When GitCaptain identifies an optimization or bug, it formats inline comments as GitHub Suggestion diff blocks:
- const user = await db.users.find({ id: req.params.id });- if (!user) return res.send(404);+ const user = await db.users.findById(req.params.id).lean().exec();+ if (!user) {+ return res.status(404).json({ error: 'User not found' });+ }
Engineers can click Commit suggestion directly in GitHub's UI to apply the fix in one click.
Interactive Comment Commands
You can interact with GitCaptain directly by mentioning @gitcaptain in any PR comment:
@gitcaptain review: Forces an immediate re-evaluation of the latest commit.@gitcaptain summarize: Re-generates the high-level PR walkthrough.@gitcaptain simplify: Focuses review on code simplification and dead-code removal.Ephemeral RAM & Zero Retention
Learn why GitCaptain never stores your source code on disk or uses your intellectual property for model training.
Learn why GitCaptain never stores your source code on disk or uses your intellectual property for model training.
Zero Code Retention Pledge
At GitCaptain, we believe your codebase is your most valuable intellectual property. Our architecture is built from the ground up around Zero Data Retention (ZDR):
tmpfs).Temporary tmpfs Sandboxes
When a review job starts:
# Internal worker memory mounting
mount -t tmpfs -o size=256M,noexec,nosuid,nodev tmpfs /sandbox/pr-1284The worker checks out the git diff into this isolated sandbox, runs Tree-sitter parsers, and dispatches the prompt. Upon task completion, the mount is unmounted and freed:
umount /sandbox/pr-1284No Public Model Training
Under our Bring-Your-Own-Key model: