What Is Sourcegraph Cody?Sourcegraph Cody 是什么?
Cody is an AI coding assistant that answers questions, generates and edits code, writes tests and documentation, and completes code — with its context retrieved from Sourcegraph's indexed codebase rather than assembled from the open file alone. That architecture is the whole point: where a typical IDE assistant sees the current project, Cody can pull definitions, usages, patterns and related files from anywhere in the organisation's repositories, which is why it is strongest on questions like 'how does authentication flow across our services' or 'where is this endpoint consumed'. A second, rarer property is verifiability: Cody shows exactly which files and code ranges informed an answer, so its reasoning can be checked rather than trusted. It runs in VS Code and JetBrains IDEs, on the web and via CLI, across multiple model providers (per third-party coverage, including Claude, GPT and Gemini families, varying by deployment), and it requires a Sourcegraph instance for full value — indexing setup is the price of admission, and per one enterprise comparison the chat UI's @-mention selection is capped at 10 repositories per query. For a privacy-first enterprise assistant with an air-gapped option, see Tabnine; for an IDE-native agent, see Cursor.Cody 是 AI 编程助手:回答问题、生成与编辑代码、写测试与文档、补全代码——上下文来自 Sourcegraph 已索引的代码库,而不是只从当前打开的文件拼凑。这个架构就是它的全部意义:一般 IDE 助手只看到当前项目,Cody 能从组织各仓库里拉定义、调用、模式与相关文件,所以最擅长“认证流程如何跨服务走”“这个接口在哪被消费”这类问题。第二个少见属性是可验证:Cody 会展示哪些文件与代码范围支撑了答案,推理可查、不用盲信。它跑在 VS Code 与 JetBrains IDE、网页与 CLI 上,跨多个模型厂商(按第三方报道,含 Claude、GPT、Gemini 系列,随部署而异);要发挥全部价值必须有 Sourcegraph 实例——索引搭建就是入场费,且按一家企业级对比,聊天 @ 提及单次查询上限为 10 个仓库。要隐私优先、带完全离线选项的企业助手,见 Tabnine;要 IDE 原生 Agent,见 Cursor。
Verdict: Cody is now a platform purchase, not a developer purchase. If your organisation already runs Sourcegraph and its engineers lose hours onboarding onto multi-repo codebases, Cody Enterprise is the assistant that answers from the same index your teams already search — buy it as part of the platform renewal, and prove it on one legacy codebase before rolling it out. If you are an individual developer, or a team without Sourcegraph, Cody is not an option in 2026 at any price: Amp is Sourcegraph's path for you, and Cursor or Copilot are the IDE-native alternatives. The $9 Pro price in old roundups is a trap — it buys nothing today.
实在的结论:Cody 现在是一笔平台采购,不是开发者个人采购。如果你的组织已经在跑 Sourcegraph、工程师又在多仓库代码库上手时耗费大量时间,Cody 企业版就是用同一套索引回答问题的助手——把它当作平台续约的一部分买,先拿一个遗留代码库验证再推广。如果你是个人开发者,或没有 Sourcegraph 的团队,2026 年 Cody 在任何价格上都不是选项:Amp 才是 Sourcegraph 给你的路,Cursor 或 Copilot 是 IDE 原生的替代。旧横评里的 $9 Pro 价是个陷阱——今天它什么都买不到。
— 中国吧 AI Tools Hub Editorial Team
Who Should Use It?谁适合用?
✓ Good Fit For适合以下场景
- Enterprises already running Sourcegraph with multi-repo codebases已跑 Sourcegraph、多仓库代码库的企业
- Teams onboarding onto large, undocumented legacy codebases要上手大型无文档遗留代码库的团队
- Organisations that need answers traceable to cited files要求答案可追溯到引用文件的组织
✕ Not Ideal For不适合以下场景
- Individual developers — Free and Pro are discontinued个人开发者——免费档与 Pro 已停售
- Teams without a Sourcegraph instance没有 Sourcegraph 实例的团队
- Anyone who wants fluid autocomplete above codebase answers把流畅补全看得比代码库问答更重的人
Getting Started快速开始
1. Confirm you are a Cody Enterprise customer or will buy Sourcegraph Enterprise1. 先确认你是 Cody 企业版客户、或将采购 Sourcegraph 企业版2. Index one legacy codebase, then ask cross-service questions and check cited files2. 索引一个遗留代码库,问跨服务问题、核对引用文件3. Get the platform quote in writing — no public list price exists to budget from3. 拿书面平台报价——没有公开挂牌价可供预算Key Features核心功能
- Whole-Codebase Indexing, Not Just the Open File全代码库索引,不只当前文件 — Answers and edits draw on definitions, usages and patterns from across the organisation's repositories.问答与编辑取材于组织各仓库的定义、调用与模式,不只当前文件。
- Verifiable Context: See the Files Behind the Answer可验证的上下文:看到答案背后的文件 — Cody shows which files and code ranges informed an answer, so reasoning can be checked.Cody 展示哪些文件与代码范围支撑了答案,推理可以核查。
- Chat, Autocomplete, Edits, Tests and Docs聊天、补全、编辑、测试与文档 — Code chat, inline completion, edits, test generation and documentation from the same indexed context.代码聊天、行内补全、编辑、测试生成与文档,都用同一套索引上下文。
- Enterprise Deployment and Controls企业部署与管控 — Dedicated cloud or self-hosted Sourcegraph, SSO/SAML, RBAC for code access, and admin controls per third-party coverage.专属云或自托管 Sourcegraph、SSO/SAML、代码访问 RBAC 与管理管控(按第三方报道)。
- IDE, Web and CLI SurfacesIDE、网页与 CLI 入口 — VS Code and JetBrains plugins, web access and CLI, across multiple model providers by deployment.VS Code 与 JetBrains 插件、网页与 CLI,模型厂商随部署而异。
Pros & Cons优缺点
✓ Pros优点
- Deepest codebase context in the category, for multi-repo organisations同类里最深的代码库上下文,面向多仓库组织
- Answers cite their sources, so they can be verified答案标明来源,可以核查
- Enterprise deployment, SSO and access controls for regulated teams企业部署、SSO 与访问管控,适合受监管团队
- Existing Enterprise customers are unaffected and remain supported现有企业客户不受影响、继续受支持
✕ Cons缺点
- Free and Pro discontinued in July 2025 — no individual route remains免费档与 Pro 于 2025-07 停售——个人路线已不存在
- No public list price for Cody AI; third-party $49 vs $59 figures conflictCody AI 无公开挂牌价;第三方 $49 与 $59 口径冲突
- Requires a Sourcegraph instance and indexing setup for full value要发挥全部价值,必须有 Sourcegraph 实例与索引搭建
- Completion is rated less fluid than Cursor or Copilot in comparisons对比中补全流畅度被评为不如 Cursor 或 Copilot
Use Cases应用场景
Popular ways people use it.常见用法:
🧭 Onboard Onto a Legacy Monolith上手遗留单体系统
Generate documentation for an aging codebase and answer architecture questions from the index.为老化代码库生成文档,从索引里回答架构问题。
🔀 Trace a Change Across Services追踪一次改动跨服务的影响
Find where an endpoint is consumed and what breaks if a shared library changes.找到接口在哪被消费、共享库一改会坏什么。
🧪 Tests and Docs Grounded in Real Code扎根真实代码的测试与文档
Generate tests and docs that reference the actual conventions of the codebase, not generic patterns.生成引用代码库真实约定的测试与文档,而不是通用模式。
🏛️ Regulated Codebases With Access Control受监管、有访问管控的代码库
Keep code intelligence inside the organisation's own Sourcegraph deployment, with RBAC on who sees what.把代码智能留在组织自己的 Sourcegraph 部署里,凭 RBAC 控制谁能看到什么。
Similar AI Tools相似 AI 工具
Related pages on this site: Tabnine for a privacy-first enterprise assistant with air-gapped deployment, Cursor for an IDE-native agent, and ChatGPT for general-purpose assistance. If you are an individual developer, Amp — not Cody — is Sourcegraph's current path, and it is not covered as a Cody plan on this page.本站相关页:Tabnine(隐私优先、带完全离线部署的企业助手)、Cursor(IDE 原生 Agent)与 ChatGPT(通用助手)。如果你是个人开发者,Amp——而不是 Cody——才是 Sourcegraph 当前的路,本页不把它当作 Cody 的档位介绍。