Skip to main content
Vibrant CLI supports multiple AI providers for deep code analysis that goes beyond static analysis. AI providers help detect complex patterns, provide context-aware suggestions, and generate detailed summaries of your codebase.

Why use AI analysis?

While static analysis is fast and catches many common issues, AI-powered analysis can:
  • Detect complex anti-patterns that require context understanding
  • Provide natural language explanations of issues
  • Generate actionable recommendations for code improvements
  • Understand business logic and suggest better implementations
  • Identify architectural issues across multiple files

Enable AI analysis

Add the --ai flag to any Vibrant command:
vibrant . --ai
Vibrant will automatically detect which provider to use based on available API keys in your environment.

Available providers

OpenRouter

Free models available. Best for getting started without costs.

Google Gemini

Generous free tier. Fast and accurate for code analysis.

OpenAI

Industry-leading models. Paid service with excellent quality.

Claude

Anthropic’s AI. Great for complex reasoning. Paid service.

Ollama

Run models locally. Completely free and private.

Provider comparison

ProviderCostSpeedQualityBest for
OpenRouterFree tierFastGoodGetting started, trying different models
GeminiFree tierVery fastExcellentDaily development, CI/CD
OpenAIPaidFastExcellentProduction use, critical analysis
ClaudePaidMediumExcellentComplex codebases, deep reasoning
OllamaFreeMediumGoodPrivacy-sensitive projects, offline use

Choose a provider

1

OpenRouter

Get instant access to multiple free models. Setup guide
2

Gemini

Google’s generous free tier with fast performance. Setup guide
3

Ollama

Run models locally on your machine. Setup guide
1

OpenAI

Industry standard with excellent quality. Setup guide
2

Claude

Great for complex analysis and reasoning. Setup guide

Specify a provider

Use the --provider flag to choose a specific provider:
vibrant . --ai --provider openrouter
vibrant . --ai --provider gemini
vibrant . --ai --provider openai
vibrant . --ai --provider claude
vibrant . --ai --provider ollama
If you don’t specify a provider, Vibrant will automatically detect and use the first available provider based on your environment variables.

Configuration

You can set a default provider in your vibrant.config.js:
vibrant.config.js
module.exports = {
  provider: 'openrouter',
};
Now you can run vibrant . --ai without specifying --provider each time.

Token optimization

Vibrant includes a Smart Summarizer that reduces token usage by 50-60% while maintaining detection accuracy:
vibrant . --ai
📊 Token Optimization:
   Original: 45,000 tokens
   Summarized: 18,000 tokens
   Savings: 60.0%
This means:
  • Lower API costs for paid providers
  • Faster analysis times
  • More files can be analyzed in a single request
  • Better free tier utilization

Next steps

Set up OpenRouter

Get started with free models in minutes

Compare providers

See detailed pricing and model information for each provider

Build docs developers (and LLMs) love