Cody Features & Capabilities
Full Codebase Context
The key differentiator: Cody uses Sourcegraph's code graph to understand:
- Cross-file dependencies and imports
- Type definitions across the monorepo
- Historical changes and patterns
- Symbol references across repositories
This means Cody's answers reference actual code in your project, not generic examples.
AI Chat
Ask questions about your codebase in natural language:
- "How does the authentication flow work?"
- "What functions call the
processPaymentmethod?" - "Explain the database migration strategy"
- "Find all API endpoints that don't have rate limiting"
Cody pulls relevant code from across your repos to answer accurately.
Code Completions
Context-aware inline completions that understand:
- Your project's coding patterns and conventions
- Type definitions and interfaces
- Import graphs and module boundaries
- Test patterns in your codebase
Code Edits
Select code and ask Cody to:
- Refactor to a new pattern
- Add error handling
- Write tests for the selected function
- Migrate from one API to another
- Add TypeScript types
Deep Search
A dedicated search agent that:
- Analyzes your query to understand intent
- Searches across all connected repositories
- Finds relevant files, functions, and patterns
- Supports image analysis for UI-related queries
Customizable Prompts
Create reusable prompt templates for your team:
{
"commands": {
"review": {
"prompt": "Review this code for security issues, performance problems, and adherence to our style guide.",
"context": { "selection": true, "currentFile": true }
}
}
}Enterprise Features
- Self-hosted deployment — Run entirely on your infrastructure
- SSO/SAML — Enterprise authentication
- RBAC — Repository-level access control
- Audit logs — Track all AI interactions
- Custom models — Bring your own LLM
FAQ
Q: What is Sourcegraph Cody? A: Cody is an AI code assistant by Sourcegraph that understands your entire codebase using code intelligence, providing contextually accurate chat, completions, edits, and deep search across all your repositories.
Q: Is Cody free? A: Yes, Cody offers a generous free tier for individual developers. Enterprise plans with self-hosted deployment and advanced features are paid. The VS Code extension is free to install.
Q: How is Cody different from GitHub Copilot? A: Cody's key advantage is full codebase context via Sourcegraph's code graph. Copilot primarily uses the current file and open tabs. Cody can answer questions about code across your entire organization's repositories.