Enabling Cody with Sourcegraph.com
Learn how to connect and use Cody with the Sourcegraph instance.
Cody uses Sourcegraph to provide contextually relevant answers and code. To install and use Cody with your code editor or desktop app, you must connect it to your Sourcegraph.com account. For more advanced and customized usage, it's recommended to enable Cody for Enterprise.
- Create a Sourcegraph.com account
- Install the Cody VS Code extension
- Open the Cody extension
- Click on Other Sign In Options... and select Sign in to Sourcegraph.com
- Follow the prompts to authorize Cody to access your Sourcegraph.com account
You've now successfully connected Cody to your Sourcegraph.com instance.
Configure code graph context for code-aware answers
After connecting Cody to Sourcegraph.com, you can optionally use code graph context to improve Cody's context of existing code. Note that code graph context is only available for public repositories on sourcegraph.com, which have embeddings.
Enable code graph context
Cody: Codebase setting in VS Code enables codebase-aware answers for the Cody extension. Enter the repository's name with embeddings, and Cody can provide more accurate and relevant answers to your coding questions based on that repository's content. To configure this setting in VS Code:
- Open the Cody Extension Settings
- Search for the
- Enter the repository name
- For example:
Read more about Cody capabilities to learn about all the features it provides to boost your development productivity.
For more information on what to do next, we recommend the following resources: