The AI that knows your entire codebase

https://about.sourcegraph.com/cody

We’re working to bring you Cody where you need it most

Step 1: Sign up

Sign up for a Sourcegraph.com account.

Step 2: Install Cody app

The app is a free, lightweight, native desktop version of Sourcegraph that connects your local code to our AI coding assistant, Cody.

!right-arrow.svg Private or broken link
The page you're looking for is either not available or private!

Step 3: Install IDE extension

VS Code extension IntelliJ extensionNeovimComing soon!EmacsComing soon!

Get Cody where you work

Cody for Enterprise provides context-aware answers based on your own private codebase. Contact us through the form to learn more.

https://storage.googleapis.com/sourcegraph-assets/cody/website_june2023/cody_explain_June23.mp4

Code explanation

Cody can explain what code is doing—at a high level or in detail. Highlight any code block or an entire file and Cody will explain what’s happening in conversational language.

Code smells

Cody can act as a pair programmer and analyze code blocks for code smells, potential bugs, and unhandled errors. Cody will point out issues in selected code such as magic numbers, unhandled edge cases, or unclear variables names, with suggestions to fix those issues.

Summarize recent code changes

Cody is able to reference recent diffs to tell you about recent changes to your code. Cody can generate summaries of changes to an entire repository over the last day or week or summarize the changes specific to a selected file.

Debugging assistance

Cody can help you debug and improve your code. Pass in a code snippet to the Cody chat and request a specific fix—such as handing for a new edge case—and Cody will provide a rewritten code suggestion.

Translate language

Cody translates selected between programming languages. You can feed code snippets to Cody—for example, a certain function—and Cody can translate that code, providing you with a code snippet of another language with the same functionality.

Code navigation

Cody can help you find functions & components from around your codebase. Ask Cody where a certain component is defined—such as a webapp navbar, or an API schema—and Cody will point you to the file where it lives.

Reference tracking

Cody knows where all your functions are referenced throughout your code. Ask Cody to find where a specific function is referenced and it will give you the main files where it’s referenced.

AI-generated code

Cody uses knowledge of your codebase to write and fix code. Generate everything from boilerplate code to API resolvers that rely on the context and style of your codebase. You can even ask Cody to fix code blocks for errors, readability, or unhandled edge cases, and Cody will make changes directly in your working file.

https://storage.googleapis.com/sourcegraph-assets/cody/website_june2023/cody_inline_June23.mp4

Unit tests

Cody writes unit tests for you, saving you time and letting you stay focused on building software. Highlight a code block and trigger the Generate a unit test recipe; Cody will write a unit test ready to be pasted into your code.

Code completions

Cody can suggest code while you code. Start writing code and Cody will suggest the next few lines for you. Choose to accept it, or open the command palette and click Cody: View Suggestions to see various code snippets Cody suggests using.

Inline code fixes

Cody edits and improves code directly using inline instructions. Simply type what you want Cody to do above or below a block of Cody and hit the Fixup hotkey; Cody will directly edit that code within your editor, saving you the need to copy and paste code from the chat.

Documentation generation

Cody can read and understand your code, which means it can also write documentation for you. Highlight a snippet of code—for example, a function or class—and Cody can generate a docstring for it.

Code generation

Cody generates new code on request via the chat. You can ask Cody to write boilerplate code, API calls, or even specific code based on your instruction and requirements.