Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>TreeSnipNew to Visual Studio Code? Get it now.
TreeSnip

TreeSnip

bleugreen labs

|
586 installs
| (0) | Free
gpt-powered, codebase-aware coding assistant
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

treesnip

treesnip is a vscode extension that harnesses the power of GPT-4 for software development. It provides a codebase-aware coding assistant that helps developers with code optimization, testing, and more.

(primarily focused on TypeScript at the moment but I plan on adding more languages)

Features

  • GPT-4 powered coding assistant
  • Codebase-aware suggestions and optimizations
  • Integrated chat interface for seamless interaction with the assistant
  • Minification and context-aware code snippets
    • will package snippet and dependencies mentioned into a streamlined prompt
  • Edit and enable/disable messages in the chat
    • Prompt length management
    • Few-shot prompting
  • Manage and store all conversations locally on a per-workspace scope
    • Build your dataset
    • Resume stored conversations any time

Usage

treesnip provides several context menu commands that can be accessed by right-clicking on the code in the editor. These commands allow you to interact with the assistant and perform various actions.

Context Menu Commands

  • Open Chat for Snippet: Right-click on a selected code snippet in the editor and choose "Open Chat for Snippet" to start a chat with the TreeSnip assistant specifically for the selected code and its dependencies. The assistant will provide suggestions and optimizations based on the selected code.

  • Open Help Chat: Right-click anywhere in the editor and choose "Open Help Chat" to start a help chat with the TreeSnip assistant. The assistant will provide general help and guidance based on the current workspace.

  • Build Tests for File: Right-click anywhere in the editor and choose "Build Tests for File" to generate comprehensive test cases for the current code file.

  • Minify Selection: Right-click on a selected code snippet in the editor and choose "Minify Selection" to minify the selected code. The assistant will optimize the code by removing unnecessary whitespace.

Opening a Chat

You can also open a chat with the assistant using the following commands (Cmd+shift+P &) :

  • treesnip.chat.free: Open a new freeform chat
  • treesnip.chat.snippet: Open a chat for a selected code snippet
  • treesnip.chat.help: Open a help chat
  • treesnip.chat.test: Build tests for a file

These commands can be accessed through the command palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) or by clicking the corresponding icons in the TreeSnip view in the Explorer sidebar.


Configuration

You can configure TreeSnip through the vscode settings. The available settings are:

  • treesnip.projectDescription: A brief description of your project
  • treesnip.language: The primary programming language for your project (TypeScript, JavaScript, Python, or C++)
  • treesnip.testingSuite: The testing suite you want to use for your project
  • treesnip.ignores: A list of directories to ignore for semantic search
  • treesnip.additionalDetails: Any additional details that will help TreeSnip generate more accurate code snippets

Requirements

  • Visual Studio Code version 1.58.0 or later
  • An OpenAI API key

Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
  3. Search for "TreeSnip" and install it.
  4. Reload Visual Studio Code.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft