How to Use Cody (Sourcegraph) in 2026: Step-by-Step Guide
Cody is Sourcegraph's AI coding assistant that uses your entire codebase as context to answer questions, write code, suggest fixes, and generate documentation. Unlike generic coding assistants, Cody reads across files, dependencies, and repository history to provide more accurate, repository-aware suggestions — available as a VS Code and JetBrains plugin.
Cody is Sourcegraph's AI coding assistant, built on top of the same code intelligence infrastructure that powers Sourcegraph's code search product. The core differentiator is context: while GitHub Copilot and similar tools work with a sliding window of nearby code, Cody can retrieve relevant context from across your entire repository -- reading symbol definitions, call sites, and type signatures from files that are not currently open.
This matters most in large codebases. If you are working in a 500,000-line monorepo and ask "how does the authentication middleware interact with the session manager?", Cody can pull the relevant code from wherever those components live rather than guessing from partial context. The answer accuracy difference between narrow-context and wide-context assistants is noticeable on any codebase larger than a few thousand lines.
Unlike most coding assistants that lock you to a single provider, Cody lets you choose your model. Free and Pro users can switch between Claude 3.5 Sonnet, GPT-4o, and Gemini 1.5 Pro during a session. Each handles different task types differently -- Claude tends to excel at explanation and refactoring, GPT-4o at quick autocomplete suggestions, Gemini at handling very long context windows. Having all three available is practically useful.
For privacy-conscious developers, Cody's Ollama integration lets you run against locally hosted models (Mistral, CodeLlama, DeepSeek Coder) with no data leaving your machine. This is a meaningful option for developers working with proprietary codebases who cannot accept cloud data processing.
Cody Enterprise is where the product diverges most sharply from GitHub Copilot. Enterprise deployments support bring-your-own-model (BYOM), meaning organizations can route Cody through their Azure OpenAI instance, their own Claude API contract, or other approved providers. Combined with Sourcegraph's on-premises deployment option, this makes Cody viable for financial services firms, government contractors, and healthcare organizations with strict data residency requirements.
The free tier covers 200 autocompletions per day and 10 chat messages, limited to Claude Haiku. The Pro tier at $9/month removes the daily caps and adds premium model access -- Claude 3.5 Sonnet, GPT-4o, Gemini 1.5 Pro -- plus higher rate limits. Enterprise pricing is custom, bundled with full Sourcegraph Code Search.
VS Code and JetBrains IDEs (IntelliJ IDEA, PyCharm, GoLand, WebStorm) are supported through dedicated extensions. A web interface is available at sourcegraph.com for code exploration without installing anything locally. Neovim and Emacs support is not available as of early 2026.
GitHub Copilot's integration with GitHub's pull request workflow and code review features is tighter -- for teams deeply embedded in the GitHub ecosystem, Copilot's workflow tooling is more developed. Cody's advantage is codebase context depth, model flexibility, and enterprise deployment options. For large-codebase environments or regulated-industry workloads, Cody is a credible alternative worth evaluating.
What You'll Need
- A Cody (Sourcegraph) account (free to create)
- A modern web browser or the Cody (Sourcegraph) app
- Payment method for paid features
Getting Started
Create Your Account
Visit https://sourcegraph.com/cody and sign up for a freemium account. You'll need an email address to register. A free tier is available — you can upgrade later for more features.
Start Your First Conversation
Once logged in, you'll see the main chat interface. Type a question or task in the input box and press Enter. Cody (Sourcegraph) supports text, code, file-upload — start with a simple text prompt to get familiar.
Natural Language Chat
Type your question or task in natural language. Cody (Sourcegraph) excels at understanding context and providing helpful, detailed responses.
Code Assistance
For coding help, paste your code or describe your problem: 'Here's my function, why isn't it working?' You can ask for explanations, debugging, or new code generation.
File and Document Analysis
You can upload documents, PDFs, images, or spreadsheets for Cody (Sourcegraph) to analyze. Ask questions about the content or request summaries.
Pro Tips
- Be specific: The more context you provide, the better the response. Instead of "write an email," try "write a professional follow-up email to a client who hasn't responded in two weeks."
- Iterate: If you don't get what you need, ask for clarification or refinement: "Make it shorter" or "Use a more formal tone."
- Use examples: Show Cody (Sourcegraph) what format you want by including an example in your prompt.
- Share context: When asking for code help, include your programming language, framework, and what you're trying to accomplish.
- Analyze documents: Upload PDFs, reports, or data files and ask specific questions about the content.
- Save useful conversations: Most platforms let you name and revisit conversations — organize by project or topic.
Common Use Cases
Programming & Code
AI assistants focused on writing, debugging, and explaining code across programming languages.
Browse Programming & Code chatbots →Productivity
AI tools for task management, scheduling, summarization, and workflow optimization.
Browse Productivity chatbots →Troubleshooting
- Responses seem generic or unhelpful
- Add more context to your prompt. Specify the audience, tone, length, and format you need. Try starting over with a clearer description of your goal.
- The tool isn't responding or is slow
- AI chatbots can experience high traffic. Refresh the page and try again. Check the service's status page if issues persist.
- Output is too long or too short
- Explicitly specify the length: "in 100 words," "as a brief summary," or "in detail with examples."
Get Weekly Chatbot Tips
Not sure which AI tool is right for you? Our newsletter covers reviews, tutorials, and comparisons weekly.
Frequently Asked Questions
- Is Cody (Sourcegraph) free to use?
- Cody (Sourcegraph) has a free tier. Paid plans start from $9/mo.
- Do I need an account to use Cody (Sourcegraph)?
- Yes, you need to create an account to use Cody (Sourcegraph).
- What can I use Cody (Sourcegraph) for?
- Cody is Sourcegraph's AI coding assistant that uses your entire codebase as context to answer questions, write code, suggest fixes, and generate documentation. Unlike generic coding assistants, Cody reads across files, dependencies, and repository history to provide more accurate, repository-aware suggestions — available as a VS Code and JetBrains plugin.
Related Guides
Know a tool we're missing? Submit it free →