# Cody — AI Coding Assistant by Sourcegraph > AI coding assistant with full codebase context. Cody searches your entire repo, reads relevant files, and answers questions or generates code with deep understanding. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use 1. Install the VS Code extension: Search "Cody" in Extensions 2. Sign in with Sourcegraph account (free tier available) 3. Start chatting about your codebase or use inline completions ## What is Cody? Cody is an AI coding assistant by Sourcegraph that has deep understanding of your entire codebase. Unlike simple autocomplete tools, Cody uses Sourcegraph's code intelligence to search across your whole repository, read relevant files, and provide answers grounded in your actual code — not generic patterns. **Answer-Ready**: Cody is Sourcegraph's AI coding assistant with full codebase context. It searches your entire repository using code intelligence, reads relevant files, and provides accurate answers and code generation grounded in your actual codebase. Works with Claude, GPT, and Gemini. **Best for**: Developers working on large codebases who need context-aware AI assistance. **Works with**: VS Code, JetBrains, Neovim, web. **Setup time**: Under 3 minutes. ## Core Features ### 1. Full Codebase Context Cody searches your entire repository to answer questions: ``` You: "How does authentication work in this project?" Cody: Searches repo → finds auth middleware, JWT config, user model → explains the full auth flow with file references ``` ### 2. Code Search Integration Powered by Sourcegraph's code intelligence: ``` You: "Where is the payment processing logic?" Cody: Found in 3 files: - src/services/payment.ts (main logic) - src/api/routes/checkout.ts (API endpoint) - src/workers/payment-processor.ts (async processing) ``` ### 3. Inline Completions Context-aware autocomplete as you type: ```typescript // Cody knows your project's patterns function createUser(data: CreateUserInput) { // Cody suggests based on your existing code patterns, // not generic boilerplate } ``` ### 4. Multi-Model Support | Model | Provider | |-------|----------| | Claude Sonnet/Opus | Anthropic | | GPT-4o | OpenAI | | Gemini 2.5 | Google | | Mixtral | Mistral | ### 5. Commands Built-in commands for common tasks: | Command | Action | |---------|--------| | `/explain` | Explain selected code | | `/edit` | Edit code with instructions | | `/test` | Generate unit tests | | `/doc` | Add documentation | | `/smell` | Find code smells | ### 6. Context Sources ``` Cody pulls context from: ├── Current file ├── Open files in editor ├── Repository-wide search ├── @-mentions (specific files/symbols) └── Sourcegraph code graph (enterprise) ``` ### 7. @-Mentions for Precise Context ``` You: @src/auth/middleware.ts explain the rate limiting logic You: @UserService how does user deletion cascade? ``` ## Cody Free vs Pro vs Enterprise | Feature | Free | Pro | Enterprise | |---------|------|-----|-----------| | Chat | Unlimited | Unlimited | Unlimited | | Autocomplete | 500/mo | Unlimited | Unlimited | | Models | Claude Sonnet | All models | All + custom | | Context | Local repo | Local repo | Multi-repo | ## FAQ **Q: How does Cody compare to GitHub Copilot?** A: Copilot focuses on inline completions. Cody adds full codebase search and chat with deep repo understanding. Cody also supports multiple LLM providers. **Q: Does my code leave my machine?** A: Chat queries are sent to LLM providers. Enterprise plan supports self-hosted deployment with no data leaving your network. **Q: Can it work with monorepos?** A: Yes, Sourcegraph's code intelligence is designed for large monorepos and multi-repo setups. ## Source & Thanks > Created by [Sourcegraph](https://github.com/sourcegraph). Licensed under Apache 2.0. > > [sourcegraph/cody](https://github.com/sourcegraph/cody) — 5k+ stars ## Quick Start Search "Cody" in the VS Code Extensions marketplace, install, and sign in with your Sourcegraph account. ## What is Cody? Cody is Sourcegraph's AI coding assistant. It searches the entire codebase using code intelligence and provides answers and code generation grounded in your actual code. **In one sentence**: Sourcegraph's AI coding assistant searches the whole codebase to give context-aware answers and code generation grounded in real code. **For**: Developers working in large codebases who need context-aware AI. **Supports**: VS Code, JetBrains, Neovim. ## Core Features ### 1. Full-Codebase Context Searches the entire repo to answer questions, citing specific files. ### 2. Code Search Integration Powered by Sourcegraph code intelligence. ### 3. Inline Completion Context-aware autocomplete based on project patterns. ### 4. Multi-Model Support Choose between Claude, GPT-4o, Gemini, and Mixtral. ### 5. @ Mentions Precisely pin files or symbols as context. ## FAQ **Q: How does it compare to GitHub Copilot?** A: Copilot focuses on completion; Cody adds full-repo search and deep conversation. **Q: Does it handle large repos?** A: Yes — Sourcegraph is designed for large monorepos and multi-repo setups. ## Source & Thanks > [sourcegraph/cody](https://github.com/sourcegraph/cody) — 5k+ stars, Apache 2.0 --- Source: https://tokrepo.com/en/workflows/cody-ai-coding-assistant-sourcegraph-9fc7d409 Author: Sourcegraph