@QingQ77: 让 Claude Code 中的纯文本 LLM(如 DeepSeek、CodeLlama、Qwen-Coder)通过本地 Ollama 视觉模型获得视觉能力。 支持三种模式:描述剪贴板截图、截取全屏并描述、读取已保存的图片文件。 所有图像…

X AI KOLs Timeline 工具

摘要

LocalEyes gives text-only LLMs in Claude Code (e.g., DeepSeek, CodeLlama) local vision via Ollama, enabling image description without cloud uploads. Setup takes two commands.

让 Claude Code 中的纯文本 LLM(如 DeepSeek、CodeLlama、Qwen-Coder)通过本地 Ollama 视觉模型获得视觉能力。 支持三种模式:描述剪贴板截图、截取全屏并描述、读取已保存的图片文件。 所有图像处理在本地完成,不上传云端,无需 API key。安装只需两条命令(ollama pull 模型 + pip install),核心脚本 vision 约 150 行。
查看原文
查看缓存全文

缓存时间: 2026/07/08 05:42

让 Claude Code 中的纯文本 LLM(如 DeepSeek、CodeLlama、Qwen-Coder)通过本地 Ollama 视觉模型获得视觉能力。

支持三种模式:描述剪贴板截图、截取全屏并描述、读取已保存的图片文件。

所有图像处理在本地完成,不上传云端,无需 API key。安装只需两条命令(ollama pull 模型 + pip install),核心脚本 vision 约 150 行。


NoPainNullGain/LocalEyes

Source: https://github.com/NoPainNullGain/LocalEyes

👁️ LocalEyes

Vision for text-only LLMs in Claude Code. Many flagship models like DeepSeek, CodeLlama, Qwen-Coder, and many other models don’t have vision. LocalEyes gives them working eyes via a local Ollama vision model. No cloud, no uploads, no API keys. Private, fast, free.

The problem

DeepSeek is brilliant at reasoning. It’s also completely blind. No screenshots, no UIs, no error dialogs — it can’t see any of it. The usual fix is uploading your images to GPT-4 or Gemini and asking a second model to describe what’s on screen. That breaks the agentic loop. It also means your screenshots are sitting on a cloud provider’s server. Neither is ideal.

LocalEyes gives text-only models local vision. Your screen stays on your machine.

Demo

LocalEyes demo

DeepSeek starts blind — then LocalEyes gives it sight. The model describes the app, understands the UI, and can take its own screenshots during agentic work. All local.


Setup (2 minutes)

Prerequisites

ollama pull qwen2.5vl:7b   # one-time, ~4 GB
pip install Pillow

Install

git clone https://github.com/NoPainNullGain/LocalEyes
cd LocalEyes
python install.py

Verify

# Press Win+Shift+S to screenshot something, then:
python ~/.claude/skills/local-eyes/vision.py   # PowerShell / Git Bash
# Or on cmd.exe:
python %USERPROFILE%\.claude\skills\local-eyes\vision.py

Two modes

ModeTriggerCommand
You show the modelYou screenshot something and ask about itpython vision.py
Model looks itselfModel decides it needs visual context during agentic workpython vision.py screen

You show the model

python vision.py                           # describe the clipboard screenshot
python vision.py "What error is shown?"    # focused question

Model looks itself (agentic mode)

python vision.py screen                              # capture full display
python vision.py screen "Transcribe the terminal"    # focused
python vision.py screenshot.png                      # read a saved file

The model will use screen mode on its own during workflows — after builds, during debugging, when implementing UI from mockups. No prompt needed.


Configuration

Edit ~/.claude/skills/local-eyes/config.json:

{
  "ollama_host": "http://localhost:11434",
  "vision_model": "qwen2.5vl:7b",
  "timeout_seconds": 120,
  "temperature": 0.1
}
SettingPurpose
ollama_hostWhere Ollama runs (change for remote GPU servers)
vision_modelModel to use — try qwen3-vl, llama3.2-vision, minicpm-v
timeout_secondsMax wait (increase for large images or slow GPUs)
temperature0.0 = strictly factual, 1.0 = creative descriptions

Override any setting for a single session:

PowerShell: $env:OLLAMA_VISION_MODEL = "qwen3-vl:latest" Bash/Zsh: export OLLAMA_VISION_MODEL="qwen3-vl:latest"

Environment variables override config.json — useful for trying a new model without editing files.


How it works

┌──────────────────────────┐      ┌─────────────────────────┐
│   Claude Code            │      │  Your machine (Ollama)  │
│                          │      │                         │
│  Your model (text)       │──→──→│  qwen2.5vl:7b (vision)  │
│  DeepSeek / text-only    │←──←──│                         │
│                          │ text │  "The screenshot shows  │
│  "I can see that..."     │      │   a terminal with..."   │
└──────────────────────────┘      └─────────────────────────┘
  1. The model runs python vision.py (clipboard, screen, or file)
  2. Script captures the image, base64-encodes it
  3. Sent to Ollama’s local API at localhost:11434
  4. Qwen2.5-VL returns a detailed text description
  5. The model reads the description and reasons about it

Nothing leaves your machine.


Platform support

OSScreen captureClipboardStatus
Windows 10/11✓✓Fully tested
macOS✓✓Should work (untested)
Linux (X11)✓✓Should work (untested)
Linux (Wayland)requires scrot✓YMMV

Troubleshooting

ProblemFix
“Cannot reach Ollama”Run ollama serve in a terminal
“No image on clipboard”Press Win+Shift+S to take a screenshot first
“Model not found”ollama pull qwen2.5vl:7b (~4 GB one-time)
“Pillow is required”pip install Pillow
TimeoutIncrease timeout_seconds in config.json
First request slowModel loads into VRAM on first call (30-60s). Subsequent calls are fast.

Files

LocalEyes/
├── vision.py       # Engine: screen capture, clipboard, Ollama API
├── SKILL.md        # Instructions the model reads to use its eyes
├── config.json     # User settings — edit, don't touch code
├── install.py      # One-command installer
├── LICENSE         # MIT
└── README.md

License

MIT © NoPainNullGain

相似文章

在Claude Code中使用本地LLM作为代理

Reddit r/LocalLLaMA

本文介绍了一种自定义的MCP设置,允许在同一会话中使用如llama.cpp等工具,将编码任务从Anthropic的Claude模型卸载到本地的Qwen3.8-27B模型。

@dotey:我花了一些时间研究 amontlabs/lcu 项目。它将 Codex 的 Computer Use 功能(即 AI 查看屏幕、点击鼠标、敲击键盘操作计算机的能力)提取为一个独立组件,让 Claude Code、Codex CLI、Pi 等其他 AI Agent 工具都能调用它

X AI KOLs Timeline

宝玉 (@dotey) 深入分析了 amontlabs/lcu 项目:它并非自研模仿,而是直接复用 OpenAI ChatGPT 桌面版内置的 Computer Use 运行时,通过 MCP 将该能力暴露给 Claude Code、Codex CLI、Pi 等任意 Agent 工具调用。LCU 仅提供 js 和 js_reset 两个工具,模型通过编写 JavaScript 操作预置的 cua 对象(getState/getApp/click/typeText 等)完成桌面控制,并支持访问性 API 直接点击 UI 元素。