Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Nudge AINew to Visual Studio Code? Get it now.
Nudge AI

Nudge AI

Traves Theberge

|
6 installs
| (0) | Free
Helps build detailed, context-rich prompts for AI from vague instructions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nudge VS Code Extension

Version License VS Code

Build detailed, context-rich prompts for AI from vague instructions


📚 Table of Contents

  • Overview
  • Features
    • Core Functionality
    • Context Management
    • Prompt Engineering & Templating
    • AI Interaction
    • User Interface
  • Installation
  • How to Use Nudge: A User's Guide
    • 1. Launching Nudge
    • 2. The AI Composer: Crafting Your Prompts
    • 3. Revisiting Interactions: Prompt History
    • 4. Customizing Nudge: The Settings Panel
  • Command Palette
  • Terms and Conditions

🔍 Overview

Nudge is a VS Code extension designed to help developers build detailed, context-rich prompts for AI from vague instructions. It allows users to incorporate various contextual elements like logs, files, and configurations into their prompts, manage these elements, and then send them to an AI model or use them with GitHub Copilot, Cursor and Windsurf.

Nudge aims to streamline the process of prompt engineering by providing a dedicated UI within VS Code, tight integration with the editing environment, and flexible templating options.


✨ Features

Nudge offers a comprehensive suite of features to enhance your AI-assisted development workflow:

Core Functionality

  • Versatile AI Model Support: Interact with a wide range of AI models from providers like OpenAI, Google (Gemini), Anthropic (Claude), and Grok (xAI) via the Vercel AI SDK.
  • Persistent History: Keep track of your past prompts and AI responses for easy review and reuse.
  • Secure API Key Management: API keys are stored securely using VS Code's built-in secret storage.
  • Token Estimation: Prompts are tokenized using gpt-tokenizer (suitable for GPT-3.5/4, good approximation for others) to provide accurate counts, helping you manage context size and model limits.

Context Management

  • Explicit Context Gathering: You have full control—add context elements to your prompt manually as needed.
  • Diverse Context Types: Incorporate a wide array of context sources (see Available Context Types for a full list).
  • Interactive Context Blocks: Context items are displayed as manageable blocks within the Nudge UI, allowing you to enable/disable, edit (where applicable), and remove them.
  • Drag and Drop: Easily add files as context by dragging them from VS Code's Explorer into the Nudge context area.

Prompt Engineering & Templating

  • Advanced Templating Engine: Utilizes Handlebars for dynamic and flexible prompt construction.
  • Built-in & Custom Templates: Start with pre-defined templates (Default, Debugger, Explainer, Refactorer) or create your own for specific needs.
  • Template Management: Create, edit, delete, import, and export your custom prompt templates through the settings UI.
  • Live Prompt Preview: See how your prompt will look in real-time as you add instructions and context.

AI Interaction

  • Send to AI: Directly send your composed prompt to the selected AI model.
  • Copy Prompt: Easily copy the generated prompt for use in other tools like GitHub Copilot or external AI chat interfaces.
  • Formatted AI Responses: AI responses are rendered as Markdown within the UI, with support for syntax highlighting in code blocks.
  • View Full Response: A modal viewer is available for lengthy AI responses.

User Interface

  • Integrated VS Code Experience: Nudge is presented as a dedicated view in the VS Code activity bar.
  • VS Code Native Look and Feel: The UI is built using the VS Code Webview UI Toolkit and styled to match your current VS Code theme.
  • Settings Panel: A dedicated panel for configuring API keys, default models, and managing prompt templates.
  • Dynamic UI Components: The interface includes features like dynamic population of AI models based on provider, client-side validation for API keys, and a modal-based template editor.

Installation

Install from Marketplace

After installation, configure your AI provider API keys in the Settings panel.

💡 How to Use Nudge: A User's Guide

Nudge empowers you to craft detailed and context-aware prompts for various AI models, all within your VS Code environment. Here's a step-by-step guide to leveraging its core features:

1. Launching Nudge

  • Click the Nudge icon (located in the VS Code Activity Bar) to open the main Nudge panel. This is where you'll interact with all of Nudge's features.

2. The AI Composer: Crafting Your Prompts

