Prompt-injected chatbot powered by Apple Intelligence's Writing Tools, to simulate an LLM chatbot, since Apple hasn’t any API for their LLM.
This project uses:
- 📝 Apple Notes + the Rewrite function as the backend LLM
- 💻 AppleScript +
osascriptto automate the interface - 🧑💻 Node.js CLI to simulate conversation
- 🧠 Prompt injection to force the writing tool to behave like a chatbot
Apple Intelligence currently offers no API and no chatbot interface.
We simulate one by:
- Creating a temporary note in Apple Notes
- Injecting the entire chat history as a prompt
- Triggering the Rewrite tool via AppleScript
- Detecting the new response by monitoring the clipboard
- Appending the result to the conversation
- Node.js — CLI interface
- AppleScript — UI automation
- osascript — Shell bridge between Node and macOS
- macOS Notes app — Work as a "GUI" interface between the user and Apple Intelligence's writing tool
-
Install Node.js
-
Clone this repository
-
Run:
npm install node chatbot.js