Skip to content

viditraj/NppCopilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NppCopilot — AI Copilot for Notepad++

PyPI version Python 3.10+ License: MIT

AI capabilities for Notepad++ — but for everyone, not just coders.

NppCopilot brings AI-powered intelligence directly into Notepad++ (and any text editor). Semantic search, auto-summarization, smart tagging, TODO extraction, related note discovery, and a chat interface that understands all your notes — powered by local AI, no cloud required.

NppCopilot in action


Why NppCopilot?

VS Code has Copilot. JetBrains has AI Assistant. Obsidian has plugins. But Notepad++ — used by millions of sysadmins, writers, students, analysts, and developers — has nothing.

NppCopilot changes that.

What you do today What NppCopilot does
Ctrl+F to find text in notes Semantic search: find notes by meaning, not keywords
Manually organize folders AI organizer: auto-suggests structure, finds duplicates
Re-read old notes to remember Ask AI: "What did I write about the auth bug?"
Forget action items TODO extractor: finds all action items across all notes
Notes pile up, untagged Auto-tagger: reads content, suggests tags
Long notes are hard to skim Summarizer: TL;DR in one click
Notes are isolated islands Note linker: discovers connections you missed

Quick Start

# Install
pip install nppcopilot

# Point it at your notes
nppcopilot init "C:\Program Files\Notepad++"

# Index all your notes (builds semantic search index)
nppcopilot index

# Search by meaning, not just keywords
nppcopilot search "that meeting about the product launch"

# Ask questions about your notes
nppcopilot ask "what are my open action items this week?"

# Summarize a long note
nppcopilot summarize meeting-2026-03-15.md

# Extract all TODOs across all notes
nppcopilot todos

# Auto-tag a note
nppcopilot tag meeting-2026-03-15.md

# Find related notes
nppcopilot related project-ideas.md

# Start the engine server (for Notepad++ plugin)
nppcopilot serve

Architecture

┌──────────────────────────┐     ┌──────────────────────────────────┐
│  Notepad++ (C++ DLL)     │     │  NppCopilot Engine (Python)      │
│  Thin plugin that:       │◄───►│  The real brains:                │
│  • Shows AI chat panel   │HTTP │  • Semantic search (LLMFS)       │
│  • Context menu actions  │     │  • AI agents (summarize, tag,    │
│  • Keyboard shortcuts    │     │    extract TODOs, link notes)    │
│  • File change hooks     │     │  • Local LLM via Ollama          │
│                          │     │  • OpenAI/Claude API support     │
└──────────────────────────┘     └──────────────────────────────────┘

The Python engine does all the heavy lifting. The Notepad++ plugin is a thin UI layer that communicates over HTTP. This means:

  • The engine works standalone — use it from CLI, Python, or any editor
  • Notepad++ integration feels native — dockable panel, keyboard shortcuts, context menus
  • Works offline — Ollama for local LLM, sentence-transformers for local embeddings

Features

Semantic Search

Find notes by meaning, not just keywords. "authentication bug" finds your note about "JWT token expiry misconfigured" even though it doesn't contain the word "authentication."

nppcopilot search "that deployment issue from last week"
from nppcopilot import NppCopilotEngine

engine = NppCopilotEngine()
results = engine.search("deployment issue", k=5)
for r in results:
    print(f"  {r['score']:.2f}  {r['path']}")

AI Chat (RAG over your notes)

Ask questions and get answers grounded in your actual notes, with citations.

nppcopilot ask "what decisions did we make about the API redesign?"

Auto-Summarize

Get a TL;DR of any note — brief, detailed, or bullet points.

nppcopilot summarize meeting-notes.md --level bullets

Smart Auto-Tagging

AI reads your note and suggests relevant tags. Optionally writes them as YAML frontmatter.

nppcopilot tag meeting-notes.md --apply

TODO Extraction

Finds explicit TODOs (TODO:, [ ], FIXME:) AND implicit action items ("need to update the docs", "should follow up with John").

nppcopilot todos

Note Linking

Discovers connections between your notes that you might have missed.

nppcopilot related project-ideas.md

Note Organizer Agent

An AI agent that analyzes your entire notes collection and suggests:

  • Folder structure improvements
  • Duplicate notes to merge
  • Stale notes to archive
  • A weekly digest of your notes activity
nppcopilot organize

Inline Completion

Copilot-style ghost text while typing — but optimized for prose, not code.


Notepad++ Plugin

The Notepad++ plugin provides native integration:

Shortcut Action
Ctrl+Shift+A Open AI Chat Panel
Ctrl+Shift+S Semantic Search
Ctrl+Shift+M Summarize Current Note
Ctrl+Shift+T Auto-Tag Current Note
Right-click Context menu with all AI actions

Install the Plugin

  1. Install the Python engine: pip install nppcopilot
  2. Start the engine: nppcopilot serve
  3. Download NppCopilot.dll from Releases
  4. Copy to %PROGRAMFILES%\Notepad++\plugins\NppCopilot\NppCopilot.dll
  5. Restart Notepad++

