> For the complete documentation index, see [llms.txt](https://docs.lilypad.tech/lilypad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lilypad.tech/lilypad/tooling-plugins-and-integrations/integrations/vs-code-helper-extension.md).

# VS Code Helper Extension

The **Lilypad VS Code Extension** allows developers to interact with the Lilypad Anura API within Visual Studio Code. By highlighting code blocks, users can query the available LLMs on Lilypad  for explanations, improvements, or suggestions, receiving responses in a formatted webview panel.

<figure><img src="/files/mxhLBwTC9BLN7Q0OWSHl" alt=""><figcaption><p>VS Code extension in action</p></figcaption></figure>

### Features

* **AI-Powered Code Assistance** – Select any code in your editor, choose an AI model, and ask Lilypad questions about it
* **Formatted Responses** – View AI-generated insights in a structured webview panel
* **Secure API Configuration** – Store your Lilypad API token securely
* **Context Menu Integration** – Quickly access the extension’s features via the right-click menu

### Installation

From the Repository

1. Get [Anura API key](https://anura.lilypad.tech/).
2. Clone the repo: `git clone git@github.com:PBillingsby/lilypad-vscode-extension.git`
3. Install the extension in VS Code: `code --install-extension lilypad-vscode-extension.vsix`
4. Add Anura API key to `.env`:  `LILYPAD_API_TOKEN=<ANURA_API_KEY>`
5. If you make changes to the extension and need to recompile it:
   1. Recompile the code: `npm run compile`
   2. Repackage the extension: `vsce package`
   3. Reinstall the updated `.vsix` file: `code --install-extension lilypad-vscode-extension.vsix`

### **Usage**

1. **Select a block of code** in your editor.
2. **Right-click** and select **"Ask Lilypad about this code"**, or:
   * Open the **Command Palette** (`Ctrl+Shift+P`) and select **"Ask Lilypad about this code"**.
3. **Choose an AI model** to process the query.
4. **Enter your question** related to the selected code.
5. **Wait for Lilypad AI** to process your query.
6. **View the AI’s response** in the webview panel that opens.

<figure><img src="/files/sgxSVFHFdLBkUeavUc4l" alt=""><figcaption><p>Example use</p></figcaption></figure>

### Resources

* [Source code](https://github.com/PBillingsby/lilypad-vscode-extension)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lilypad.tech/lilypad/tooling-plugins-and-integrations/integrations/vs-code-helper-extension.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
