AI
Built-in plugins open a chat window, translate the text you selected, and describe a part of the screen. They use the on-device Apple Intelligence model or a cloud model with your own API key.
Providers
| Provider | Needs |
|---|---|
| Apple Intelligence (on-device) | macOS 26 Tahoe, a Mac that supports Apple Intelligence, and Apple Intelligence turned on in System Settings. No key, and nothing leaves your Mac. |
| Claude (Anthropic) | An Anthropic API key. |
| Gemini (Google) | A Gemini API key. |
| OpenAI | An OpenAI API key. No built-in plugin uses it, but your own plugins can. |
When the on-device model cannot run, the plugin shows why: the Mac cannot run Apple Intelligence, Apple Intelligence is off, or the model is still downloading.
AI Chat Window
AI Chat Window (ai-chat.js) adds the launcher command AI Chat. It opens a chat panel where replies stream in as the model writes them, with Markdown formatting. A menu at the top of the panel picks the model for the next message, and + starts a new chat. The plugin keeps your 50 most recent chats, so they are still there after a restart.
Settings → Plugins → AI Chat Window has these settings:
| Setting | What it does |
|---|---|
| Model | The default model: On-device (Apple Intelligence) (the default), Claude Sonnet, Claude Opus, or Gemini Flash. |
| Anthropic API key | Needed for the Claude models. |
| Gemini API key | Needed for Gemini Flash. |
Translate Selected Text
Translate Selected Text (translate.js) adds the launcher command Translate Selection. Select text in any app, run the command, and a panel shows the translation above the original. It uses the on-device model only.
The Target locale setting picks the language. Leave it empty to translate into your system language, which the field shows as a grey hint.
Reading the selected text in another app needs the Accessibility permission.
Screen Summary
Screen Summary Example (screen-ai-summary.js) shows how a plugin sends a screenshot to a model. Press ⌘⇧S, or run Summarize Screen, then drag a box. The plugin sends the image to Claude and shows a short description in a notification. It needs Screen Recording.
As shipped, this example has no API key setting and passes no key, so the command fails with a missing-key error. Add a password option and pass it as apiKey to make it work. AI Chat Window shows how.
API keys
Enter API keys in a plugin's settings, in Settings → Plugins. A key field stores the key in the macOS Keychain. settings.json keeps only a reference to the Keychain item, so the key never lands in your workdir or its git history.
Each plugin has its own key fields. Entering an Anthropic key in AI Chat Window does not give it to other plugins. In your own plugins, declare a password option for each key:
const opts = macotron.plugin({
title: "Ask Claude",
description: "Ask Claude about the clipboard.",
options: {
apiKey: { type: "password", label: "Anthropic API key", required: true },
},
});
macotron.command("Ask Claude", "Explain the clipboard", async () => {
const reply = await macotron.ai.claude({ apiKey: opts.apiKey })
.chat("Explain this briefly:\n\n" + macotron.clipboard.text());
macotron.notify.show("Claude", reply);
});
See Plugin settings for option types, and macotron.ai for chat, streaming, and models.