Cody by Sourcegraph — AI with Full Codebase Context
AI code assistant that understands your entire codebase. Chat, completions, edits, and deep search across repos. Enterprise-grade.
Instalación con revisión previa
Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.
npx -y tokrepo@latest install c00d464a-5aa1-44be-a473-e96b0a3cd992 --target codexPrimero dry-run, confirma las escrituras y luego ejecuta este comando.
What it is
Cody is Sourcegraph's AI code assistant that differentiates itself by understanding your entire codebase, not just the open file. It uses Sourcegraph's code intelligence platform to build a semantic understanding of cross-file dependencies, function call chains, and project structure.
Cody is available as an extension for VS Code, JetBrains, Visual Studio, Neovim, and Emacs. It targets teams working on large codebases where generic AI assistants produce incomplete or incorrect answers because they lack project-wide context.
How it saves time or tokens
Most AI coding assistants only see the current file plus a few open tabs. When you ask about cross-file behavior (how a function is used across the codebase, what calls a specific API), they guess. Cody pulls relevant code from across your entire repository using Sourcegraph's indexing, giving the LLM the right context before it responds.
The token estimate for this workflow is approximately 1,453 tokens. By providing precise context rather than dumping entire files, Cody reduces both token usage and hallucination rates.
How to use
- Install the Cody extension:
# VS Code
code --install-extension sourcegraph.cody-ai
# Or search 'Cody' in the Extensions panel (Ctrl+Shift+X)
- Sign in with your Sourcegraph or GitHub account.
- Open any project. Cody automatically indexes your codebase and is ready for chat, completions, and inline edits.
Example
# In Cody chat within VS Code:
You: How is the `processPayment` function called across the codebase?
Cody: `processPayment` is called in 3 places:
1. `src/api/orders.ts:142` -- after order validation
2. `src/webhooks/stripe.ts:89` -- on payment intent confirmation
3. `tests/integration/payment.test.ts:45` -- test suite
The function accepts a PaymentIntent object and returns
a TransactionResult. The Stripe webhook path handles
retries via idempotency keys.
Cody also supports inline edits:
# Select code, press Ctrl+Shift+E, type instruction:
'Add error handling for the case where payment provider is unreachable'
Related on TokRepo
- AI Tools for Coding -- Compare Cody with other AI coding assistants
- AI Tools for Documentation -- Tools that help AI understand and generate code documentation
Common pitfalls
- Cody's full codebase context feature requires a Sourcegraph instance or Sourcegraph Cloud account. Without it, Cody falls back to local file context only.
- Enterprise self-hosted deployments need Sourcegraph running alongside Cody. The setup is more involved than a simple extension install.
- Free tier has usage limits on chat and completions. Check Sourcegraph's pricing page for current quota details.
Preguntas frecuentes
Copilot focuses on inline code completions using the current file and open tabs as context. Cody uses Sourcegraph's code graph to pull context from across your entire codebase, making it stronger for cross-file questions and large monorepos.
Yes. Cody works with any repository you have access to. For full codebase context, connect Cody to a Sourcegraph instance (cloud or self-hosted) that indexes your private repos.
Cody supports multiple LLM providers including Claude, GPT-4, and Gemini. Enterprise users can configure which models are available. The LLM handles generation while Sourcegraph handles context retrieval.
Cody has a free tier with limited chat and completion usage. Paid plans (Pro and Enterprise) increase quotas and add features like admin controls and SSO. Check sourcegraph.com for current pricing.
Yes. Cody has official support for VS Code, JetBrains IDEs, Visual Studio, Neovim, and Emacs. The Neovim plugin provides chat and completions with the same codebase context features.
Referencias (3)
- Sourcegraph Cody— Cody uses Sourcegraph code intelligence for full codebase context
- Cody GitHub Repository— Available for VS Code, JetBrains, Visual Studio, Neovim, and Emacs
- Sourcegraph Docs— Supports Claude, GPT-4, and Gemini as LLM providers
Relacionados en TokRepo
Fuente y agradecimientos
Created by Sourcegraph. Licensed under Apache-2.0.
Cody — Available on VS Code, JetBrains, Visual Studio, Neovim, Emacs
Thanks to Sourcegraph for building an AI assistant that truly understands codebases at scale.
Discusión
Activos relacionados
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.
Dioxus — Full-Stack App Framework for Web, Desktop, and Mobile
Dioxus is a full-stack app framework for Rust with a React-like API. Build web (WASM), desktop (native WebView), mobile (iOS/Android), TUI, and server-rendered apps from one codebase. Hooks, components, server functions, and hot reloading.
Bolt.new — AI Full-Stack Web App Generator
Prompt, run, edit, and deploy full-stack web apps in the browser. AI generates code, installs packages, runs dev server, and deploys — all from a chat interface. 16K+ stars.
Blitz.js — Full-Stack React Framework with Zero-API Layer
Blitz.js is a full-stack React framework built on Next.js that eliminates the need for a REST or GraphQL API by letting you import server code directly into your React components.