TL;DR: Sourcegraph Cody is an AI coding assistant that uses deep codebase context to provide accurate answers, code generation, and explanations — it reads your entire repository, not just the open file, for truly context-aware AI coding help.
Official Website: Visit Cody | Tool Page: Cody details & alternatives
What is Sourcegraph Cody?
Sourcegraph Cody is an AI coding assistant built on Sourcegraph's code intelligence platform. What sets Cody apart from other AI coding tools is its deep codebase context — while most AI assistants only see the file you're editing, Cody uses Sourcegraph's code graph to understand your entire repository, including function definitions across files, type hierarchies, and usage patterns. This means Cody's suggestions and explanations are informed by the full picture of your codebase, not just a snippet.
Getting Started
Step 1: Install Cody
- Visit Cody to download
- Install the Cody extension for VS Code or JetBrains
- Sign in with a free Sourcegraph.com account or connect to your enterprise Sourcegraph instance
Step 2: Index Your Codebase
- Cody automatically indexes your open project for context
- For enterprise users, Sourcegraph indexes your full code graph across all repositories
- Start asking questions or writing code — Cody uses the full context immediately
Core Features
Context-Aware Code Generation
- Generates code that correctly references functions and types from other files
- Understands your project's patterns, conventions, and architecture
- Inline completions and chat-based generation
- Supports multiple LLM backends (Claude, GPT-4, Mixtral, and more)
Codebase-Wide Q&A
| Question Type | Example | What Cody Does |
|---|---|---|
| Architecture | "How does authentication work in this project?" | Searches across files to explain the auth flow |
| Usage | "Where is the UserService class used?" | Finds all references across the codebase |
| Debugging | "Why might this API call return null?" | Analyses the call chain and data flow |
| Onboarding | "Explain how the payment module works" | Summarises relevant code from multiple files |
Customisable LLM Selection
- Choose between Claude 3.5 Sonnet, GPT-4o, Mixtral, and other models
- Switch models depending on the task (fast completions vs deep analysis)
- Enterprise customers can bring their own model endpoints
Commands and Recipes
- Pre-built commands: Explain Code, Generate Tests, Improve Code, Document Code
- Custom commands for team-specific workflows
- Context-aware refactoring across files
Tips for Best Results
- Use @-mentions to direct Cody to specific files or symbols for targeted questions
- Take advantage of multi-repo context for microservices architectures
- Use the "Explain Code" command when onboarding onto unfamiliar codebases
- Experiment with different LLM backends to find the best balance of speed and quality for your tasks
Pricing
| Plan | Price | Features |
|---|---|---|
| Free | $0 | Completions, chat, commands, community support |
| Pro | $9/month | Unlimited usage, advanced models, enhanced context |
| Enterprise | $19/user/month | Full code graph, multi-repo context, SSO, admin controls |
Try Cody
Ready for context-aware AI coding? Visit Cody's official website to install Cody for free, or view Cody details, alternatives & reviews for ratings, alternatives, and user reviews.
FAQs
What makes Cody different from GitHub Copilot?
Cody's key differentiator is deep codebase context. While Copilot primarily uses the open file and a few related files, Cody leverages Sourcegraph's code graph to understand your entire repository. This results in more accurate suggestions that correctly reference functions and types from other parts of your codebase.
Is Cody free?
Yes. The free plan includes completions, chat, and commands with generous limits. Pro ($9/month) unlocks unlimited usage and advanced models.
Can I choose which AI model Cody uses?
Yes. Cody supports multiple LLMs including Claude, GPT-4o, and Mixtral. You can switch models based on your task requirements.
Does Cody work with monorepos?
Yes. Cody is particularly strong with large codebases and monorepos, as Sourcegraph's indexing handles cross-repository context natively.
Related Articles
Last updated: February 2026
