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

# VS Code Setup

> Install and configure Sparkle in VS Code.

Install the Sparkle Guardrails extension in VS Code to apply security guardrails on every AI prompt.

## Prerequisites

* [VS Code](https://code.visualstudio.com) installed on your machine
* A Sparkle account (sign in after installation)

## Install from the marketplace

<Steps>
  <Step title="Open the Extensions panel">
    Press **Cmd+Shift+X** (Mac) or **Ctrl+Shift+X** (Windows/Linux), or click the Extensions icon in the activity bar.
  </Step>

  <Step title="Search for Sparkle Guardrails">
    Search for **Sparkle Guardrails** or `thesparkle.sparkle-guardrails`.
  </Step>

  <Step title="Install the extension">
    Select **Sparkle Guardrails** published by **thesparkle**, then click **Install**.
  </Step>
</Steps>

## Install from a VSIX file

If the extension does not appear in the marketplace, install it manually from [Extensions Marketplace](https://marketplace.visualstudio.com/items?itemName=TheSparkle.sparkle-guardrails).

<Steps>
  <Step title="Download the VSIX file">
    Open [Sparkle Guardrails on VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=TheSparkle.sparkle-guardrails) and download the `.vsix` file.
  </Step>

  <Step title="Install from VSIX">
    Open the Command Palette (**Cmd+Shift+P** or **Ctrl+Shift+P**), run **Extensions: Install from VSIX...**, and select the downloaded file.
  </Step>

  <Step title="Reload VS Code">
    Reload the window if prompted.
  </Step>
</Steps>

<Note>
  If a marketplace download saves without a `.vsix` extension, rename the file to end in `.vsix` before installing.
</Note>

You can also install from the terminal:

```bash theme={null}
code --install-extension /path/to/thesparkle.sparkle-guardrails.vsix
```

## Sign in

After installation, open the Sparkle sidebar in VS Code and complete the sign-in flow with your Sparkle account.

## Verify installation

<Steps>
  <Step title="Confirm the extension is enabled">
    In the Extensions panel, confirm **Sparkle Guardrails** appears under **Installed**.
  </Step>

  <Step title="Open a project">
    Open the repository you want to protect with Sparkle.
  </Step>

  <Step title="Run a prompt">
    Use your AI coding features in that project. Sparkle applies guardrails on every prompt.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Using the Extension" href="/extension/usage" icon="plug">
    Learn the basic extension workflow.
  </Card>

  <Card title="Troubleshooting" href="/help/troubleshooting" icon="wrench">
    Fix common installation and connection issues.
  </Card>
</CardGroup>
