A Notepad++ plugin that integrates AI capabilities (ChatGPT, Claude, Gemini) directly into the editor.
- Dockable AI Chat Panel - Opens on the right side of Notepad++
- Multiple AI Providers - Support for OpenAI (ChatGPT), Anthropic (Claude), and Google (Gemini)
- Custom Endpoints - Use OpenRouter, local LLMs, or any OpenAI-compatible API
- Context-Aware - Automatically includes file content and selected text in prompts
- Apply AI Suggestions - Apply AI-generated code changes directly to your document
- Keyboard Shortcut -
Ctrl+Shift+Ato toggle the AI panel
- Installation
- Quick Start
- Usage
- Configuration
- Building from Source
- Troubleshooting
- Contributing
- License
- Download the latest release from Releases
- Extract the appropriate DLL for your Notepad++ version:
- 64-bit Notepad++: Use
notepad_aiplug_x64.dll - 32-bit Notepad++: Use
notepad_aiplug_x86.dll
- 64-bit Notepad++: Use
- Copy the DLL to your Notepad++ plugins folder:
%ProgramFiles%\Notepad++\plugins\notepad_aiplug\notepad_aiplug.dll - Restart Notepad++
- Configure your API keys in Plugins > AI Assistant > Settings
See Building from Source below.
- Open the AI Panel: Press
Ctrl+Shift+Aor go to Plugins > AI Assistant > Show AI Panel - Go to Plugins > AI Assistant > Settings and enter your API key
- Select a provider from the dropdown
- Type your question and press Send
- Press
Ctrl+Shift+A, or - Go to Plugins > AI Assistant > Show AI Panel
The panel will dock on the right side of Notepad++.
- Select a provider from the dropdown (ChatGPT, Claude, Gemini, or custom)
- Type your question in the prompt box at the bottom
- Click Send or press
Enter - View the AI response in the chat history
Check "Include file context" to send your current file to the AI:
| Selection State | What Gets Sent |
|---|---|
| Text selected | Only the selected text |
| No selection | Entire file content with file path and language |
This allows the AI to understand your code and provide relevant suggestions.
When the AI provides code:
- Click Apply to insert/replace code in your document
- If text was selected, it replaces the selection
- If no selection, it replaces the entire document
You can use any OpenAI-compatible API by setting a custom URL:
OpenRouter Example
- Provider: ChatGPT (OpenAI) - uses OpenAI API format
- API Key: Your OpenRouter API key (
sk-or-v1-...) - Custom URL:
https://openrouter.ai/api/v1/chat/completions
Local LLM Example (Ollama, LM Studio)
- Provider: ChatGPT (OpenAI)
- API Key:
not-needed(or leave empty if your server doesn't require it) - Custom URL:
http://localhost:11434/v1/chat/completions
- Open Settings
- Enter a new name in the Provider Name field
- Enter the API Key and Custom URL
- Click Add Provider
Custom providers appear in the dropdown alongside built-in providers.
Settings are stored in:
%APPDATA%\Notepad++\plugins\config\notepad_aiplug.ini
| Provider | Link |
|---|---|
| OpenAI (ChatGPT) | platform.openai.com/api-keys |
| Anthropic (Claude) | console.anthropic.com |
| Google (Gemini) | makersuite.google.com/app/apikey |
| OpenRouter | openrouter.ai/keys |
| Provider | Default URL |
|---|---|
| OpenAI | https://api.openai.com/v1/chat/completions |
| Claude | https://api.anthropic.com/v1/messages |
| Gemini | https://generativelanguage.googleapis.com/v1/models/{model}:generateContent |
- Visual Studio 2019 or 2022 with C++ Desktop Development workload
- Windows 10 SDK
# Clone the repository
git clone https://github.com/user/notepad_aiplug.git
cd notepad_aiplug
# Open solution in Visual Studio
start notepad_aiplug.sln- Select configuration:
- Release|x64 for 64-bit Notepad++
- Release|Win32 for 32-bit Notepad++
- Build the solution (
Ctrl+Shift+B) - Copy the output DLL:
- 32-bit:
bin\notepad_aiplug.dll - 64-bit:
bin64\notepad_aiplug.dll
- 32-bit:
notepad_aiplug/
├── src/
│ ├── PluginDefinition.cpp # Main plugin logic
│ ├── NppPluginDemo.cpp # DLL entry point
│ ├── DockingFeature/ # UI dialogs
│ │ ├── AIPanelDlg.* # AI chat panel
│ │ ├── SettingsDlg.* # Settings dialog
│ │ └── DiffViewDlg.* # Diff viewer
│ ├── AIProviders/ # AI provider implementations
│ │ ├── OpenAIProvider.* # ChatGPT / OpenAI-compatible
│ │ ├── ClaudeProvider.* # Claude
│ │ └── GeminiProvider.* # Gemini
│ ├── Http/
│ │ └── HttpClient.* # WinHTTP wrapper
│ └── Utils/
│ └── Config.* # Settings management
├── include/ # Notepad++/Scintilla headers
├── res/ # Dialog resources
├── lib/nlohmann/json.hpp # JSON library
├── vs.proj/ # Visual Studio project
└── notepad_aiplug.sln # Solution file
"API key not set" error
Go to Settings and enter your API key for the selected provider.
"HTTP error 401" (Unauthorized)
- Check that your API key is correct
- For OpenRouter: Make sure you're using the OpenRouter key, not an OpenAI key
"HTTP error 402" (Payment Required)
- Your API account needs credits
- For OpenRouter: Add credits at openrouter.ai/settings/credits
Custom endpoint not working
- Ensure the URL is correct and includes the full path (e.g.,
/v1/chat/completions) - Check that the endpoint uses OpenAI-compatible API format
Plugin not appearing in Notepad++
- Ensure the DLL is in the correct folder:
plugins\notepad_aiplug\notepad_aiplug.dll - Check that you're using the correct version (32-bit vs 64-bit)
- Restart Notepad++
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the GPL v2 License - see the LICENSE file for details.
Jiawei Qi - 2026
- Notepad++ Plugin Template
- nlohmann/json - JSON for Modern C++
