How to install and use Sourcegraph Cody in VS Code: sign in, autocomplete, codebase chat
Install Cody, sign in to Enterprise, accept your first ghost-text completion, then ask a read-only repo question in Chat.
To use Sourcegraph Cody in VS Code for completions and codebase chat, finish four jobs: install Cody AI, sign in to your Enterprise instance, accept an inline suggestion with Tab, then ask a contextual question in Chat.
Facts follow sourcegraph.com/docs/cody/clients/install-vscode and Quickstart. Queries: Cody VS Code install, Sourcegraph Cody sign in. Cody Free/Pro ended July 23, 2025—Enterprise is the supported path in current docs. For a short huddle see sitdraw and create and join a room.
Autocomplete vs Chat
Inline autocomplete
Ghost-text completions from surrounding context—press Tab to accept.
Chat with @ context
Mention files with @-file and symbols with @#; Enterprise deployments can lean on Sourcegraph search for broader repo context.
| Goal | Entry | First-hour check |
|---|---|---|
| Install | Extensions → Cody AI | Cody icon in Activity Bar |
| Sign in | Enterprise instance URL + token | Panel connected, no auth errors |
| Autocomplete | Type a function header | Ghost text → Tab |
| Codebase Q&A | Alt+L with @ chips | Read-only question about callers |
Install, sign in, complete, chat
- 01Install the extension
Extensions → search Cody AI (Sourcegraph) → Install → Reload. Quick Open:
ext install sourcegraph.cody-ai. - 02Sign in to Sourcegraph
Cody panel → Sign In to Your Enterprise Instance → create an Access Token on the instance → Sign In to Sourcegraph Instances v5.1 and above → Authorize in the browser. No Enterprise access? Ask your admin—Free/Pro signup is closed.
- 03Verify autocomplete
New
code.js, typefunction bubbleSort(array) {}per Quickstart. Accept gray inline text with Tab. - 04Chat with codebase context
Alt+L, keep default @ repo/file chips, add
@-fileor@#symbol, ask a read-only question before using Apply or Alt+K edits.
# First hour · Sourcegraph Cody · VS Code · 2026-09
# Cody AI (sourcegraph.cody-ai) → Enterprise URL + token
# bubbleSort skeleton → Tab on ghost text
# Chat: Alt+L · @-file · @#symbol
# sourcegraph.com/docs/cody/clients/install-vscode
# Free/Pro sunset 2025-07-23- Can I still use Cody Free?
- No—Free/Pro access ended July 23, 2025. Enterprise (or documented URL+token flows for forks) is required in current docs.
- Sign-in stuck spinning?
- Try manual URL + access token; check Output → Cody by Sourcegraph. See FAQ for antivirus/OAuth interference.
- Compare Codeium or Cline?
- Cody targets Sourcegraph Enterprise context; see our Codeium guide and Cline guide.
- Whiteboard replacement?
- No—open sitdraw for diagrams.
Tab first, then Chat
Confirm ghost completions before applying large Chat diffs.