Shpik-code/ai-screen
حول
Let AI agents work in any open window on Windows and Linux: read it as text, click and type by labels, with one-time per-window consent. Claude Code skill, MCP server, CLI.
أدوات التطويرالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- جارٍ جمع السجل
- خلال 15 يومًا
- جارٍ جمع السجل
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلai-screen
I wanted my AI agent to help me in the programs I actually use, not in some browser it starts on its own in the background. So I built ai-screen. You give the agent one of your windows (Chrome, Explorer, Excel, Telegram, the ancient accounting app at work, anything) and it reads what's there, clicks, types and points at what it found while you watch.
Windows 10/11 and Linux (X11). It plugs into Claude Code as a skill, into anything that speaks MCP (Codex, Cursor, Claude Desktop, Gemini CLI), or you can hand the CLI to any agent with a shell.

How it works
Before the agent touches a window, ai-screen asks you. Click Allow and a thin glowing frame appears around that window: the agent works there and nowhere else. Ctrl+Alt+Q stops it at any moment.

Most of the time the agent doesn't need screenshots at all. Windows already describe themselves
through the accessibility API (the same one screen readers use), so ai-screen gives the agent a plain
text list of buttons, fields and labels in about 0.15 s. The agent says click --text 'Save' instead
of guessing pixels, and it can send a few steps at once with a check after each, so a broken step
stops the chain instead of clicking on blindly. Screenshots and OCR are still there for charts,
pictures and apps that draw everything themselves. Asking for one element costs about 10 tokens, a
screenshot of the same window 400 to 1,400; dumping a whole big window as text isn't cheaper than a
screenshot, so the agent mostly asks for what it needs.
How is this different from Playwright MCP, browser-use and friends? Those drive a browser they launch themselves. ai-screen works in the windows you already have open, desktop apps included, and with your logins. Screenshot-based "computer use" agents send an image to the model on every step; here that's the exception.
The same in a browser: the agent searches a shop page, adds headphones to the cart and finds the new total.

Getting started
Tell your agent:
Install the ai-screen skill from https://github.com/Shpik-code/ai-screen
That's it. Claude Code sets it up as a skill, Codex, Cursor and other MCP clients add it as an MCP server. Then ask for something real, like "add the headphones to the cart in my Chrome and tell me the total", and click Allow when ai-screen asks.
Installing by hand, or what your agent will do
Agent installing this: if you are Claude Code, use the skill installer below. If you are an MCP client (Codex, Cursor, Claude Desktop, Gemini CLI), add the MCP config below to your own config file. Then run doctor, show the user its result, and tell them to restart the session so the skill or the server gets loaded.
As a skill (Claude Code, and other agents that read SKILL.md): clone and run the installer.
It copies the skill to ~/.claude/skills/ai-screen (another folder: -Dest DIR / --dest DIR),
keeps your settings on updates, adds the ai-screen app to the Start menu and prints an MCP config.
git clone https://github.com/Shpik-code/ai-screen; cd ai-screen
powershell -ExecutionPolicy Bypass -File .\install.ps1 # Windows
./install.sh # Linux
On Linux, Pillow and python-xlib are fetched from PyPI (sha256-checked, into the skill's pydeps) and
tesseract from your system's signed apt repositories, all without root, on first need. Without network
it may ask for sudo apt install python3-pil python3-xlib python3-tk python3-gi gir1.2-atspi-2.0.
As an MCP server: with uv nothing else needs installing.
{
"mcpServers": {
"ai-screen": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Shpik-code/ai-screen", "ai-screen-mcp"]
}
}
}
That goes into claude_desktop_config.json, ~/.cursor/mcp.json or ~/.gemini/settings.json.
Codex, in ~/.codex/config.toml:
[mcp_servers.ai-screen]
command = "uvx"
args = ["--from", "git+https://github.com/Shpik-code/ai-screen", "ai-screen-mcp"]
No uv? pip install git+https://github.com/Shpik-code/ai-screen, then "command": "ai-screen-mcp".
Any other agent with a shell: point it to SKILL.md and let it run scripts/screenctl
(PowerShell: python scripts\screenctl.py).
If something's off, python scripts/screenctl.py doctor (or screenctl doctor) tells you what.
What the agent gets
A small CLI called screenctl (the MCP server wraps the same commands). A few of them:
screenctl select window excel # asks you once for this window
screenctl see # what's in the window, as text with coordinates
screenctl click --text 'Save' --role button
screenctl type --into 'File name' 'report.xlsx'
screenctl page --grep price # a whole web page as text, the part below the fold too
screenctl goto example.com/cart # open an address in that browser window
screenctl batch <<'EOF'
click --text 'Next'
expect --text 'Payment' --timeout 8
highlight --text 'Total' --say 'here it is' --point
EOF
screenctl shot # a screenshot, for when text isn't enough
screenctl done # frame off, access closed, screenshots deleted
screenctl --help has the rest. SKILL.md is the guide the agent reads, worth a look if
you want to know how it's told to behave.
You can also pick the window for the agent, watch the log and stop it from the ai-screen app. Too lazy to answer a request for every window? Pick the whole screen or one monitor there, and the agent moves between its windows without asking:

Is it safe?
Safer than letting an agent loose on your desktop, but it's not a sandbox, and I'd rather say that upfront.
What it does: nothing happens until you click Allow. Input goes only into the allowed window and its own dialogs, and if another window pops up on top, the click is refused. The agent can't press Win combinations, Alt+Tab or Alt+F4, and on Windows it can't click the permission dialog itself. Access ends when the agent says it's done, when you press Ctrl+Alt+Q, or after 10 quiet minutes.
What it doesn't: an agent that can run arbitrary code as your user can get around all of this, so don't give a shell to an agent you don't trust. "Ask before paying" and "ignore instructions written on web pages" are rules in the agent's guide, not hard checks. Anything the agent reads ends up with your model provider. And don't hand it your terminal or your password manager.
More in SECURITY.md.
Settings
Defaults are in config.json in the skill folder. What you change in the app goes to your own file,
~/.config/ai-screen/config.json (%APPDATA%\ai-screen\ on Windows), which is read on top of it, so a
git pull of the skill never conflicts with your settings.
| key | what it does |
|---|---|
confirm |
window (default) asks once per window, each asks for every command, session asks once per target for session_minutes |
language |
auto, en or ru for the dialogs and the app |
dialog_timeout_s |
how long a request waits for you (10 to 600 s), no answer means no |
stop_hotkey |
ctrl+alt+q by default |
overlay_idle_minutes |
after this many idle minutes access ends |
mouse_speed, scroll_speed, typing_speed |
0.25 to 4 |
overlay_style |
cosmic, minimal or bright |
background_mode |
false by default; switch it on in the app (below) |
Background mode (browsers)
Off by default. Switch it on in the app: Settings → Background mode. The agent then carries on in your open tab without touching your mouse and keyboard: clicks and typing go straight into the page, the window may stay behind others, and you keep working. The hard chat task (find a chat among 50, a message among 300, edit it) took 0.3 s this way instead of 10 s with the mouse.
It needs the small ai-screen extension once per browser: open chrome://extensions (Yandex:
browser://extensions), turn on Developer mode, "Load unpacked", pick the browser-extension folder
(the app has a button that opens it). Chrome, Yandex Browser, Edge, Brave, Chromium. Firefox is not
supported. While the agent works the browser shows its own bar "ai-screen is debugging this browser";
done removes it. The extension talks only to ai-screen on this computer (native messaging, no network
port), and every task still starts with your "Allow".
On Windows, pip install "ai-screen[ocr] @ git+https://github.com/Shpik-code/ai-screen" makes OCR a lot faster.
Not there yet
No macOS and no Wayland. Windows running as administrator and UAC prompts are out of reach. Games and apps that paint everything themselves don't expose text, so there it's OCR and screenshots.
Contributing
Bug reports and PRs are welcome. Tests run without a display: python -m unittest discover -s tests.
See CONTRIBUTING.md. MIT licensed.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…