Semantic code search and AI analysis for development workflows. Integrates with Giant AI's RAG system to provide intelligent code exploration and AI-powered analysis directly in Neovim.
- Semantic Code Search - Find code by meaning, not just keywords
- AI Analysis - Get intelligent insights about code patterns and functionality
- Project-Aware - Only works in projects initialized with Giant AI
- Avante Integration - Automatically sends analysis to Avante if available
- Clipboard Fallback - Results copied to clipboard for use with any AI tool
- Giant AI CLI tools - Install from Giant AI
- Project initialization - Run
ai-init-project-smartin your project - Project indexing - Run
ai-rag index .to enable semantic search
{
"bearded-giant/giant-ai.nvim",
config = function()
require('giant-ai').setup({
provider = "claude", -- Options: claude, openai, anthropic, gemini, ollama
limit = 5, -- Number of search results
keymaps = {
search_raw = "<leader>rs", -- Raw search keymap
search_analyze = "<leader>ra", -- AI analysis keymap
},
auto_setup = true, -- Show status message on startup
})
end,
}Example configurations for different providers:
-- OpenAI (requires OPENAI_API_KEY)
require('giant-ai').setup({ provider = "openai" })
-- Anthropic API (requires ANTHROPIC_API_KEY)
require('giant-ai').setup({ provider = "anthropic" })
-- Ollama for local models
require('giant-ai').setup({ provider = "ollama" })
### Using packer.nvim
```lua
use {
"bearded-giant/giant-ai.nvim",
config = function()
require('giant-ai').setup()
end
}{
"bearded-giant/giant-ai.nvim",
dir = "~/dev/lua/giant-ai.nvim", -- Local development path
config = function()
require('giant-ai').setup()
end,
}Default configuration:
{
provider = "claude", -- AI provider: claude, openai, anthropic, gemini, ollama
limit = 5, -- Number of search results
keymaps = {
search_raw = "<leader>rs", -- Keymap for raw search
search_analyze = "<leader>ra" -- Keymap for AI analysis
},
auto_setup = true -- Show status message on startup
}:GiantAISearch [query]- Semantic search (copies results to clipboard):GiantAIAnalyze [query]- AI analysis of search results:GiantAIStatus- Show project status and configuration
<leader>rs- Search word under cursor or visual selection<leader>ra- Analyze word under cursor or visual selection
The plugin shows different messages based on project state:
- Not initialized: "Run 'ai-init-project-smart' to enable Giant AI features"
- Initialized but not indexed: "Run 'ai-rag index .' to enable semantic search"
- Ready: "Ready! Use ra for AI analysis"
- Initialize project:
ai-init-project-smart - Index codebase:
ai-rag index . - Search semantically:
<leader>rsor:GiantAISearch error handling - Get AI analysis:
<leader>raor:GiantAIAnalyze authentication
If Avante is installed, AI analysis results are automatically sent to Avante for interactive chat. Otherwise, results are copied to clipboard.
The plugin supports all Giant AI providers:
provider = "claude" -- Uses Claude Code CLI (Desktop or Web)provider = "openai" -- Requires OPENAI_API_KEYprovider = "anthropic" -- Requires ANTHROPIC_API_KEYprovider = "gemini" -- Requires GEMINI_API_KEYprovider = "ollama" -- For self-hosted modelsNote: Configure API keys as environment variables or in your Giant AI agent.yml configuration.
The plugin is designed for local development and testing. The source is located at ~/dev/lua/giant-ai.nvim/ and can be modified directly.
Licensed under the Apache License 2.0. Part of the Giant AI project by Bearded Giant, LLC.
Issues and pull requests welcome! This plugin is part of the larger Giant AI project.