Yurij Mikhalevich
January 21, 2024

Next-Level Terminal Image Search: rclip Gets Previews

Hi everyone!

I’m thrilled to share a long-overdue update about an exciting rclip feature. Now, you can preview search results directly in the terminal!

If you’re new to rclip, it’s an AI-powered command-line photo search tool – think “rgrep” for images. Dive into my previous posts and give it a spin to learn more.

Now, let’s talk about the new preview feature. To witness the magic, simply add the --preview (or -p) argument to your rclip command, like this: rclip -p kitty. Check out the video below to see it in action.

Some might argue that the ability to preview images was in rclip before because you can pipe filenames output by rclip to any other command. You might remember reading a suggestion about piping filenames to an image viewer in rclip’s README. It worked, but the command was a bit of a monstrosity. You had to remember the -f argument, deal with xargs intricacies, and know how to call the viewer you want to use.

The other issue with that suggestion is that it doesn’t work over SSH. This is especially important to me because I do a lot of searches on a remote machine. And, even if you make it work over SSH somehow, it will be slow because it has to transmit the whole image over the network to display a preview unless you go further and compress it yourself.

Now, these problems are no more. I’ve addressed these issues with the new preview feature! No more cumbersome commands. Now, it’s as simple as typing rclip -p kitty, and voila – compressed image previews right in your terminal. It also works seamlessly over SSH. No more sluggish previews; just a smooth, optimized experience, even on remote machines.

The feature is compatible with iTerm2, Konsole (version 22.04 and higher), wezterm, Mintty, and mlterm.

Get the feature by following the instructions in the repository’s README to download the latest version of rclip. Try it out and share your thoughts. Stay curious, and enjoy your photo searches with rclip!

ABOUT YURIJ MIKHALEVICH
Makes magic at QA Wolf, creator of the Move Fast and Break Things community of software engineers, DeepLearning.AI mentor, creator of rclip, writes about tech, software engineering, books, what to watch, and beyond, practices creative writing and captures moments through photography
This post is tagged with software engineering. Grab the software engineering RSS feed or the main RSS feed to get future posts.