{
  "markdown": "# sourcegraph\n\nGemini CLI extension for Sourcegraph — search, navigate, and understand any codebase without leaving your terminal.\n\n## What is Sourcegraph?\n\n[Sourcegraph](https://sourcegraph.com) is a code intelligence platform that lets you search and navigate across all your repositories at scale. It understands code structure (definitions, references, symbols) and provides powerful search across your entire codebase — including open source and private code.\n\nThis extension connects Gemini CLI to your Sourcegraph instance via the [official MCP server](https://sourcegraph.com/docs/api/mcp), giving Gemini's AI direct access to your code.\n\n## Installation\n\n> **Sourcegraph.com users:** No installation needed — Sourcegraph's MCP endpoint is already available at your instance.\n>\n> **Enterprise users:** Connect to your own instance at [sourcegraph.com/enterprise](https://sourcegraph.com/enterprise).\n\nTo install locally, run:\n\n```bash\ngemini extensions install https://github.com/erclm/sourcegraph-gemini\n```\n\nOr link a local clone for development:\n\n```bash\ngemini extensions link .\n```\n\nThen restart Gemini CLI.\n\n## Configuration\n\nOn install, Gemini CLI will prompt you for:\n\n- `SOURCEGRAPH_ENDPOINT` — your Sourcegraph instance URL (e.g. `https://sourcegraph.example.com`)\n- `SOURCEGRAPH_ACCESS_TOKEN` — a personal access token from your Sourcegraph account\n\n> Sourcegraph MCP is supported on Enterprise plans. If your instance supports OAuth dynamic client registration, you may not need a token.\n\n## Features\n\n- **MCP tools** (available to the AI automatically):\n  - `nls_search`, `keyword_search` — natural language and keyword search across repos\n  - `read_file`, `list_files`, `list_repos` — explore repositories and files\n  - `go_to_definition`, `find_references` — code navigation and symbol lookup\n- **Slash commands** (use directly in your prompt):\n  - `/sg:search <query>` — run a Sourcegraph search\n  - `/sg:file <repo> [rev] <path>` — open a specific file\n- **Bundled agent skill:** `searching-sourcegraph`\n\n## Example Prompts\n\nOnce installed, you can ask Gemini things like:\n\n### Understand a codebase fast\n\n> \"How does authentication work in `github.com/my-org/api`? Find the login flow and trace it through to token issuance.\"\n\n### Cross-repo impact analysis\n\n> \"Find all callers of `UserService.Delete` across my org's repos and tell me which ones don't handle the error.\"\n\n### Onboard to an unfamiliar service\n\n> \"I'm new to the `payments-service` repo. Walk me through the main request lifecycle and point me to the key files.\"\n\n### Find real-world usage examples\n\n> \"Show me examples of how `@sourcegraph/codeintellify` is used in open source projects.\"\n\n### Audit and security review\n\n> \"Search for any usage of `eval(` or `exec(` in the `backend` repo and summarize the risk.\"\n",
  "bytes": 2808,
  "sha": "cf4762b9ec2526e798275aeebd5a25f3fa949ec13205dd0bba99b9e38d057f12",
  "repo_slug": "sourcegraph-community/sourcegraph-gemini",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_sourcegraph_community_sourcegraph_gemini_bf23e1e9/readme"
}