flmdb GitHub

Film database · command line

flmdb.

Catalog what's actually on your shelf. Add a disc, attach its IMDb ID, and let the OMDb API fill in the director, genre, runtime, and plot.

Everything lives in one local SQLite file. No account, no server, no sync.

Or build it yourself — Rust 1.70+

$ cargo install --path .

Circulation record flmdb.db
ID IMDb Title Yr Format
1tt0083658Blade Runner19824K
2tt0133093The Matrix1999Blu-ray
3tt0013442Nosferatu1922DVD
4tt2543164Arrival2016Blu-ray
4 records Indexed on title · imdb_id

Download

Latest release

A single binary with SQLite compiled in — nothing else to install. Unpack it, put it somewhere on your PATH, and run flmdb --help.

macOS

aarch64-apple-darwin

Your system

For Apple Silicon (M1 and later). Unsigned, so the first run needs xattr -d com.apple.quarantine flmdb.

Download .tar.gzApple Silicon

Intel Mac build

Linux

x86_64-unknown-linux-gnu

Your system

Built against glibc 2.31, so it runs on Ubuntu 20.04 and anything newer. Mark it executable with chmod +x.

Download .tar.gz64-bit

ARM64 build

Windows

x86_64-pc-windows-msvc

Your system

Extract flmdb.exe and run it from PowerShell or Terminal. SmartScreen may warn on first launch.

Download .zip64-bit

All releases and checksums

A short session

Actual output
~/films
$ flmdb add -t "Blade Runner" -y 1982 -f "4K" -i tt0083658
✅ Added: "Blade Runner" (1982) [4K] (IMDb ID: tt0083658)

$ flmdb api-key set 8f2c19be
✅ OMDb API key saved successfully.

$ flmdb hydrate
🔍 Hydrating metadata for 1 entries...
  ✓ Hydrated: IMDb ID tt0083658
🎉 Hydration complete.

$ flmdb list --verbose
ID    IMDb ID      Title              Year   Format   Director        Genre
----------------------------------------------------------------------------
1     tt0083658    Blade Runner       1982   4K       Ridley Scott    Sci-Fi, Thriller
      Plot: A blade runner must pursue and terminate four replicants...
----------------------------------------------------------------------------
Total records displayed: 1

Every command

flmdb <command> --help

Eight commands, no hidden state. Records are addressed by their local ID — the number in the first column of list — not by IMDb ID.

CommandArgumentsWhat it does
add -t -y [-f] [-i] Put a film in the catalog. Title and year are required; format defaults to DVD.
edit <ID> [-t -y -f -i] Change one field or several. Anything you don't pass is left alone, including hydrated metadata.
delete <ID> Remove a record. No prompt and no undo — export first if you want a way back.
list [-s] [-v] Print the catalog alphabetically. Search filters on title; verbose adds director, genre, and plot.
export [-f catalog.csv] Write all nine columns to CSV. Overwrites the destination without asking.
import -f <file> Bulk-load from CSV in a single transaction — one bad row and nothing is written.
hydrate [-i <imdb>] Fetch director, genre, runtime, and plot from OMDb. Skips anything without an IMDb ID, and paces itself at 150 ms between films.
api-key set <key> Save your OMDb key to the database so it survives across shells.
api-key list Show the saved key in full.
api-key reset Delete the saved key.

Build from source

If you'd rather compile

Step one

Build deps

SQLite is compiled in, so you need a C toolchain. On Linux, reqwest also wants the system TLS libraries.

# Debian / Ubuntu
$ sudo apt install build-essential \
    pkg-config libssl-dev

Step two

Compile

Clone the repository and install the binary to ~/.cargo/bin.

$ git clone <repo> flmdb
$ cd flmdb
$ cargo install --path .

Step three

Catalog

Pick a directory to keep the collection in — the database is created wherever you run the command.

$ mkdir ~/films && cd ~/films
$ flmdb add -t "Alien" -y 1979
$ flmdb list

Where it lives

A single file, flmdb.db, in your working directory. Run flmdb from somewhere else and you'll get a different, empty catalog — so pick a home for your collection and stay there.

Getting a key

Hydration needs a free OMDb key. Store it with api-key set, or export OMDB_API_KEY in your shell — the database is checked first, the environment second.

Moving your data

export and import both speak plain CSV, so the catalog opens in any spreadsheet. Import reads title, year, format, and imdb_id, and ignores every other column.

Under it

SQLite in WAL mode with indexes on title and imdb_id. Schema changes are applied additively at startup, so an old database upgrades in place.