Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • How to videos
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
    • Releases
  1. Docs
  2. cody

Cody

Cody is an AI coding assistant that helps you understand, write, and fix code faster. It uses advanced search to pull context from both local and remote codebases so that you can use context about APIs, symbols, and usage patterns from across your entire codebase.

Cody connects seamlessly with codehosts like GitHub, GitLab and IDEs like VS Code and JetBrains. Once connected, Cody acts as your personal AI coding assistant, equipped with the following three crucial elements:

  1. The ability to search your entire codebase for context
  2. Vast knowledge of open source code
  3. Extensive training data for code understanding and problem-solving

Getting started

You can start using Cody with one of the following clients:

VS Code

Cody for VS Code!

Install Cody's free extension for VS Code.

JetBrains

Cody for JetBrains

Install Cody's free and open source extension for JetBrains.

Cody Web

Cody for Web

Use Cody in the Sourcegraph web app.

Cody Enterprise

Cody Enterprise

Get in touch with our team to try Cody for Sourcegraph Enterprise.

Main features

Cody's main features include:

FeatureDescription
AutocompleteCody makes context-based code autocompletions. Cody can autocomplete single lines or whole functions in any programming language, configuration file, or documentation
ChatAsk Cody questions about code in the chat view, and it will use Sourcegraph’s code graph to answer using knowledge of your codebase
Prompts & CommandsCody offers quick ready-to-use prompts for common actions, such as adding code documentation, generating unit tests, and detecting code smells
Debug codeCody can debug your code in the editor and also helps you identify code smells
Cody Context FiltersCody can ignore selected repositories from chat and autocomplete results

What data is collected and how is it used?

Cody collects and uses data in the following ways:

  • Prompts and responses: When you use Cody, Sourcegraph collects your prompts and responses to provide the service. For individuals using Cody via Sourcegraph.com, Sourcegraph may use your prompts and responses to enhance the user experience, but Sourcegraph does not use any of your data to train models.
  • Usage data and feedback: Sourcegraph also collects usage data and feedback to improve the user experience.
Read more about Cody Usage and Privacy policy here →

Compatible with Sourcegraph products

Cody is compatible to use with the other Sourcegraph products, like Code Search. You can use Cody's chat to ask questions about your codebase. When you run any search query and open a repository or file, you’ll find an Ask Cody button that takes you to Cody’s chat interface that you can use to ask questions about the codebase.

Read more in the Cody FAQs to learn more about such queries →

Join our community

If you have any questions regarding Cody, you can always ask our community, Discord, or create a post on X.

Next
Quickstart

On this page

  1. Cody

    1. Getting started
    1. Main features
    1. What data is collected and how is it used?
    1. Compatible with Sourcegraph products
    1. Join our community

Edit this page on GitHub
Questions? Give us feedback