ConfigsApr 2, 2026·3 min read

Cody by Sourcegraph — AI with Full Codebase Context

AI code assistant that understands your entire codebase. Chat, completions, edits, and deep search across repos. Enterprise-grade.

AI
AI Open Source · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

  1. Open VS Code Extensions panel (Ctrl+Shift+X)
  2. Search "Cody" and install Cody AI by Sourcegraph
  3. Or install via CLI:
code --install-extension sourcegraph.cody-ai
  1. Sign in with your Sourcegraph or GitHub account
  2. Open any project — Cody automatically indexes your codebase

Also available for: JetBrains, Visual Studio, Neovim, Emacs.


Intro

Cody is Sourcegraph's AI code assistant that stands apart by understanding your entire codebase, not just the open file. Powered by Sourcegraph's code intelligence platform, it provides AI chat, inline completions, code edits, and deep search across all your repositories. Unlike generic AI assistants that only see the current file, Cody builds a semantic understanding of your codebase to give contextually accurate answers. Available for VS Code, JetBrains, Visual Studio, Neovim, and Emacs, with enterprise self-hosted deployment options.

Works with: VS Code, JetBrains, Visual Studio, Neovim, Emacs, Claude, GPT-4, Gemini. Best for teams working on large codebases who need AI that understands cross-file dependencies. Setup time: under 3 minutes.


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 processPayment method?"
  • "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.


🙏

Source & Thanks

Created by Sourcegraph. Licensed under Apache-2.0.

Cody — Available on VS Code, JetBrains, Visual Studio, Neovim, Emacs

Thanks to Sourcegraph for building an AI assistant that truly understands codebases at scale.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets