This Visual Studio Code extension integrates Anthropic's Claude chat capabilities directly into your development environment, allowing you to interact with the Claude Sonnet AI model without leaving your editor.
- Seamless integration with VS Code's chat interface
- Direct communication with Anthropic's API
- Support for streaming responses
Before using this extension, you need to have an Anthropic API key. If you don't have one, you can obtain it from Anthropic's website.
- Install the extension from the VS Code marketplace or by searching for "Claude Chat" in the Extensions view.
- Reload VS Code after installation.
- Create a
.env
file in the root directory of your extension with your Anthropic API key:ANTHROPIC_API_KEY=your_api_key_here
- If you prefer not to use a
.env
file, the extension will prompt you to enter your API key when you first use it.
- Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
- Type "Claude Chat" and select it from the list.
- Type your question or prompt in the chat input.
- Claude's response will be streamed back to you in the chat window.
The extension currently uses the "claude-3-5-sonnet-20240620" model by default. You can change this in the src/extension.ts
file if you prefer a different model.
The extension includes basic error handling. If an error occurs, it will be displayed in the chat window and logged for debugging purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
This extension is not officially associated with Anthropic. It's an independent project that uses Anthropic's API.
If you encounter any issues or have questions, please open an issue on the GitHub repository.