> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weaveos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sourcegraph

> Track Sourcegraph (Cody) AI-assisted development via CSV upload

Connect [Sourcegraph](https://sourcegraph.com) to track your team's AI-assisted development activity. Weave ingests Sourcegraph usage via CSV upload. Amp is tracked separately, through [git attribution](/ai-tools/git-attribution).

## What's tracked

* **Usage activity** — engineers using Sourcegraph and their activity
* **Code generation** — AI-assisted code and lines generated
* **Cost tracking** — seat-based Sourcegraph cost

## Prerequisites

* A Sourcegraph subscription with access to usage exports
* Admin access to your Weave organization

## Setup

<Steps>
  <Step title="Export your Sourcegraph usage CSV">
    From your Sourcegraph admin tools, export the per-user usage report as a CSV.
  </Step>

  <Step title="Upload to Weave">
    Go to **Data** → **Sourcegraph** → **Upload** and upload the CSV. Weave parses it and attributes activity to your engineers.
  </Step>

  <Step title="Verify">
    Check that Sourcegraph activity appears in Weave's AI metrics.
  </Step>
</Steps>

## Metrics enabled

Once connected, you can track:

* **[AI code LOC](/metrics/ai-code-loc)** — Lines generated by Sourcegraph
* **[AI output percentage](/metrics/ai-output-percentage)** — Portion of output from Sourcegraph
* **[AI efficiency index](/metrics/ai-efficiency-index)** — Impact on productivity
* **[AI tool costs](/metrics/ai-tool-costs)** — seat-based Sourcegraph cost

## Cost tracking

The Sourcegraph usage CSV tracks activity, not dollar cost, so Sourcegraph cost is **seat-based**. Enter your Sourcegraph subscription in **Settings** → **Financial** → **Tool subscription costs** (seats × cost per user), and Weave allocates that flat cost across the engineers active in Sourcegraph during each period.

## Data privacy

Weave syncs only the aggregate usage metrics contained in the CSV you upload:

* Per-user usage and code-generation counts

**We never access:**

* Your source code content
* AI prompts or responses
* File names or project structure

## Related integrations

* [Cursor](/ai-tools/cursor) — AI IDE
* [Cline](/ai-tools/cline) — VS Code extension AI assistant
* [Claude Code](/ai-tools/claude-code) — CLI-based AI assistant


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.