Distro News

Snippai brings AI-driven OCR to Linux with LaTeX, Markdown and code extraction

Key Takeaway

Snippai is an Electron screenshot tool that routes snips through a user-supplied LLM to convert formulas to LaTeX, tables to Markdown and code to indented source, shipping DEB, RPM and ZIP builds for x64 and ARM64.

Summary

Snippai is an open source snipping utility that sends a captured screen region, pasted image or dropped file to an AI model and returns structured output instead of plain text. It runs in Auto mode by default, letting the model classify the content, but exposes explicit action tabs for Formula (LaTeX for printed or handwritten math), Text (plain OCR including handwriting), Code and Explain, Table (Markdown with Excel export), Solve, Image and Color, and Translate and Calendar (including .ics generation). The application is built with Electron and ships Linux packages as DEB, RPM and a plain ZIP archive for both x64 and ARM64, though the project's website only advertises macOS and Windows.

Snippai bundles no model of its own: users configure LLM providers under Settings, with OpenAI gpt-4o and Google Gemini gemini-2.0-flash-lite pre-listed, and each provider entry carries a name, base URL, API key, optional organization ID and model list plus a Test button. The reviewer ran it on CachyOS with KDE Plasma on Wayland, using a custom Gemini provider and API key, and found the global Ctrl+Shift+A shortcut did not work under Plasma Wayland while the system tray menu did. Because snips are transmitted to whichever cloud provider is configured, sensitive screenshots leave the machine unless a local model is used; an attempt with Ollama and Qwen 2B performed poorly on the reviewer's modest hardware.

How Snippai's action-based OCR pipeline works

  • Action prompts: Each tab maps to a distinct prompt rather than a single generic OCR call, so Formula returns LaTeX source with a rendered preview, Table returns Markdown with angle brackets escaped and an Export as Excel button, and Code preserves indentation from the captured script.
  • Provider abstraction: The LLM Providers settings screen stores a base URL, API key, optional organization ID and model list per provider, with a Test button to validate configuration before saving, and multiple providers can be kept and toggled.
  • Input paths: Recognition can be triggered from the tray's Take Screenshot entry, by dropping an image onto the main window, or by pasting with Ctrl+V, all feeding the same processing pipeline.
  • Packaging and runtime: Snippai is an Electron application distributed for Linux as DEB, RPM and ZIP for x64 and ARM64; on Arch-based CachyOS the reviewer extracted the ZIP and ran the binary directly, with the app residing in the system tray.
  • Wayland limitation: The advertised Ctrl+Shift+A global shortcut failed on KDE Plasma Wayland, leaving the tray menu as the working capture entry point.

Why it matters

Snippai illustrates a growing pattern of thin open source front ends that delegate heavy lifting to user-configured LLMs, which keeps the client small but shifts cost, privacy and quality onto the chosen provider. For Linux desktop users, the DEB, RPM and ZIP packaging for both x64 and ARM64 makes it installable across Debian, Fedora and Arch-derived distributions, though the missing native Arch package and the broken Wayland global shortcut show desktop integration is still uneven. The reliance on cloud APIs means administrators and privacy-conscious users must weigh local inference through Ollama-class backends, which the reviewer found too slow on modest hardware.

Original reference: feed.itsfoss.com →