# Atlas is taking you through this one.
# Free, and it runs right here. No signup.
$ learn Sourcegraph Cody
Learn Sourcegraph Cody in 5 minutes.
Cody is Sourcegraph's coding assistant, built on the code search engine that indexes huge codebases. You'll drill pulling the right context into chat with @-mentions, running inline edits, and using search-grounded answers to navigate unfamiliar code.
# 5 minutes, no install
# interactive, not a video
# Lesson not loading? Open it in a new tab. It is the same free lesson either way.
The answer is only as good as the context
Every assistant claims to know your codebase; Cody's bet is that finding the right code first, with a real search engine, beats guessing from whatever file is open. Using it well means learning to feed it.
Choose the context
In chat, @-mention files, symbols, or entire remote repositories to put them in front of the model. It's the difference between asking about your code and asking about code in general.
Grounded in the graph
Cody draws on Sourcegraph's code search and code graph, which can span many repositories. Answers cite real definitions and call sites, which makes them checkable instead of merely plausible.
Inline changes
Select code, describe the change, and Cody proposes a diff in place. Alongside it sit one-shot commands for the chores: generate a doc comment, write a unit test, explain what this does.
What you will do in the lesson
You answer and try things. Nobody demonstrates at you for five minutes.
- Ask a question two ways. You'll pose the same question with and without @-mentioned context and compare the answers. The gap is the whole lesson in one exercise.
- Navigate code you've never seen. Dropped into an unfamiliar codebase, you'll use Cody to find where a behavior lives and trace how it's wired, the daily reality of working on real teams.
- Verify a claim against the code. Cody says the function is only called in two places. You'll practice checking assertions like that instead of absorbing them.
- Run the chore commands. You'll generate a test and a doc comment for real code, then judge which parts you'd keep and which you'd rewrite.
- Make an inline edit safely. You'll describe a change to a selection, read the proposed diff properly, and decide whether it earns an accept.
Before you start
What makes Cody different from every other code chat?
The retrieval underneath it. Sourcegraph indexes code at the scale of thousands of repositories, and Cody uses that search and code graph to fetch context before answering. On small projects the difference is modest; on large or multi-repo codebases it's the entire point.
Does this lesson require installing Cody or a Sourcegraph account?
No. The lesson runs in the frame on this page with no install and no signup. The context-management skills it teaches apply to any assistant, with or without Cody.
Is Cody useful on a small codebase?
It works fine, but its advantage compresses. The search-backed context shines when relevant code is scattered somewhere you wouldn't think to look, which mostly happens at scale. For a weekend project, most assistants will feel similar; for a sprawling monorepo, they won't.
We already have GitHub Copilot at work. Where would Cody fit?
Copilot is strongest at completion in the file you're editing. Cody's strength is questions whose answers live across the codebase: where is this implemented, what would this change break, how do other services call this. Teams often run both, one for typing speed and one for codebase understanding.
Other tools people learn next
Same format, same five minutes, still free.
Learners from these organizations are already learning on 