Skip to main content

How to use modlens

An official plugin that

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

modlens

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add @liustack/modlens

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • Evidence, not imagination. Full transcription, reading-order layout regions, entity and relation lists. The model quotes specifics.
  • Install once, use everywhere. Verified on real machines in Claude Code, Codex, Pi, and OpenCode.
  • Open an issue. Bugs, suggestions, confusing errors, unclear docs. Issues are read and shape what gets built next.
  • Fork it. Under MIT your copy is fully yours to modify and publish.

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Who is modlens for? Why do even regular DeepSeek/GLM models need it?

The main chat models like DeepSeek-V4 and GLM under the dsh default host are pure text and cannot directly read pasted images. modlens uses an external vision engine to convert these images into structured text evidence and feed them back to the text model, making 'screenshot + question' a complete conversation.

Can it be used by default after installation, or do I need to configure an API key myself?

By default it uses Antigravity CLI (no key required, just log in to the browser once), so it works with zero configuration. If you want it faster, configuring a free Gemini key typically takes 5-10 seconds per request. Other OpenAI-compatible endpoints (DashScope, SiliconFlow, OpenRouter, self-hosted vLLM/Ollama, etc.) can also be directly connected.

What changes will I see after installation? Which model do I need to select?

The model selector will show several entries with '(modlens vision)' suffix, such as DeepSeek-V4-Flash (modlens vision) and DeepSeek-V4-Pro (modlens vision). Simply switch to these entries and paste images - the thumbnails are directly visible, providing an experience close to Codex App. You can also use it without switching; the image will be entered into the input box as a path.

Which engine processes an image? Which account's quota gets charged?

When not specified, all configured engines form a fault-tolerance chain: API-class fast lanes are tried first, with agent CLI as fallback. Each result includes meta.attempts listing the attempt order and meta.warnings indicating which harness's login was reused and whose quota was charged - there will never be silent quota charges.

What does modlens recover-paste do?

Claude Code, Pi, OpenCode and other terminals store pasted images directly in session storage without landing in regular temp files. recover-paste reads the pasted bytes from these harness local storages and saves them to a secure directory (0700). Recovering from OpenCode requires Node 22.13+ with node:sqlite.

How do I troubleshoot errors?

Run 'modlens doctor' - it will report Node version, which providers are ready, which one will be selected, and which harness is detected, all checked locally without consuming quota or going online. Error messages usually come with fix commands, for example when a key is missing it will directly tell you 'modlens config set .apiKey'.

What remains after uninstallation?

Simply delete the plugin package to uninstall. The only things that will remain on your machine are ~/.modlens/config.json (your explicitly configured keys, endpoints, reuse authorizations, etc.) and the recovery directory under ~/.modlens/. It doesn't go into dsh hooks nor modify any harness configurations, so the host itself can be reverted to its original state without any trace.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 未声明(依赖宿主 dsh 的 cordis 框架与 web profile,package.json 未声明 peerDependencies;install via dsh plugin add,按 dsh release-age 规则点名版本)
  • Node: >=22.19(OpenCode paste 恢复依赖 node:sqlite,需要 Node 22.13+)

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule