NppAIAssistant is built for quick, explicit, editor-side AI assistance inside Notepad++.
Best fit scenarios:
- explain selected code
- refactor a selected block
- add comments to selected code
- fix a selected block
- ask one-off implementation questions in the AI panel
It is intentionally not designed as a long-memory chat workspace. Each request is treated as independent.
- Build the plugin DLL.
- Create this folder if it does not exist:
<Notepad++>\plugins\NppAIAssistant\ - Copy:
NppAIAssistant.dll - Restart Notepad++.
You can also use:
scripts/install-npp-ai-plugin.ps1
Default script assumptions:
- Notepad++ is installed in
C:\Program Files\Notepad++ - the built DLL is in the repo
build/output tree
- Open the plugin settings.
- Enter an API key for OpenAI, Gemini, or Claude.
- Choose the default provider.
- Click
Test Default Connection. - Confirm models are loaded dynamically for that provider.
- Choose the UI language if needed.
- API keys and OAuth tokens are stored in
%LocalAppData%\Notepad++\AIAssistant. - Secret values are protected with Windows DPAPI.
- Non-secret preferences are stored in
%AppData%\Notepad++\plugins\config\NppAIAssistant.ini. - Older roaming secure blobs are migrated automatically on first launch of the updated build.
The settings window includes a single-turn prompt builder.
You can control:
- preset
- response language
- encoding suggestion
- response detail
- scenario modules
- output rules
The prompt preview updates as these options change.
Current presets are designed for fast one-off tasks:
- Custom
- Code Fix
- Refactor
- Explain Code
- Generate Tests
- Write Docs
These presets do not add hidden memory. They only reshape the prompt for the current request.
The Prompt Preview area shows the effective prompt structure that will be sent for a request.
What it helps with:
- checking whether the language is correct
- checking whether output should be concise or detailed
- checking whether the prompt is optimized for fix, refactor, tests, or docs
- understanding what the plugin is really sending
This plugin is intentionally single-turn.
That means:
- no long-running hidden memory
- each request stands on its own
- safer and easier prompt inspection
- easier to predict why a response was generated
After selecting text in Notepad++, you can use the AI context menu actions:
- AI: Explain Selection
- AI: Refactor Selection
- AI: Add Comments
- AI: Fix Selection
These actions are optimized for fast in-editor use.
- Open the AI panel.
- Pick provider and model.
- Type a request.
- Send.
- Review the formatted response.
If Ctrl+Enter mode is enabled, plain Enter will no longer send directly.
Models are loaded dynamically after the relevant provider is configured and available. This helps avoid stale hardcoded model lists and makes the plugin better aligned with the actual provider account state.
If you are preparing screenshots or a short demo:
- Show the settings dialog with prompt preview
- Show preset switching
- Show the right-click AI actions
- Show a single request in the AI panel
- Highlight that the system is lightweight and single-turn