Szymon Kaliski

Keeping Archivist Alive, and Other Side-Projects

Hi!

A couple of side-project updates: keeping my archival tool alive, ssh-over-web-browser tailored to my needs, and a slightly better dictation CLI.

Archivist Updates

I continue to use, and get a lot of value out of, Archivist.

Since the original post about the project, six years ago (sic!), the tool got extended with collecting screenshots, finding similar items across all sources, and recently moved to my new Home Server, hosted as a permanent web app.

For collecting screenshots, I use a two-tier system:

  1. I have a couple of Hammerspoon shortcuts ↗ overriding the default macOS ones, that take the screenshot, place it in Dropbox/Screenshots/ folder, and inject OCR text into the files through a combination of tinyocr ↗ and xattr ↗. Dropbox only supports a subset of xattr, so this took some figuring-out, but I managed to find a way to sync them with the Home Server, with the OCR data surviving in the file. I could do OCR purely in Archivist and save some headaches, but the nice side-effect of having it in xattr is that Spotlight indexes that data, so I can do a quick search for image content directly from Spotlight.
  2. Archivist does a refresh of all its sources hourly, and as part of that, picks up any changes to the Dropbox folder, and updates its local DB.

Similarity search was a fun recent addition. As part of the hourly refresh, all images are processed on-device with DINOv2-base for embeddings (after some extra post-processing to make them square, without alpha channel, etc.). The resulting vector is stored in the SQLite as a blob of numbers.

Together with this, textual values (like the OCR info, metadata, etc.) are embedded with MiniLM-L6-v2, and stored into another table.

The final search uses HNSW index ↗ for super fast fetches (under 16ms for my ~10k items), and combines results from image and text similarity searches.

All together, we get this:

Telegraphist

On the topic of always-on custom services, I couldn't find any app that would tick all the boxes for my ssh-from-iPhone needs:

  • I continue to stubbornly use base16-shell ↗ for terminal theming, so I can very easily set colors with a simple command, even though I rarely use it.
  • I wanted something that works with terminal graphics, as I — also rarely — use timg ↗ to poke at images inline.
  • Finally, on the Home Server, I'm always in a tmux session, so a native support for that would be nice.

I poked around AppStore, but couldn't find anything ticking at least some of these boxes. I also tested a handful of "web TTY" kinds of things, but nothing sparked joy. So, I made my own TTY-in-a-browser: Telegraphist.

It didn't take much prompting to combine a PTY library, a WebSocket connection, and xterm.js and get something tailor-made for me.

The base16-shell colors not only work in the terminal, but also impact the minimal UI:

I can look at images:

And there's a native tmux integration:

The most fun part of this project was cutting corners to get to a rough first working version, and then working on improvements from within itself.

Tinyparakeet

Exactly a year ago I wrote about a small Whisper wrapper that I used to use for dictation.

Since then I discovered parakeet family of models, and made tinyparakeet — a small CLI tool for speech-to-text, fully on-device:

It's open source if you, like me, rarely have a need for dictating things, and mostly live in CLI: szymonkaliski/tinyparakeet ↗.

Worth Checking Out

What I've been reading lately:

On the web: