Turn your current macOS screen, clipboard, and active app into an editable AI prompt.
CoreContext is a privacy-first, transient macOS 15+ utility. Invoke it from a keyboard shortcut, review the live context, choose an intent and AI model, and generate a Markdown prompt ready to paste into another assistant. CoreContext stays open after copying so you can copy another representation or continue editing, and keeps no prompt or screenshot history after it closes.
Choose which sources to include, optionally extract screenshot text with model-based OCR, select a provider and model, and review the exact screenshot before sending it.
Edit the generated Markdown, then copy the prompt, screenshot, or both.
- Live display preview that refreshes every second and captures once more when Generate Prompt is pressed.
- Display-under-pointer capture or a fixed display with automatic fallback when that display is unavailable.
- Independent toggles for screenshot, clipboard text, and source application name.
- Ask, Explain, Fix, Summarize, and Rewrite intents.
- Live model discovery and selection for Google, OpenAI, and OpenRouter.
- One separately stored API key per provider, kept in macOS Keychain behind masked fields.
- Optional model-based OCR that inserts extracted screenshot text directly into the generated Markdown.
- Editable Markdown output with explicit Copy Prompt, Copy Screenshot, and Copy Both actions.
- No background daemon, automatic paste, history, analytics, or cloud backend.
CoreContext is designed to make every transfer visible and deliberate:
- API keys are stored only in macOS Keychain and are never loaded back into visible fields.
- Screenshots, clipboard text, OCR output, and generated prompts remain in memory and are not written to disk or logged.
- The App source includes only the name of the application active when CoreContext opened, such as
SafariorXcode. It does not include files, app binaries, window metadata, or additional app contents. - CoreContext excludes its own window from screen capture.
- API screenshots are resized to a maximum 2560-pixel long edge. The original remains in memory for clipboard output.
- OpenAI requests set
store: false. - OpenRouter defaults to
openrouter/free. Selecting another model is explicit and may incur that model's published charges; CoreContext never changes models or performs an automatic paid fallback.
- macOS 15 or newer.
- Xcode or a matching Apple Command Line Tools installation.
- A Google, OpenAI, or OpenRouter API key for the provider you want to use.
- Screen Recording permission for CoreContext.
git clone https://github.com/prtk1910/CoreContext.git
cd CoreContext
swift test
scripts/install.shThe installer places the app at ~/Applications/CoreContext.app and links the command to ~/.local/bin/corecontext. Add ~/.local/bin to PATH if your shell does not already include it.
-
Launch CoreContext:
corecontext capture
-
Enable CoreContext in System Settings → Privacy & Security → Screen & System Audio Recording when prompted. Relaunch after changing the permission.
-
Enter a key for Google, OpenAI, and/or OpenRouter in its masked row and press Save. A green check confirms that provider has a Keychain item.
-
Select the provider. CoreContext loads the models available to that key into the Model dropdown. Use the refresh button if provider access changes.
-
Optionally create the keyboard shortcut described below.
- Invoke
corecontext captureor the⌘⇧CShortcut. - Confirm the live screenshot and select the sources to include:
- Screenshot sends the image to the generation request.
- Clipboard includes text captured when CoreContext opened.
- App includes only the originating application name.
- OCR sends the screenshot to the selected model in one additional request, uses the extracted text as context, and inserts the real text into the generated prompt without a paste placeholder.
- Choose an intent, display preference, provider, and model.
- Press Generate Prompt. CoreContext freezes a final fresh screenshot so the generated context and clipboard image match.
- Edit the Markdown if needed.
- Choose Copy Prompt, Copy Screenshot, or Copy Both. CoreContext stays open until you press Cancel or close the window.
Copy Both writes the prompt and screenshot as separate macOS pasteboard items. The receiving application decides which item types and how many items it accepts; some apps paste only the text or only the image. Use the explicit Prompt or Screenshot action when the destination does not support both items.
Provider model lists can include specialized or text-only models. Screenshot generation and OCR require a model that accepts image input and produces text. If a selected model does not support the request, CoreContext shows the provider error without switching models automatically.
-
Open the macOS Shortcuts app and create a shortcut named CoreContext Capture.
-
Add Run Shell Script with:
"$HOME/.local/bin/corecontext" capture -
Open the shortcut details, add a keyboard shortcut, and press
⌘⇧C. -
If it conflicts with another command, change that shortcut in System Settings → Keyboard → Keyboard Shortcuts or choose a different combination.
corecontext capture # open a fresh capture window
corecontext doctor # check OS, installation, and setup guidanceCoreContext is a dependency-free Swift Package using SwiftUI, AppKit, ScreenCaptureKit, and Security.framework.
swift build
swift test
scripts/build-app.sh # assemble and ad-hoc sign build/CoreContext.app
scripts/install.sh # build and install into ~/ApplicationsThe generated app icon is reproducible:
swift scripts/generate-icon.swift "$PWD"The package separates reusable capture/provider code in CoreContextKit, the SwiftUI app executable, and the corecontext launcher CLI. The internal CLI artifact is named corecontext-cli to avoid a case-insensitive filesystem collision with the CoreContext app executable.
The UI reports missing or rejected keys, rate limits, unavailable models, timeouts, malformed responses, cancellation, Screen Recording denial, and model-list failures. Failed live screenshot refreshes preserve the latest valid frame.
CoreContext is a local MVP. It does not include an App Store release, notarization, menu-bar daemon, browser extension, assistant launcher, automatic paste, prompt history, chat interface, or paid-model fallback.
CoreContext is licensed under the GNU General Public License v3.0.

