I take a lot of screenshots for work. Most of the time, though, I don't need the image itself. I need the text, the command or the formula inside it.
On Linux, I usually reach for the Extract Text option in Spectacle. It works, but stops at plain text. If the screenshot has a table, a math formula or a chunk of code, I have to resort to manual work.
Snippai tries to fix exactly that. It's an open source snipping tool that sends your screenshot to an AI model, figures out what kind of content it is, and gives you the matching output. Be it a LaTeX for a formula, Markdown for a table, clean code for code, and so on.
I tested Snippai on CachyOS with KDE Plasma and Wayland used Google Gemini as the AI provider with my own API key. I also tried using Ollama with Qwen 2B but that did not work well on my modest system.

Snippai: Screenshot tool with built-in AI-based OCR tool
The idea is simple. You snip a region of the screen (or drop and paste an image), and Snippai shows the result right next to it. By default, it runs in Auto mode, where the AI decides what the content is and picks the right action for you.
If Auto guesses wrong, or you want something else, there's a row of tabs on top. Each tab is an "action" with its own prompt behind it:
- Formula: LaTeX for printed or handwritten math
- Text: plain OCR, including handwriting
- Code and Explain: extract code or explain anything in the image
- Table: Markdown table, with export to Excel
- Solve: answers the question shown in the image
- Image and Color: describe the image or list its main colors
- Translate and Calendar: translate text, or turn event details into an
.icsfile
It's an Electron app with builds for Linux, macOS and Windows, although the official website only talks about macOS and Windows. Weird, I know. But the developer reached out to It's FOSS so we gave it a try anyways.
Note that Snippai doesn't ship its own AI model. You plug in an AI provider, cloud or local. That also means your snips go to the cloud AI you used, so keep that in mind before snipping anything sensitive.
Installing Snippai
For Linux, Snippai provides DEB and RPM packages along with a plain ZIP archive, for both x64 and ARM64.
Since I was on CachyOS, an Arch-based distro, neither DEB nor RPM was the right fit. So I downloaded the Linux ZIP, extracted it and ran the app from there.
Once running, Snippai sits in the system tray. On KDE Plasma, right-clicking the tray icon gives you some options like Show Snippai, Take Screenshot, Toggle Sticky Notes and Quick Action on Clipboard Text.

Setting up an AI provider
Snippai is useless until you give it an AI model to talk to.
Go to Settings -> LLM Providers. OpenAI (gpt-4o) and Google Gemini (gemini-2.0-flash-lite) are already listed, and you can add more with the buttons at the bottom.

Each provider has a name, a base URL, an API key, an optional organization ID and a list of models. There's also a Test button to check that everything is set before you save.

I created a new provider called "Google Gemini AI", added my Gemini API key and the gemini-3.5-flash-lite model. You can keep several providers and toggle the one you want to use.

After that, pick the model from the drop-down on the main window.

Taking a snip
You start a snip with Take Screenshot from the tray menu. The app shows Ctrl+Shift+A for this, but the global shortcut didn't work for me on Plasma Wayland. The tray menu worked every time.
After selecting an area, you get a small toolbar. The checkmark sends the snip for recognition.

You can skip snipping altogether too. Drop an image on the main window or paste it with Ctrl+V, and it goes through the same process. That's how I tested the photos of my handwritten notes.
Putting Snippai to work
Here's how each action did in my tests. One thing to keep in mind that most actions give you source code, not a rendered result. You get LaTeX, Markdown or iCalendar text that you copy and paste into an app that renders it.
Formulas to LaTeX conversion
I snipped Ramanujan's series for 1/Ο from a web page. Snippai picked the Formula action by itself and gave me a clean LaTeX source along with a rendered preview. It matched the original exactly.

Then I tried something harder: a photo of two SchrΓΆdinger equations I wrote on paper, and not very neatly. It got both right, including β, the partial derivatives and the hats on H, and even put them in an aligned block.

Switching to the Explain tab on the same formula gave a proper explanation. It identified the formula as Ramanujan's, from 1914, and explained each symbol.

Handwritten text
I gave it a fairly messy handwritten line. It read the whole thing correctly. To be honest, I'd have struggled to read some of those words myself after some time and I am not even a doctor.

Tables
I snipped a small table of Git commands. Snippai returned it as a Markdown table, with the angle brackets escaped so they don't break the Markdown. There's also an Export as Excel button.

