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

# VS Code - Cline AI

> Set up the Cline AI coding assistant in Visual Studio Code with AGCloud models.

## What is Cline AI?

Cline AI is an open-source Visual Studio Code extension that pairs large language models with an “interpreter” workflow. It can read your workspace, draft code edits, run tasks in the integrated terminal, and ask for confirmation before applying changes. When paired with AGCloud models, it gives you a secure copilot that stays inside your local editor.

## Features

<CardGroup cols={2}>
  <Card title="Explain Code" color="#1D4ED8" icon="book-open">
    Highlight a file or snippet and run `Cline: Explain Selection` to receive a structured explanation with follow-up questions.
  </Card>

  <Card title="Implement Tasks" color="#15803D" icon="hammer">
    Create a TODO comment or describe a feature in the Command Palette. Cline plans steps, drafts edits, and asks before applying patches.
  </Card>

  <Card title="Run Tests" color="#C2410C" icon="gauge">
    Ask Cline to execute your existing test scripts. It streams terminal output back into the conversation for quick debugging loops.
  </Card>

  <Card title="Document Changes" color="#7E22CE" icon="note">
    Generate changelog entries, commit messages, or inline documentation after a session to keep reviewers in the loop.
  </Card>
</CardGroup>

## Prerequisites

* Visual Studio Code 1.85 or later
* Node.js 18+ (required for the Cline CLI helper)
* An [**AGCloud**](https://developer.aiandgpu.com/) account with an active API key
* Internet access from Visual Studio Code to reach AGCloud endpoints

## Step 1: Install the Cline Extension

1. Open Visual Studio Code.
2. Press `Ctrl+Shift+X` (`Cmd+Shift+X` on macOS) to open the Extensions view.
3. Search for **“Cline AI”** and install the extension published by `cline`.
4. Reload Visual Studio Code if prompted.

<img src="https://mintcdn.com/yvshun-470c5ffb/SDox_AjBKiC93der/images/cline/step-1.png?fit=max&auto=format&n=SDox_AjBKiC93der&q=85&s=86a6f5767391fabfd6baca4f3248c400" style={{ width: "100%", height: "auto"}} width="940" height="668" data-path="images/cline/step-1.png" />

## Step 2: Initialize Cline in a Workspace

1. Open the project folder you want Cline to assist with.
2. Launch the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and select `Cline: Initialize`.
3. Select `OpenAI Compatible` API Provider.
4. Input `https://aiandgpu.com/v1` to Base URL.
5. Paste your **API Key** where generated in [**AGCloud Dashboard**](https://developer.aiandgpu.com).
6. Input `Model ID` you want to use. See all models in `https://aiandgpu.com/v1/models`

<Note>Need additional models? Browse the catalog at [https://aiandgpu.com/v1/models](https://aiandgpu.com/v1/models) and update the `model` field accordingly.</Note>

<img src="https://mintcdn.com/yvshun-470c5ffb/SDox_AjBKiC93der/images/cline/step-2.png?fit=max&auto=format&n=SDox_AjBKiC93der&q=85&s=0d20e0521f95642f6367dbe7e3905e80" style={{ width: "100%", height: "auto"}} width="2150" height="1456" data-path="images/cline/step-2.png" />

## Step 3: Start Chat

1. **Plan** mode: Only inputting the analysis and solution, along with the specific implementation steps, is allowed; it cannot help you modify the files.
2. **Act** mode(**Recommended**): It can directly help you create, modify, delete files, execute terminal command like `npm install` etc.

<img src="https://mintcdn.com/yvshun-470c5ffb/SDox_AjBKiC93der/images/cline/step-3.png?fit=max&auto=format&n=SDox_AjBKiC93der&q=85&s=90a9a5a3e743edbd138058c620008c7b" style={{ width: "100%", height: "auto"}} width="962" height="942" data-path="images/cline/step-3.png" />
