mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Engel Nyst <engel.nyst@gmail.com> Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2.4 KiB
2.4 KiB
OpenHands VS Code Extension
The official OpenHands companion extension for Visual Studio Code.
This extension seamlessly integrates OpenHands into your VSCode workflow, allowing you to start coding sessions with your AI agent directly from your editor.
Features
- Start a New Conversation: Launch OpenHands in a new terminal with a single command.
- Use Your Current File: Automatically send the content of your active file to OpenHands to start a task.
- Use a Selection: Send only the highlighted text from your editor to OpenHands for focused tasks.
- Safe Terminal Management: The extension intelligently reuses idle terminals or creates new ones, ensuring it never interrupts an active process.
- Automatic Virtual Environment Detection: Finds and uses your project's Python virtual environment (
.venv,venv, etc.) automatically.
How to Use
You can access the extension's commands in two ways:
-
Command Palette:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P). - Type
OpenHandsto see the available commands. - Select the command you want to run.
- Open the Command Palette (
-
Editor Context Menu:
- Right-click anywhere in your text editor.
- The OpenHands commands will appear in the context menu.
Installation
For the best experience, the OpenHands CLI will attempt to install the extension for you automatically the first time you run it inside VSCode.
If you need to install it manually:
- Download the latest
.vsixfile from the GitHub Releases page. - In VSCode, open the Command Palette (
Ctrl+Shift+P). - Run the "Extensions: Install from VSIX..." command.
- Select the
.vsixfile you downloaded.
Requirements
- OpenHands CLI: You must have
openhandsinstalled and available in your system's PATH. - VS Code: Version 1.98.2 or newer.
- Shell: For the best terminal reuse experience, a shell with Shell Integration is recommended (e.g., modern versions of bash, zsh, PowerShell, or fish).
Contributing
We welcome contributions! If you're interested in developing the extension, please see the DEVELOPMENT.md file in our source repository for instructions on how to get started.
