A small AutoHotkey v2 utility that turns Joplin into a keyboard-driven autotext library for AutoHotkey v2. Useful applications include the use as a convenient prompt library for LLM chats with the llama.cpp web UI or other basic chat apps.
Store youre prompts or any other autotext snippets in a top-level Joplin notebook. This utility lets you search them from any application in a popup picker, previews the selected note, and pastes the selected noted into the previously active window.
Nowadays there are plenty web-based and local UI's that enable you to chat with self-hosted chatbots such as llama.cpp and ollama or with public cloud-based chatbots. Some of these offer very sophisticated workspaces logic, prompt libraries and the like. Others don't. Also, the field is evolving fast and you might want to use a different UI tomorrow, requiring you to manually move your hand-crafted prompts from one app or UI to another one.
In contrast, this tool keeps the prompts in Joplin, where they are easy to organize, sync, and edit, while AutoHotkey provides fast keyboard access from anywhere in Windows into any application, any chat app or web ui that you might want to use today or tomorrow.
For example, most UI's for llama.cpp focus on RAG and provide a lot of convenient functionality. However, if you require extended chats with full context insertion or require ephemeral chats for reasons of confidentiality, the new web UI that is offered by llama.cpp's llama-server is currently the preferred option because it offers the cleneast interaction with the underlying llama.cpp server. Joplin prompt picker was created specifically to make working with the llama.cpp web UI more comfortable.
That notwithstanding, this solution will also be of use to users of AutoHotkey and/or Joplin for many other purposes.
- Search prompt notes by title and notebook path.
- Preview the selected note before inserting it.
- Paste into any text field with a hotkey.
- Works with nested sub-notebooks under
Prompts. - Uses the local Joplin Web Clipper / Data API.
- Handles UTF-8 text correctly, including German umlauts.
- Converts escaped JSON newlines and quotes into normal text when inserting prompts.
- Retries transient Joplin clipper connection failures.
- Windows
- AutoHotkey v2
- Joplin Desktop running locally
- Joplin Web Clipper enabled
- A top-level notebook named
Prompts
- Install AutoHotkey v2.
- Open Joplin Desktop.
- Enable Web Clipper in Joplin.
- Copy the Web Clipper API token from Joplin settings.
- Open
JoplinPromptPicker.ahkin a text editor. - Replace:
this.token := "PASTE_YOUR_JOPLIN_TOKEN_HERE"with your real token.
-
Optionally configure the top-folder name (currently
Prompts). You can choose any name you like. -
Create a top-level notebook named
Prompts(or the name you configured in step 7). -
Put your reusable prompt notes inside that notebook or its sub-notebooks, one prompt or autotext segment per note.
-
Run
joplin-prompt-picker.ahk.
- Press
Ctrl+Shift+Pto open the picker. - Type to search by note title or notebook path.
- Press
Enterto paste the selected prompt. - Press
Ctrl+Enterto copy the selected prompt to the clipboard. - Press
F5to reload prompts from Joplin. - Press
Escto close the picker. - Press
Shift+Escto exit the script.
- The script looks for Joplin's clipper service on ports
41184to41194. - Prompt bodies are loaded lazily when previewed or inserted.
- Search currently uses title and notebook path, not full body text.
- The picker stores prompts in Joplin, so syncing and editing can stay inside your existing Joplin workflow.
Example:
PromptsPrompts / WritingPrompts / TranslationPrompts / CodingPrompts / Patent
Use one note per reusable prompt.
- Windows only, because it depends on AutoHotkey.
- No installer yet.
- No automatic hotstring expansion yet; this is a popup picker workflow.
- Parsing is intentionally conservative and optimized for the current Joplin API workflow.
- Joplin should be started before stargint the .ahk script.
- Config file instead of editing the token in the script.
- Custom notebook name.
- Body-text search as an optional index mode.
- Better packaging and installer.
- Optional direct hotstring insertion mode.
- Better diagnostics and logging.
MIT
Created by Tobias Ernst with AI assistance.