惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
L
LangChain Blog
云风的 BLOG
云风的 BLOG
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
小众软件
小众软件
量子位
The GitHub Blog
The GitHub Blog
博客园 - 【当耐特】

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
We let ChatGPT and Claude see your screen
Crade · 2026-06-18 · via DEV Community

Crade

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

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

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

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.