DEV Community

Crade
Crade

Posted on

We let ChatGPT and Claude see your screen

ChatGPT and Claude are great. But they can't see what's on your screen. The default workflow is: take screenshot, switch to ChatGPT, paste it, ask, switch back. Doing this 30 times a day burns hours.

We shipped Crade to fix that. A Mac and Windows app that floats over your screen, captures it on demand, and pipes it to your own ChatGPT or Claude account. No screenshots, no tab switching.

This is what we learned building it.

The architecture

Three flows, depending on which AI you bring:

** ChatGPT (free or paid OpenAI account)**: we OAuth into OpenAI, spawn the codex CLI as a subprocess. Each prompt becomes:

codex -p "your prompt" --image screenshot.png
Enter fullscreen mode Exit fullscreen mode

The AI usage is billed by OpenAI directly to your account.

Claude (Pro/Max account): same pattern with the claude CLI:

claude -p "your prompt" \
  --allowedTools "Read,Write,Edit,Bash,Glob,Grep,WebFetch" \
  --output-format stream-json --verbose
Enter fullscreen mode Exit fullscreen mode

Streaming JSON lets us show tool-use events as they happen.

Built-in tier: HTTP to our Cloudflare Worker, which proxies to OpenAI (Free) or Anthropic (Pro). For users who don't want to bring their own.

The point: in BYO mode, we never sit in the middle. The screenshot goes directly from the user's machine to OpenAI or Anthropic.

Fix: bump our window level to 1500 (kCGAssistiveTechHighWindowLevel). This is the level used by accessibility tools like VoiceOver. It's above NSScreenSaverWindowLevel, so we win.

window.setWindowLevel(1500)  # kCGAssistiveTechHighWindowLevel
Enter fullscreen mode Exit fullscreen mode

We re-assert it every 500ms in a periodic check because some apps fight back.

For Windows, Qt.WindowStaysOnTopHint is enough. Browsers don't compete the same way.

Why Python + PyQt6

This is where we make some readers angry: we picked Python + PyQt6 over Electron.

Reasoning:

  • Window control: direct access to NSWindow on macOS, no native module dance
  • Smaller footprint: ~50 MB installer vs Electron's 100+
  • Subprocess management: spawning claude and codex is trivial from Python
  • Screen capture stays in Python: pyautogui + native bindings, no IPC

The tradeoffs: PyInstaller distribution is finicky, default PyQt6 UI looks dated (real stylesheet work needed), and the talent pool for desktop Python devs is smaller than for Electron.

Worth it for our use case. Maybe not for yours.

What we learned

  • Bundle the CLIs: we initially required users to install claude and codex separately. Bundling them in the app made onboarding 10x smoother.
  • Sign and notarize from commit 1: macOS treats unsigned apps as malware. We learned this the hard way.
  • OAuth flows have edge cases: Anthropic's "Grove notice" (Oct 2025 Consumer Terms update) breaks first-run for users who haven't accepted it in the CLI. We auto-accept it during connect now.
  • File descriptor limits on macOS: GUI-launched apps inherit a soft limit of 256 file descriptors. The Anthropic CLI needs more. We bump rlimit before spawning subprocesses.

Try it

Crade is at crade.ai. Free tier covers daily use. Pro ($7.99/mo) and Premium ($19.99/mo) add higher caps and Agent mode (file system + shell access for the AI).

Curious what other devs would build on this pattern. The CLI-as-subprocess approach for desktop AI tools feels under-explored.

Top comments (0)