It really shouldn’t be this hard to be able to derive a Plex item ID from the path to a file.

One literally it seems has to parse the database, there isn’t a way to do it in one delightful command line invocation.

The other way around sure, Plex Media Scanner does the trick.