The Composer view is your primary workspace for building prompts. The typical workflow is as follows:

  • Write Your Instruction: In the "Instruction" field at the top of the Composer, type your core question, the task you want the AI to perform, or the initial idea you want to develop.
  • Add Context: This is a key strength of Nudge. Provide relevant information to the AI to improve the quality and relevance of its responses. You can:
    • From your Editor: Select code in your active editor and click the "Add Context..." button (or use a similar command). Nudge will capture the selected code, its file path, and language.
    • Terminal Output: Use the Nudge: Add Terminal Selection as Context command (accessible via the Command Palette, Ctrl+Shift+P or Cmd+Shift+P) to capture output from your integrated terminal.
    • Files: Drag and drop files directly from VS Code's Explorer into the Nudge context area. You can also use a dedicated button/command if available to add file contents.
    • Diagnostics: Incorporate errors and warnings from your current file or workspace.
    • User-Added Notes: Type or paste any other textual information directly into a "note" context block.
  • Manage Context Blocks: Each piece of context you add appears as an interactive block in the UI. You can:
    • Enable or disable individual blocks to selectively include them in the prompt.
    • Edit the content of note blocks.
    • Remove blocks you no longer need.
  • Select a Prompt Template:
    • From the "Template" dropdown menu, choose a suitable prompt template. Nudge comes with built-in templates (like "Default", "Debugger", "Explainer", "Refactorer") and allows you to create your own custom templates (see Settings).
    • Templates define the structure of the final prompt, arranging your instruction and context blocks in an optimal way for the AI.
  • Preview Your Prompt: As you add instructions, context, and select a template, Nudge displays a live preview of the fully constructed prompt. This allows you to see exactly what will be sent to the AI.
  • Check Token Count: Nudge provides an estimated token count for your prompt. Monitor this to stay within the token limits of your chosen AI model and manage costs.
  • Interact with the AI:
    • Send to AI: Click this button to submit the constructed prompt to your selected AI model. The AI's response will appear in the designated response area within the Nudge UI.
    • Copy Prompt: If you prefer to use the prompt in another application (like GitHub Copilot Chat, an online AI interface, or a different tool), click this button to copy the entire constructed prompt to your clipboard.
  • Work with AI Responses:
    • AI responses are rendered in Markdown format, with syntax highlighting for any code blocks included in the response.
    • You can easily copy the full response text or selected parts of it.
    • For very long responses, a "View Full Response" option may be available to see the content in a larger, scrollable view.

3. Revisiting Interactions: Prompt History

Nudge keeps a record of your past interactions (prompts sent and responses received), allowing you to review and reuse them.

  • Accessing History: Look for a "History" tab, button, or section within the Nudge panel.
  • Using History:
    • Browse through your list of previous interactions.
    • Click on an entry to view the details of the prompt you sent and the corresponding AI response.
    • Copy content from past prompts or responses for reuse in new interactions or elsewhere.

4. Customizing Nudge: The Settings Panel

The Settings Panel allows you to configure Nudge to your preferences, manage API keys, and organize your prompt templates.

  • Accessing Settings:
    • Run the Nudge: Open Settings command from the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
    • There might also be a dedicated settings icon (e.g., a cogwheel) within the Nudge UI.
  • API Key Management:
    • Securely enter and store your API keys for the various AI providers Nudge supports (e.g., OpenAI, Google AI Studio, Anthropic, Grok/xAI).
    • Nudge uses VS Code's built-in secretStorage to keep your API keys safe.
  • AI Model Preferences:
    • Select your preferred default AI models for each provider if the option is available.
  • Prompt Template Management: This is a powerful feature for tailoring Nudge to your specific workflows:
    • Create New Templates: Use the built-in Handlebars template editor to design new prompt templates. You can define placeholders for instructions, context blocks, and use Handlebars logic to structure the prompt.
    • Edit Existing Templates: Modify your custom templates at any time. The editor may provide helpers or a toolbar to easily insert common Handlebars variables.
    • Delete Templates: Remove custom templates that you no longer use.
    • Import/Export Templates: You can import and export your custom templates as JSON files. This is useful for backing up your templates or sharing them with team members.

By following this guide, you can effectively use Nudge to streamline your prompt engineering process, integrate diverse context, and generate high-quality AI responses directly within VS Code.


📜 Terms and Conditions

Last Updated: [2025/05/18]

This Nudge AI VS Code extension (the "Service") is provided as-is. Your use of the Service is entirely at your own discretion and risk.

Made with ❤️ by Traves Theberge

Follow on GitHub

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft