[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"workflow-amp-by-sourcegraph-whole-repo-ai-coding-agent-bb158873":3,"seo:featured-workflow:bb158873-5e3a-4f74-be9b-5660b33303b9:fr":88,"workflow-related-amp-by-sourcegraph-whole-repo-ai-coding-agent-bb158873-bb158873-5e3a-4f74-be9b-5660b33303b9":89},{"id":4,"uuid":5,"slug":6,"title":7,"description":8,"author_id":9,"author_name":10,"author_avatar":11,"token_estimate":12,"time_saved":12,"model_used":13,"fork_count":12,"vote_count":12,"view_count":14,"parent_id":12,"parent_uuid":13,"lang_type":15,"steps":16,"files":23,"tags":24,"has_voted":30,"visibility":19,"share_token":13,"is_featured":12,"content_hash":31,"asset_kind":32,"target_tools":33,"install_mode":37,"entrypoint":20,"risk_profile":38,"dependencies":42,"verification":48,"agent_metadata":51,"agent_fit":63,"trust":75,"provenance":84,"created_at":86,"updated_at":87},2778,"bb158873-5e3a-4f74-be9b-5660b33303b9","amp-by-sourcegraph-whole-repo-ai-coding-agent","Amp by Sourcegraph — Whole-Repo AI Coding Agent","Sourcegraph's Amp reads the entire repo's symbol graph before editing. Symbol-aware retrieval, no hallucinated imports, type-respecting refactors.","9ad55b56-afc0-4c0a-a2c9-0eeae4f2b948","Sourcegraph","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3979584?v=4",0,"",9,"en",[17],{"id":18,"step_order":19,"title":20,"description":13,"prompt_template":21,"variables":13,"depends_on":22,"expected_output":13},3341,1,"Asset","## Quick Use\n\n1. Sign up at sourcegraph.com (free tier available)\n2. Install: `brew install sourcegraph\u002Famp\u002Famp`\n3. `amp auth login`, then `amp \"\u003Cyour task>\"` in any indexed repo\n\n---\n\n## Intro\n\nAmp is Sourcegraph's AI coding agent that reads the *whole* repo before it edits. Where Cursor and Claude Code rely on per-file context windows, Amp queries Sourcegraph's pre-indexed code graph — symbol references, type hierarchies, dependency maps — to ground every edit. Best for: monorepo refactors and codebases too large for any single context window. Works with: terminal CLI + VS Code extension + Sourcegraph web. Setup time: 5 minutes (Sourcegraph account + API token).\n\n---\n\n### What Amp does differently\n\nMost AI coding tools approximate \"see the whole codebase\" by stuffing files into the context window. Amp doesn't approximate — Sourcegraph already indexes your repo (symbols, references, types, history) and Amp queries that index.\n\nConcretely:\n- When you ask \"rename `getUser` to `fetchUser` everywhere\", Amp uses *symbol references*, not text search. No false positives in comments or strings.\n- When you ask \"where is this called\", Amp returns actual call sites from the graph, not regex matches.\n- When you ask for a refactor, Amp reads the type hierarchy first and proposes changes that respect interfaces and overrides.\n\n### CLI usage\n\n```bash\n# Install\nbrew install sourcegraph\u002Famp\u002Famp\n\n# Authenticate (opens browser)\namp auth login\n\n# Run a task in the current repo\namp \"Refactor the User type to add a 'plan' field. Update all call sites.\"\n\n# Run on a specific Sourcegraph-indexed repo (no need to clone)\namp --repo github.com\u002Fsourcegraph\u002Fsourcegraph \"List all uses of the deprecated AuthService\"\n```\n\n### Connect Amp to Claude Code or Cursor\n\nAmp ships an MCP server. Add to your MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"sourcegraph\": {\n      \"command\": \"amp\",\n      \"args\": [\"mcp\"],\n      \"env\": { \"SRC_ACCESS_TOKEN\": \"your-token\" }\n    }\n  }\n}\n```\n\nNow Claude Code \u002F Cursor \u002F Codex CLI can call `sourcegraph_search`, `sourcegraph_symbol_references`, `sourcegraph_blame` — using your repo graph as a tool.\n\n### When to choose Amp over Cursor \u002F Claude Code\n\n- Your codebase is >1M LOC and doesn't fit any context window\n- You need refactors that respect actual symbol references, not regex\n- You want consistent answers across teammates (everyone queries the same indexed graph)\n\n---\n\n### FAQ\n\n**Q: Is Amp free?**\nA: Sourcegraph offers a free tier with limited indexed repos. Pro plans (and the Amp coding agent itself) are subscription-based. Pricing on sourcegraph.com\u002Fpricing.\n\n**Q: Does Amp work without a Sourcegraph account?**\nA: No — Amp queries the Sourcegraph code graph, which requires Sourcegraph to index your repo. For single-repo work without indexing, Cursor or Claude Code is simpler.\n\n**Q: Can I use Amp on private repos?**\nA: Yes. Sourcegraph self-hosted and Sourcegraph Cloud both support private repos. Amp authenticates via SRC_ACCESS_TOKEN scoped to repos you have access to.\n\n---\n\n## Source & Thanks\n\n> Built by [Sourcegraph](https:\u002F\u002Fgithub.com\u002Fsourcegraph). Commercial product with free tier.\n>\n> [sourcegraph\u002Famp](https:\u002F\u002Fsourcegraph.com\u002Famp) — Sourcegraph code graph required\n\n---\n\n\u003C!-- ZH -->\n\n## 快速使用\n\n1. 在 sourcegraph.com 注册（有免费档）\n2. 装：`brew install sourcegraph\u002Famp\u002Famp`\n3. `amp auth login`，然后在已索引的仓库里跑 `amp \"\u003C你的任务>\"`\n\n---\n\n## 简介\n\nAmp 是 Sourcegraph 的 AI 编码 agent，编辑之前先读 *整个* 仓库。Cursor 和 Claude Code 靠单文件上下文窗口，Amp 查 Sourcegraph 预索引的代码图谱 —— 符号引用、类型层级、依赖关系 —— 给每次编辑做接地。适合 monorepo 重构和任何单上下文窗口装不下的代码库。兼容终端 CLI + VS Code 扩展 + Sourcegraph 网页版。装机时间 5 分钟（Sourcegraph 账号 + API token）。\n\n---\n\n### Amp 跟其他工具的根本区别\n\n多数 AI 编码工具靠\"把文件塞进上下文窗口\"来近似\"看到整个代码库\"。Amp 不近似 —— Sourcegraph 本身已经把你的仓库索引好了（符号、引用、类型、历史），Amp 直接查这个索引。\n\n具体说：\n- 你说\"把 `getUser` 重命名成 `fetchUser`\"，Amp 用 *符号引用*，不是文本搜索。注释和字符串里的 `getUser` 不会被误改。\n- 你问\"这个函数在哪被调用\"，Amp 从图谱返回真实调用点，不是 regex 匹配。\n- 你要求重构，Amp 先读类型层级再提改动，尊重接口和覆盖关系。\n\n### CLI 用法\n\n```bash\n# 装\nbrew install sourcegraph\u002Famp\u002Famp\n\n# 认证（弹浏览器）\namp auth login\n\n# 在当前仓库跑任务\namp \"Refactor the User type to add a 'plan' field. Update all call sites.\"\n\n# 在某个 Sourcegraph 已索引的仓库跑（不用 clone）\namp --repo github.com\u002Fsourcegraph\u002Fsourcegraph \"List all uses of the deprecated AuthService\"\n```\n\n### 把 Amp 接到 Claude Code 或 Cursor\n\nAmp 自带 MCP server。加到你的 MCP 配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"sourcegraph\": {\n      \"command\": \"amp\",\n      \"args\": [\"mcp\"],\n      \"env\": { \"SRC_ACCESS_TOKEN\": \"your-token\" }\n    }\n  }\n}\n```\n\n之后 Claude Code \u002F Cursor \u002F Codex CLI 就能调用 `sourcegraph_search` \u002F `sourcegraph_symbol_references` \u002F `sourcegraph_blame` —— 把你的仓库图谱当成工具用。\n\n### 什么时候选 Amp 而不是 Cursor \u002F Claude Code\n\n- 你的代码库 >100 万行，任何上下文窗口都装不下\n- 你需要尊重真实符号引用的重构，不是 regex\n- 你要团队成员答案一致（大家查同一个索引图谱）\n\n---\n\n### FAQ\n\n**Q: Amp 免费吗？**\nA: Sourcegraph 有免费档（限索引仓库数）。Pro 套餐和 Amp coding agent 是订阅制。价格见 sourcegraph.com\u002Fpricing。\n\n**Q: 没 Sourcegraph 账号能用 Amp 吗？**\nA: 不能。Amp 查的是 Sourcegraph 代码图谱，需要 Sourcegraph 先索引你的仓库。单仓库不需要索引时，Cursor \u002F Claude Code 更简单。\n\n**Q: 私有仓库能用 Amp 吗？**\nA: 可以。Sourcegraph 自托管和云版本都支持私有仓库。Amp 通过 SRC_ACCESS_TOKEN 鉴权，只能访问你有权限的仓库。\n\n---\n\n## 来源与感谢\n\n> Built by [Sourcegraph](https:\u002F\u002Fgithub.com\u002Fsourcegraph). Commercial product with free tier.\n>\n> [sourcegraph\u002Famp](https:\u002F\u002Fsourcegraph.com\u002Famp) — Sourcegraph code graph required\n","0",[],[25],{"id":26,"name":27,"slug":28,"icon":29},14,"CLI Tools","cli","🖥️",false,"12a5e52aa1719275038b21e38ee98ac6b88ebb74f674ef9e872fc0396e1d4e80","mcp_config",[34,35,36],"claude_code","codex","cursor","stage_only",{"executes_code":30,"modifies_global_config":39,"requires_secrets":40,"uses_absolute_paths":30,"network_access":30},true,[41],"SRC_ACCESS_TOKEN",{"npm":43,"pip":44,"brew":45,"system":47},[],[],[46],"sourcegraph\u002Famp\u002Famp",[],{"commands":49,"expected_files":50},[],[20],{"asset_kind":32,"target_tools":52,"install_mode":37,"entrypoint":20,"risk_profile":53,"dependencies":55,"content_hash":31,"verification":60,"inferred":39},[34,35,36],{"executes_code":30,"modifies_global_config":39,"requires_secrets":54,"uses_absolute_paths":30,"network_access":30},[41],{"npm":56,"pip":57,"brew":58,"system":59},[],[],[46],[],{"commands":61,"expected_files":62},[],[20],{"target":35,"score":64,"status":37,"policy":37,"why":65,"asset_kind":32,"install_mode":37},5,[66,67,68,69,70,71,72,73,74],"target_tools includes codex","asset_kind mcp_config","install_mode stage_only","policy stage_only","asset_kind mcp_config is not activated directly for Codex","install_mode is stage_only","risk_profile.modifies_global_config is true","risk_profile.requires_secrets is not empty","trust new",{"author_trust_level":76,"verified_publisher":30,"asset_signed_hash":31,"signature_status":77,"install_count":12,"report_count":12,"dangerous_capability_badges":78,"review_status":81,"signals":82},"new","hash_only",[32,79,80,37],"modifies_global_config","requires_secrets","unreviewed",[83],"content hash available",{"owner_uuid":9,"owner_name":10,"source_url":85,"content_hash":31,"visibility":19,"created_at":86,"updated_at":87},"https:\u002F\u002Ftokrepo.com\u002Fen\u002Fworkflows\u002Famp-by-sourcegraph-whole-repo-ai-coding-agent","2026-05-07 21:24:24","2026-05-14 10:45:10",null,[]]