Python API

from nppcopilot import NppCopilotEngine

# Initialize (auto-loads config from ~/.nppcopilot/config.json)
engine = NppCopilotEngine()

# Index all notes
engine.index_all()

# Semantic search
results = engine.search("product launch timeline")

# Ask a question (RAG)
answer = engine.ask("What are the key risks for Project Alpha?")

# Summarize a note
summary = engine.summarize("meeting-notes.md", level="bullets")

# Auto-tag
tags = engine.auto_tag("meeting-notes.md")

# Extract TODOs
todos = engine.extract_todos()

# Find related notes
related = engine.find_related("project-ideas.md")

# Inline completion
suggestion = engine.complete("The main risk factors for the launch are")

Configuration

NppCopilot looks for config in .nppcopilot/config.json (current dir) or ~/.nppcopilot/config.json.

{
  "notes_dir": "C:\\Program Files\\Notepad++",
  "llm_provider": "ollama",
  "ollama_model": "llama3.2:1b",
  "ollama_url": "http://localhost:11434",
  "embedding_model": "all-MiniLM-L6-v2",
  "auto_index": true,
  "auto_tag": true,
  "server_port": 9120
}

LLM Providers

Provider Setup Best For
Ollama (default) brew install ollama && ollama pull llama3.2:1b Privacy, offline use, free
OpenAI Set openai_api_key in config Best quality, fastest
Anthropic Set anthropic_api_key in config Great reasoning

REST API

The engine exposes a REST API on localhost:9120 for editor integrations:

# Start the server
nppcopilot serve

# Search
curl -X POST http://localhost:9120/api/search \
  -H "Content-Type: application/json" \
  -d '{"query": "product launch", "k": 5}'

# Ask
curl -X POST http://localhost:9120/api/ask \
  -H "Content-Type: application/json" \
  -d '{"question": "What are my open TODOs?"}'

# Health check
curl http://localhost:9120/api/health

Windows Packaging

For a one-click Windows installer, the repo now includes:

  • a standalone backend entrypoint at nppcopilot/server_entry.py
  • a PyInstaller spec at packaging/windows/NppCopilotServer.spec
  • an Inno Setup script at packaging/windows/NppCopilotSetup.iss

Build flow:

pip install -e ".[dev]"
.\scripts\build_backend_exe.ps1

Then:

  1. Build plugin/bin/Release/NppCopilot.dll
  2. Open packaging/windows/NppCopilotSetup.iss in Inno Setup
  3. Compile NppCopilotSetup.exe

The installer is set up to:

  • copy NppCopilot.dll into the Notepad++ plugin folder
  • install NppCopilotServer.exe into %LOCALAPPDATA%\NppCopilot
  • detect whether Notepad++ is installed before continuing
  • detect whether Ollama is installed and warn if local AI will not work yet
  • guide the user through a first-run config wizard for notes directory and provider choice
  • generate ~/.nppcopilot/config.json from the wizard choices
  • start the backend after install

---

## How It Works

1. **Indexing**: When you save a note, NppCopilot reads it, chunks it intelligently, generates embeddings using `all-MiniLM-L6-v2`, and stores everything in a local SQLite + ChromaDB database (powered by [LLMFS](https://github.com/viditraj/llmfs)).

2. **Search**: Queries are embedded and compared against all note chunks using cosine similarity. Results are ranked by relevance and returned with context snippets.

3. **AI Features**: Summarization, tagging, TODO extraction, and chat use an LLM (local via Ollama or cloud via OpenAI/Anthropic) with carefully crafted prompts and your notes as context (RAG).

4. **File Watching**: A background daemon monitors your notes directory and auto-indexes changes in real-time.

---

## Installation

### From PyPI

```bash
pip install nppcopilot

From Source

git clone https://github.com/viditraj/nppcopilot.git
cd nppcopilot
pip install -e ".[dev]"
pytest

With Ollama (recommended for offline use)

# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# Pull a model
ollama pull llama3.2:1b

# Install NppCopilot
pip install nppcopilot

Comparison

Feature NppCopilot Obsidian AI Plugins Notion AI Apple Notes
Works in Notepad++ Yes No No No
Semantic search Yes Partial Yes No
Works offline (local LLM) Yes No No Partial
Auto-tagging Yes No No No
TODO extraction Yes No Partial No
Note linking (AI) Yes Manual only No No
Organization agent Yes No No No
Open source Yes Varies No No
CLI interface Yes No No No
REST API Yes No No No
Free Yes Varies $10/mo Free
Plain text files Yes Yes No No

Contributing

git clone https://github.com/viditraj/nppcopilot.git
cd nppcopilot
pip install -e ".[dev]"
pytest

License

MIT License. See LICENSE for details.


Credits

Built on top of LLMFS for the storage, search, and memory infrastructure.


Star this repo if you think Notepad++ deserves AI superpowers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors