gyotaku README

The project's README from github.com/xevrion/gyotaku. As one markdown file: README.md.

gyotaku: search every screenshot by the text inside it

Search every screenshot you have ever taken by the text inside it.
Native on Linux, macOS and Windows, fully offline, and fast on any hardware, with or without a GPU.

Website | Installation | Usage | Troubleshooting | Contributing

CI GPL-3.0 licensed Linux, Windows and macOS PRs welcome

gyotaku reads the text in every screenshot you take and makes it searchable. Press a shortcut, type a few letters of anything you remember seeing, and every matching screenshot appears with the matched words highlighted in place. Open one to copy its text, a selection of lines, or the image itself.

All processing happens locally. gyotaku does not take screenshots itself; it indexes the folders your existing screenshot tool saves to.

Highlights

Metric Result
Search latency, 5,000+ screenshots 1 to 10 ms per keystroke
Screenshot saved to searchable 0.77 s
Window summon time ~120 ms
Frame rate with a GPU 144 fps (display refresh rate)
Memory while idle in the background 37 MB
Disk usage ~30 MB per 1,000 screenshots

It also runs without a GPU, using software rendering. All figures were measured on real hardware; see Performance for the full results and methodology.

Installation

Linux

curl -fsSL https://raw.githubusercontent.com/xevrion/gyotaku/main/install.sh | sh

The script downloads the latest release for your machine, verifies its SHA-256 checksum and installs gyotaku and gyotaku-app to ~/.local/bin, with an entry in your app launcher. It needs no root access and changes nothing outside your home directory. On a first install it opens gyotaku so you can choose your screenshot folders, then shows how to add a keyboard shortcut for your desktop.

Each release also has a .deb for Debian and Ubuntu and an .rpm for Fedora and openSUSE, which install to /usr/bin through your package manager:

# Debian, Ubuntu (replace x86_64 with aarch64 on ARM)
curl -fsSLO https://github.com/xevrion/gyotaku/releases/latest/download/gyotaku-x86_64-linux.deb
sudo apt install ./gyotaku-x86_64-linux.deb

# Fedora
sudo dnf install https://github.com/xevrion/gyotaku/releases/latest/download/gyotaku-x86_64-linux.rpm

These don't update on their own yet; install the newer one the same way. More packages are on the way, see packaging.

Release builds run on x86_64 and ARM64 with glibc 2.35 or newer: Ubuntu 22.04, Debian 12, Fedora 36, Linux Mint 21, Pop!_OS 22.04 and later, as well as Kali, Arch Linux and openSUSE Tumbleweed. Anything else can build from source.

Windows

Windows support is a preview. In PowerShell:

irm https://raw.githubusercontent.com/xevrion/gyotaku/main/install.ps1 | iex

This installs to %LOCALAPPDATA%\Programs\gyotaku, adds gyotaku to the Start menu and opens it. Press Alt+Shift+S anywhere to open or close the search window. No administrator rights are needed. Windows 10 and 11 on x64 are supported; ARM64 runs the x64 build through emulation. While it waits, gyotaku sits in the notification area: click its icon to open the window, right-click it for settings or to quit. The window never takes a taskbar button, and Alt+F4 just puts it away.

If you prefer a regular installer, download gyotaku-setup-x86_64.exe from the latest release and run it. It installs the same files to the same folder, also without administrator rights, and lists gyotaku in Settings > Apps so it can be uninstalled from there. The setup is not code-signed yet, so SmartScreen may warn about an unknown publisher; choose More info and then Run anyway. The setup and the PowerShell command update each other's installs.

macOS

In a terminal:

curl -fsSL https://raw.githubusercontent.com/xevrion/gyotaku/main/install.sh | sh

The same installer as on Linux: it downloads the release for Apple Silicon Macs, verifies its SHA-256 checksum and installs gyotaku and gyotaku-app to ~/.local/bin, with ONNX Runtime beside them. Apple Silicon (arm64) is supported. Microsoft publishes no ONNX Runtime build for Intel macs, so those need a build from source with ORT_DYLIB_PATH pointing at an onnxruntime library.

It also adds gyotaku.app to ~/Applications, so Spotlight and Launchpad can open it. Like Raycast, it runs without a Dock icon: while it waits it sits in the menu bar, whose menu opens the window or settings and is where it's quit. Cmd+W and Cmd+Q in the window just put it away.

Config, index and models live in ~/Library/Application Support/gyotaku, thumbnails in ~/Library/Caches/gyotaku.

Keyboard shortcut (Linux and macOS)

On macOS the app registers the shortcut itself: Alt+Shift+S opens the search window, and pressing it again closes it. The key can be changed in the settings.

On Linux, gyotaku-app opens the search window, and pressing the same shortcut again closes it. Bind it in your desktop's keyboard settings, using the full path ~/.local/bin/gyotaku-app, since some desktops do not use your shell's PATH:

Environment Configuration
GNOME Settings > Keyboard > View and Customize Shortcuts > Custom Shortcuts > Add
KDE Plasma System Settings > Keyboard > Shortcuts > Add New > Command or Script
Xfce Settings > Keyboard > Application Shortcuts > Add
Cinnamon System Settings > Keyboard > Shortcuts > Custom Shortcuts > Add custom shortcut
sway, i3 bindsym $mod+s exec ~/.local/bin/gyotaku-app
Hyprland bind = SUPER, S, exec, ~/.local/bin/gyotaku-app
niri Mod+S { spawn "~/.local/bin/gyotaku-app"; } in the binds block
Other Any "run a command" shortcut. gyotaku-app can also be run from a terminal.

First run

On first launch, gyotaku asks:

  1. Which folders contain your screenshots. It suggests the save locations of common screenshot tools (Flameshot, Spectacle, ksnip, grim, Hyprshot, niri) along with ~/Pictures/Screenshots, ~/Pictures and ~/Desktop, with the number of images in each. On Windows it suggests Pictures\Screenshots, where Win+PrtScn and the Snipping Tool save.
  2. Whether to index new screenshots in the background. On Linux this installs a systemd user service, or an XDG autostart entry on systems without systemd. On Windows it starts gyotaku when you sign in. On macOS the settings toggle "start at login" installs a launchd agent that reads new screenshots in the background.

Indexing starts immediately, newest screenshots first, at idle CPU and I/O priority. Search is available while it runs.

Before the first screenshot is read, gyotaku downloads the OCR models once (22 MB), and on Linux and macOS ONNX Runtime as well (24 MB on Linux). No network access is needed after that.

Updating

Run the install command again, or on Windows the newest setup. It replaces the programs and restarts the background indexer; the index, settings and thumbnails are kept.

Uninstalling

Linux:

curl -fsSL https://raw.githubusercontent.com/xevrion/gyotaku/main/install.sh | sh -s -- --uninstall

Windows, in PowerShell:

$env:GYOTAKU_UNINSTALL = 1; irm https://raw.githubusercontent.com/xevrion/gyotaku/main/install.ps1 | iex

Installed with the setup on Windows, gyotaku can also be uninstalled from Settings > Apps, which asks whether to delete the index and settings too.

macOS:

curl -fsSL https://raw.githubusercontent.com/xevrion/gyotaku/main/install.sh | sh -s -- --uninstall

These commands stop the background indexer and remove the programs, and print how to also remove the index and settings. On Linux, remove the keyboard shortcut yourself. gyotaku never modifies or deletes your screenshots unless you move them to the trash yourself.

Build from source

Building needs Rust and a C compiler. The steps below are verified in CI from a clean image of Ubuntu 22.04, Debian 12, Kali, Arch Linux, Fedora and openSUSE Tumbleweed.

1. Install build dependencies

Ubuntu, Debian, Kali, Linux Mint, Pop!_OS

sudo apt install git curl build-essential pkg-config libfontconfig-dev libxkbcommon-x11-dev libwayland-dev libx11-xcb-dev

Arch Linux, Manjaro, EndeavourOS

sudo pacman -S --needed git curl base-devel fontconfig libxkbcommon-x11 wayland libxcb

Fedora

sudo dnf install git curl gcc gcc-c++ make pkgconf-pkg-config fontconfig-devel libxkbcommon-x11-devel wayland-devel libxcb-devel

openSUSE

sudo zypper install git curl gcc gcc-c++ make pkg-config fontconfig-devel libxkbcommon-x11-devel wayland-devel libxcb-devel

Optional: install wl-clipboard (Wayland) or xclip (X11) to enable copying images, and saving copied images (off by default). Copying text works without them.

macOS: the indexer (gyotaku) builds with the Xcode Command Line Tools alone, which provide the C compiler that the bundled SQLite compiles with:

xcode-select --install

The search window (gyotaku-app) additionally needs full Xcode, free from the App Store, because the UI toolkit compiles Metal shaders at build time. With only the Command Line Tools installed that build fails with cannot execute tool 'metal'; if a fresh Xcode still lacks it, run xcodebuild -downloadComponent MetalToolchain once.

On an Intel mac, ONNX Runtime also has to be provided separately, since Microsoft publishes no macOS x86_64 build of it: install or build onnxruntime and set ORT_DYLIB_PATH to its library (see Compatibility). Apple Silicon needs nothing beyond Xcode; the runtime is downloaded on first use.

2. Install Rust

gyotaku requires Rust 1.95 or newer. Install it with rustup rather than your distribution's package manager, whose version is usually older:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Open a new terminal afterwards so that cargo is on your PATH. The repository's rust-toolchain.toml selects the correct version automatically.

3. Build and install

git clone https://github.com/xevrion/gyotaku && cd gyotaku
cargo install --locked --path crates/cli     # gyotaku: the indexer and command-line interface
cargo install --locked --path crates/app     # gyotaku-app: the search window

Both binaries are installed to ~/.cargo/bin; use ~/.cargo/bin/gyotaku-app for the keyboard shortcut. The first build compiles the UI toolkit from source and takes several minutes. It requires about 3 GB of free disk space while running; the build directory is removed afterwards.

To update a source build, git pull and run both cargo install commands again, then systemctl --user restart gyotaku-watch and pkill -x gyotaku-app so the new version is used. To remove it, run the uninstall command above, then cargo uninstall gyotaku gyotaku-app.

If anything does not work as described, see Troubleshooting.

Usage

Key Action
Type Search. Partial words match: nutsmp finds donutsmp.net.
Arrow keys Move between results
Enter Open the selected screenshot
Ctrl+C Copy the screenshot's text, or the selected lines
Ctrl+Shift+C Copy the image
Ctrl+, Open settings
Ctrl+E Show the similar screenshots folded behind the selected one
Ctrl+Shift+A, Ctrl+Delete Mark every result, then move them to the trash. Ctrl+Z puts them back.
Escape Clear the search, then close

Every word in a query must appear somewhere in the screenshot, not necessarily on the same line. Filters narrow it down by folder and date: otp in:discord date:week. On an open screenshot, drag a box to copy only the lines inside it.

A command-line interface is also available:

gyotaku search invoice march

See the usage guide for all keys, settings and commands.

Privacy

gyotaku runs entirely on your machine. It has no telemetry, accounts or update checks. Its only network access is the one-time download of the OCR models (from this repository's releases, with ModelScope as a fallback) and ONNX Runtime (Microsoft's official build, from GitHub), each verified against a pinned SHA-256 checksum before use.

Roadmap

Suggestions are welcome as feature requests.

Documentation

Document Contents
Usage Keys, mouse controls, settings, the command-line interface, file locations
Troubleshooting Build, launch, search, indexing and clipboard problems
Compatibility Supported desktops, GPUs, distributions and CPUs, and known limitations
Performance Measured CPU, memory, frame time and disk usage
Architecture How OCR, indexing and the search window work, and why
Development log Measurements, rejected approaches and notable bugs from development

Contributing

Contributions are welcome. See CONTRIBUTING.md for the development setup and pull request guidelines. Questions belong in Discussions. Report security issues as described in SECURITY.md, not in public issues.

Testing on untested configurations is particularly valuable. GNOME, KDE Plasma, integrated GPUs, ARM and non-systemd distributions have not been verified yet. Please submit a compatibility report whether it works or not.

Built with

Text detection post-processing, line extraction, batching and decoding are implemented in this repository.

About the name

Gyotaku (魚拓) is a traditional Japanese method of recording a catch: the fish is inked and pressed onto paper to make a lasting print. The search window borrows the idea. While you search, every screenshot is inked dark and only the matching words remain lit.

Star history

Star history for xevrion/gyotaku

License

gyotaku is licensed under the GNU General Public License v3.0 or later.

IBM Plex Sans is bundled under the SIL Open Font License 1.1 (crates/app/fonts/OFL.txt). The PaddleOCR models are licensed under Apache-2.0; they are downloaded at runtime and not distributed with this repository.

gyotaku (xevrion/gyotaku)

Searching Database…

What is this?gyotaku is a native desktop app that OCRs every screenshot you take and lets you search them by the text inside them instead of by filename. It runs on Linux, macOS, and Windows, entirely offline, and highlights the matched words when you open a result.
Does it take the screenshots itself, or just index ones I already have?It does not capture screenshots itself: it watches the folders your existing screenshot tool (Flameshot, the Snipping Tool, macOS screenshots, etc.) already saves to, OCRs new images as they appear, and indexes the text.
How do I install it and start searching?On Linux and macOS you run the official install script, which puts gyotaku and gyotaku-app in ~/.local/bin and lets you pick your screenshot folders on first launch; .deb/.rpm packages are also available for Linux. On Windows it's a PowerShell command or a setup.exe that installs to %LOCALAPPDATA%. After installing, press Alt+Shift+S to open the search window.
Is Windows and Mac support fully ready?Windows support is explicitly marked a preview, and its installer isn't code-signed yet, so SmartScreen may warn about it. On macOS only Apple Silicon works out of the box; Intel Macs require a manual source build since Microsoft publishes no macOS x86_64 ONNX Runtime.
Does any of my screenshot data leave my machine?No, all OCR and search processing happens locally with no telemetry, accounts, or update checks; the only network access is a one-time, checksum-verified download of the OCR models.
How fast is the search in practice?On a library of 5,000+ screenshots it returns matches in 1 to 10 ms per keystroke, and a newly saved screenshot becomes searchable in about 0.77 seconds, with idle memory around 37 MB.
Can it handle OCR mistakes, like a 0 read as an O?Yes, search is typo-tolerant for common look-alike OCR misreads, but exact matches always rank first and near-matches are labeled as such so error codes are never silently corrected.
What is gpui?gpui is the GPU-accelerated Rust UI toolkit (from the Zed editor project) that renders gyotaku's search window, letting it hit 144 fps with a GPU or fall back to software rendering without one.
Can I use it from the terminal instead of the search window?Yes, gyotaku ships a command-line interface alongside the GUI window for querying your indexed screenshots directly from a terminal.
Creator
xevrion
Size
5.3 MB
Stars
341
Age
22d
Commits · 90 Days