Code
For code, I took a screenshot of part of the script from It's FOSS's compress-pdf project. The Code tab extracted it with the indentation intact.

The Explain tab on another part of the same script gave a line-by-line breakdown. It correctly figured out that the code parses command-line arguments and checks whether Ghostscript is installed.

Solving problems
The Solve action is where the AI part shines. I gave it a programming problem.
Count the ways to climb 12 stairs, 1, 2 or 3 at a time, without landing on the broken step 7
It explained the dynamic programming approach, wrote a Python program and walked through each step to the answer, 355. That's correct.
Solving a programming problem with the Solve action
Then I tried a classic pipes-and-tank math problem which also was solved correctly as expected. By the way, don't replace your problem solving ability with AI all the time. I was just testing these things.
Solving a pipes-and-tank math problem
Describing images
I gave it a screenshot of an 8086 CPU pin diagram. The Image tab described it as a 40-pin DIP package and then listed each pin with its label. Handy if you want a quick text version of a diagram, or a starting point for alt text.

Picking colors
I snipped the It's FOSS home page and used the Color tab. It listed the main colors in hex, with what each one is used for: teal for the banner and buttons, dark charcoal for the background, and so on.

Translation
I used a short Japanese paragraph about Ubuntu. Translate turned it into proper English. You can change the target language from the drop-down above the result.

Calendar events
This one surprised me. I snipped the details of a Fedora Linux 45 release party, with date, time, location and description. The Calendar tab turned it into a valid iCalendar entry, and there's a Save .ics button to save it as a file.

Quick actions on copied text
Snippai also works on text you've copied. Pick Quick Action on Clipboard Text from the tray menu, and it opens with the clipboard content and a set of text actions like Rewrite, Translate, Solve and Explain.
To test it, I copied a sentence about Linux full of grammar and spelling mistakes. The Rewrite action fixed the first half but left "alot of computor's" and "servor arround the wurld" untouched. That was a bit odd.

Custom actions fix that
This is where custom actions come in. In Settings -> Actions, you can add your own action with a name and a prompt. You choose whether it applies to images, text or both, whether it gives an answer or replaces the text, and the output format.

I created a "Fix Grammar" action with a prompt to correct spelling, grammar and punctuation without changing the meaning. Running it on the same sentence fixed every mistake.

It's a regular screenshot tool too
You don't have to send every snip to the AI. The capture toolbar has rectangle, ellipse, arrow, pen, text and pixelate tools, with a few colors and sizes. Annotate your snip and save it with the download button.

There's a Long screenshot button on the same toolbar for scrolling captures, with options for auto-scroll speed in the settings.

Sticky notes
Click the pin button on a result, and it turns into a small floating "Snippai Note" window with the snip and its result. It stays on screen while you work, and you can hide or show all notes from the tray with Toggle Sticky Notes.

The account login didn't work
There's a Login button at the top of the window. When I tried to register an account from the app, it failed with an email rate limit exceeded error. Everything above worked without an account using my own API key, so it isn't required.
Final thoughts
Since I am still learning the ropes of local AI on a modest laptop, I could not make it work with Ollama. I tried Qwen 2B but the model is too small and the context perhaps was too much for it.

Snippai is more suited for people in academics who have to deal with a lot of forumals. Students or people working on digitizing old hand-written notes may also benefit from it.
It recognized everything I threw at it: handwriting, formulas, code, a pin diagram, a translation and an event description. The LaTeX and calendar outputs are the most useful parts for me, and custom actions let you shape it around your own workflow.
Sure, the main power is the LLM used here. You may also just paste these things in a cloud AI tool like chatGPT or Claude and it may work the same but having it in a dedicated tool is better for focused work, I think.
Also, for academics and people who have access to better GPU for local AI tools, Snippai could prove a tool worth trying for.
You can get Snippai from its official website and find the source code on GitHub.
What do you use to grab text from screenshots on Linux? Let me know in the comments.
If this helped you, consider supporting It's FOSS
It's FOSS has been helping people use Linux for the past 14 years. Help us stay independent from big tech. Become a Plus member, enjoy ad-free reading and get 5 eBooks.
Skip the AI slop and SEO spam in your Google results
Tell Google you prefer It's FOSS, and it will show our Linux news and tutorials, created by experienced Linux users, more often when you search. It takes just a click.
Set as preferred sourceGet FOSS Weekly in your inbox