Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 894 Bytes

File metadata and controls

22 lines (15 loc) · 894 Bytes

Sourcegraph (Gemini CLI Extension)

Use this extension when you need to search code with Sourcegraph.

Tools provided by this extension:

  • nls_search: semantic search (natural language).
  • keyword_search: keyword/regex search (Sourcegraph query syntax).
  • read_file: fetch file contents (supports line ranges + revisions).
  • list_repos, list_files: discover repos/files before reading.
  • go_to_definition, find_references: basic code navigation.

Configuration:

  • SOURCEGRAPH_ENDPOINT: Base URL of your Sourcegraph instance.
  • SOURCEGRAPH_ACCESS_TOKEN: Access token used as Authorization: token ….

Guidelines:

  • Prefer narrow, targeted queries: use repo:, file:, lang:, type: where possible.
  • If results are too broad, add constraints (repo:, file:, count:) and retry.
  • When you need more context, use read_file for the specific file and revision.