ClaudeCodeExtension
A Visual Studio .NET extension that provides a better interface for Claude Code CLI, OpenAI Codex, Cursor Agent, Opencode CLI and Qwen Code with support for multi-line prompts with image or file attachments for high productivity and vibe coding
Install / Use
/learn @dliedke/ClaudeCodeExtensionQuality Score
Category
Development & EngineeringSupported Platforms
README
Claude Code Extension for Visual Studio
A Visual Studio extension that provides seamless integration with Claude Code, OpenAI Codex, Cursor Agent, Qwen Code or Open Code directly within the Visual Studio IDE.
<center> <img src="https://i.ibb.co/mFcsh3nt/BFB9-B830-8122-4091-9-C8-B-869959-B1-B391.png" alt="Claude Code Extension Screenshot" width=350 height=450 /> </center>In case you enjoy this work and want to support it, you can buy me a coffee here: https://buymeacoffee.com/dliedke - every cup helps fuel development and keep the extension free for everyone!
Any feedback, suggestions, or contributions are also very welcome - feel free to post review here, open issues or submit pull requests in the GitHub repository.
Features
🎯 Integrated Terminal
- Embedded terminal within Visual Studio supporting multiple AI providers
- Automatic workspace directory detection when loading solutions
- Seamless command execution without leaving the IDE YES
🤖 Multiple AI Provider Support
- Claude Code: Full support for Claude Code CLI integration (Windows native)
- Claude Code (WSL): Support for Claude Code running inside WSL (Windows Subsystem for Linux)
- OpenAI Codex: Support for Codex AI assistant (Windows native)
- OpenAI Codex (WSL): Support for Codex AI assistant running inside WSL
- Cursor Agent: Support for Cursor Agent CLI integration (Windows native)
- Cursor Agent (WSL): Support for Cursor Agent running inside WSL
- Qwen Code: Support for Qwen Code AI assistant (requires Node.js 20+)
- Open Code: Support for Open Code AI assistant (requires Node.js 14+)
- Provider Switching: Easy dropdown menu to switch between providers
- Smart Detection: Automatic detection and installation instructions for each AI tool
- Claude Model Selection: Quick model switching for Claude Code (Opus, Sonnet, Haiku) with dropdown menu. For Opus also possible to select low, medium, high thinking modes
⌨️ Smart Send Controls
- Send with Enter: Toggle between Enter-to-send and manual send modes
- Shift+Enter or Ctrl+Enter: Create new lines when Send with Enter is enabled
- Manual Send Button: Appears when Send with Enter is disabled
📋 Editor Selection to Prompt
- Toolbar Button: Click the 📋 button to grab the currently selected code from the active editor and insert it into the prompt
- Editor Context Menu: Right-click on selected code in the editor and choose "Send Selection to Claude Code"
- Formatted Snippet: Code is inserted with file path, line numbers, and syntax-highlighted code fence (e.g., ```csharp)
- Non-Destructive: Code is inserted into the prompt without sending — type your question or instruction first, then send
- Relative Paths: File paths are automatically made relative to the current workspace/solution directory
🖼️ File Attachment Support
- Clipboard Paste: Use Ctrl+V to paste images from clipboard in the prompt area (text content like Excel cells will paste as text)
- File Browser: Click "Add File" to select files from file system (no limit)
- Supported File Types: Images, PDFs, documents (Word, text), spreadsheets (Excel, CSV), data files (JSON, XML, YAML), code files, and more
- File Chips: Visual representation of attached files with remove functionality
- Clickable Chips: Click on file chips to open and view files
- Smart Paste: Excel cells and other text content paste as text, not images
📝 Prompt History
- Smart History: Automatically saves up to 50 most recent prompts
- Quick Navigation: Use Ctrl+Up/Ctrl+Down to browse through previous prompts
- Clear Option: Right-click in prompt area to clear history
- Persistent Storage: History saved between Visual Studio sessions
🔧 Workspace Intelligence
- Solution Detection: Automatically detects and switches to solution directory
- Dynamic Updates: Terminal restarts when switching between solutions
- Fallback Handling: Smart directory resolution when no solution is open
💾 Persistent Settings
- JSON Configuration: Settings stored in
%LocalAppData%\..\Local\ClaudeCodeExtension\claudecode-settings.json - Send with Enter State: Remembers your preferred input mode
- Splitter Position: Maintains your preferred layout between sessions
- AI Provider Selection: Remembers your preferred AI assistant
- Claude Model Selection: Remembers your last selected Claude model (Opus, Sonnet, or Haiku)
- Claude Skip Permissions State: Remembers whether Claude Code starts with
--dangerously-skip-permissions - Codex Full Auto State: Remembers whether Codex starts with
--full-auto
🔍 Zoom Support
- Prompt Zoom: Ctrl+Scroll on the prompt text box to increase/decrease font size (range 8–24pt), persisted across sessions
- Terminal Zoom: Ctrl+Scroll on the terminal area to zoom in/out, zoom level persisted and replayed on restart (works for both Command Prompt and Windows Terminal)
🪟 Detach / Attach Terminal
- Detach: Click the detach button to pop the terminal out into a separate Visual Studio tool window tab
- Attach: Close the detached tab or click the attach button to bring the terminal back to the main panel
- Expanded Prompt: When detached, the prompt area automatically grows for more comfortable editing
- Persistent State: Detached/attached state is saved and restored across Visual Studio sessions
- Seamless Operation: Terminal restart, provider switching, and theme changes work while detached
🎨 Visual Studio Integration
- Dark/Light Theme: Consistent with Visual Studio's dark/light theme
- Resizable Layout: Adjustable splitter between prompt and terminal areas
- Native Controls: Follows Visual Studio UI conventions
- Dynamic Titles: Window title changes based on selected AI provider
System Requirements
- Visual Studio 2022 or 2026 (x64 and ARM64 supported)
- Windows operating system
- For Claude Code (Windows): Claude Pro or better paid subscription + Claude Code CLI installed and accessible via
claudein path. Refer to https://docs.claude.com/en/docs/claude-code/setup for Claude Code installation - For Claude Code (WSL): Claude Pro or better paid subscription + Windows Subsystem for Linux (WSL) + Claude Code CLI installed inside WSL Installation instructions are provided automatically if not installed
- For OpenAI Codex (Windows): Chat GPT Plus or better paid subscription + Codex CLI installed and accessible via
codexin path. Installation instructions are provided automatically if not installed Optional: Use--full-autoflag for automated approval mode via the extension settings menu - For OpenAI Codex (WSL): Chat GPT Plus or better paid subscription + Windows Subsystem for Linux (WSL) + Codex AI assistant installed inside WSL
Installation instructions are provided automatically if not installed
Optional: Use
--full-autoflag for automated approval mode via the extension settings menu - For Cursor Agent (Windows): Cursor Agent CLI installed and accessible via
agentin path. Installation instructions are provided automatically if not installed - For Cursor Agent (WSL): Windows Subsystem for Linux (WSL) + Cursor Agent installed inside WSL Installation instructions are provided automatically if not installed
- For Qwen Code: Node.js version 20 or higher + Qwen Code CLI installed and accessible via
qwenin path. Installation instructions are provided automatically if not installed - For Open Code: Node.js version 14 or higher + Open Code CLI installed and accessible via
opencodein path. Installation instructions are provided automatically if not installed
Installing Windows Terminal (Optional)
Windows Terminal provides better emoji, Unicode, and ANSI rendering compared to Command Prompt.
To install, open Command Prompt as Administrator and run:
winget install --id Microsoft.WindowsTerminal -e
After installing, restart Visual Studio. Then select Windows Terminal via the ⚙ menu → Set Terminal Type....
Installation
- Download the latest VSIX package
- Double-click the VSIX file to install
- Restart Visual Studio
- Open the extension via View → Other Windows → Claude Code Extension
If the terminal opens in a separate window instead of inside the extension: Open Windows Settings, search for "Terminal settings", and set the Terminal option to "Windows Console Host".
Quick Start
- First-Time Setup: Verify that your preferred AI provider (Claude Code, Claude Code WSL, OpenAI Codex, Cursor Agent, Cursor Agent WSL, or Qwen Code) is installed and accessible
- Open the Tool Window: View → Other Windows → Claude Code Extension
- Select an AI Provider: Click the ⚙ (gear) button and choose among Claude Code, Claude Code (WSL), Codex, Cursor Agent, Cursor Agent (WSL), Qwen Code, or Open Code
- Connect to Provider: If you use Open Code, press Ctrl+P, search for "connect providers", and complete the authentication flow
- Select a Claude Model: Click the 🤖 (robot) button to choose Opus, Sonnet, or Haiku (available only when Claude Code is selected)
- Start a Session: Enter your prompt and press Enter
- Attach Files: Use Ctrl+V to paste or click the "Add File" button
- Customize: Toggle "Send with Enter" and adjust the layout as needed
Usage
- Open the Tool Window: Navigate to View → Other Windows → Claude Code Extension
- Select an AI Provider: Click the ⚙ (gear) button and choose your preferred assistant
- Enter Prompts: Type your questions or requests in the prompt area
- Attach Files: Paste images/text with Ctrl+V or use the "Add File" button to attach up to five files
- Send Messages: Press Enter (if enabled) or click the Send button
- Review Responses: Read
