> ## 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.

# Cline

> Connect Cline to track AI-assisted code generation

Connect Cline to track AI-assisted code generation, task completion, and development productivity across your team.

## What's tracked

* **Code generation** — AI-generated code from Cline sessions
* **Task metrics** — Tasks completed with Cline assistance
* **Session activity** — Usage frequency and duration
* **Tool selection** — Which AI models and features are used

## Prerequisites

* Cline VS Code extension installed
* Active Cline account (individual or enterprise)
* For remote config: Cline enterprise organization

## Setup

Cline can be connected to Weave using OpenTelemetry. Choose the method that works best for your team:

### Option 1: Environment variables (Recommended for individuals)

Best for individual developers or small teams.

<Steps>
  <Step title="Create an API key">
    Go to **Data** → **Cline** → **Connect** and create a new API key
  </Step>

  <Step title="Copy the environment variables">
    Copy or download the environment variables shown in the configuration modal
  </Step>

  <Step title="Add to your shell profile">
    Add the environment variables to your shell profile. The generated configuration includes Cline-specific variables:

    **For Zsh (macOS default):**

    ```bash theme={null}
    echo 'export CLINE_OTEL_TELEMETRY_ENABLED="true"' >> ~/.zshrc
    echo 'export CLINE_OTEL_LOGS_EXPORTER="otlp"' >> ~/.zshrc
    echo 'export CLINE_OTEL_METRICS_EXPORTER="otlp"' >> ~/.zshrc
    echo 'export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL="..."' >> ~/.zshrc
    echo 'export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT="..."' >> ~/.zshrc
    echo 'export CLINE_OTEL_EXPORTER_OTLP_HEADERS="x-weave-token=..."' >> ~/.zshrc
    source ~/.zshrc
    ```

    **For Bash:**

    ```bash theme={null}
    echo 'export CLINE_OTEL_TELEMETRY_ENABLED="true"' >> ~/.bashrc
    echo 'export CLINE_OTEL_LOGS_EXPORTER="otlp"' >> ~/.bashrc
    echo 'export CLINE_OTEL_METRICS_EXPORTER="otlp"' >> ~/.bashrc
    echo 'export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL="..."' >> ~/.bashrc
    echo 'export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT="..."' >> ~/.bashrc
    echo 'export CLINE_OTEL_EXPORTER_OTLP_HEADERS="x-weave-token=..."' >> ~/.bashrc
    source ~/.bashrc
    ```

    Replace the `...` values with those from the configuration modal. The exact values are pre-filled when you copy from Weave.
  </Step>

  <Step title="Restart VS Code">
    Restart VS Code to apply the environment variables
  </Step>

  <Step title="Verify connection">
    Use Cline and check that activity appears in Weave after a few minutes
  </Step>
</Steps>

### Option 2: Remote configuration (For Cline Enterprise)

Best for organizations using Cline's enterprise features. This method doesn't require individual developers to set environment variables.

<Steps>
  <Step title="Create an API key in Weave">
    Go to **Data** → **Cline** → **Connect** and create a new API key
  </Step>

  <Step title="Open Cline's organization settings">
    Sign in to your Cline organization at [app.cline.bot](https://app.cline.bot) and go to **Organization Settings** → **OpenTelemetry**
  </Step>

  <Step title="Configure OpenTelemetry">
    Enter the following settings:

    * **Enable OpenTelemetry**: Enabled
    * **Metrics exporter / Logs exporter**: `otlp`
    * **Protocol**: Use the value shown in Weave's configuration modal (either `http/json` or `http/protobuf`)
    * **OTLP endpoint**: Copy from Weave's configuration modal
    * **Headers**: Add `x-weave-token` with your API key value
  </Step>

  <Step title="Save your settings">
    All organization members will automatically use this configuration when they're logged into their Cline account
  </Step>

  <Step title="Verify connection">
    Have team members use Cline and verify activity appears in Weave
  </Step>
</Steps>

<Note>
  Remote Configuration is a Cline enterprise feature. Users must be logged into their Cline organization account for this to work.
</Note>

## Metrics enabled

Once connected, you can track:

* **[AI code LOC](/metrics/ai-code-loc)** — Lines generated by Cline
* **[AI output percentage](/metrics/ai-output-percentage)** — Portion of output from Cline
* **[AI efficiency index](/metrics/ai-efficiency-index)** — Impact on productivity

## Cost tracking

Cline's OpenTelemetry stream reports activity but **not** dollar cost, so Weave does not pull per-token Cline spend. Cline also has no entry under **Settings** → **Financial** → **Tool subscription costs**, so Weave doesn't currently report a Cline cost.

If your team runs Cline against your own model API keys, the underlying model spend shows up under that provider's integration (for example, [OpenAI](/ai-tools/codex#openai-direct-api-usage)) rather than under Cline.

## Sync frequency

Cline data syncs in real-time via OpenTelemetry when the extension is active.

## Troubleshooting

<AccordionGroup>
  <Accordion icon="plug" title="Environment variables not working">
    If Cline data isn't syncing with environment variables:

    1. Verify environment variables are set correctly (`echo $CLINE_OTEL_EXPORTER_OTLP_ENDPOINT`)
    2. Ensure you restarted VS Code after setting variables
    3. Check that Cline extension is up to date
    4. Try setting variables in a `.env` file in your workspace
    5. Verify the API key is valid in Weave settings
  </Accordion>

  <Accordion icon="building" title="Remote configuration not working">
    If enterprise remote config isn't syncing:

    1. Verify users are logged into their Cline organization account
    2. Check that OpenTelemetry is enabled in organization settings
    3. Ensure the OTLP endpoint URL is correct
    4. Verify the `x-weave-token` header is set properly
    5. Check Cline organization logs for connection errors
  </Accordion>

  <Accordion icon="chart-line" title="No data appearing in Weave">
    If Cline activity isn't tracked:

    1. Wait 5-10 minutes after first Cline usage
    2. Verify Cline extension is actively being used
    3. Check that OpenTelemetry is configured correctly
    4. Ensure network access to Weave's OTLP endpoint
    5. Review browser console for connection errors
  </Accordion>

  <Accordion icon="code" title="Code attribution missing">
    If generated code isn't attributed to Cline:

    1. Ensure code changes are being committed to git
    2. Verify git repositories are connected to Weave
    3. Check that commit metadata includes Cline information
    4. Review Cline settings for telemetry options
  </Accordion>
</AccordionGroup>

## Configuration comparison

| Feature | Environment Variables | Remote Configuration |
| - | - | - |
| **Setup complexity** | Individual setup required | Centralized setup |
| **Best for** | Small teams, individuals | Enterprise organizations |
| **User login required** | No | Yes (Cline organization) |
| **Maintenance** | Each developer manages their own | Admin manages centrally |
| **Cline version** | Free or Enterprise | Enterprise only |

## Data privacy

Weave syncs usage metadata and prompt content from Cline:

* Usage frequency
* Code generation statistics
* Model usage (which AI models are used)
* User prompt text from AI-assisted commits (used for activity classification)

**We never access:**

* Source code content or diffs
* Cline's responses
* File paths or project structure

## Related integrations

* [Cursor](/ai-tools/cursor) — AI IDE alternative
* [Windsurf](/ai-tools/windsurf) — AI IDE alternative
* [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.