Yeah, Andrew Chow's signapple (macOS), and osslcodesign (windows).
Both programs have their own file format for the detached signatures, and require each to be installed by people applying the detached signatures. I went with a standardized way with a single file format for both.
I ended up using Rust's apple-codesign because there were some finicky things with signapple, no built in notarize capability, doesn't work with smart cards.
All in all, works out well. The diff-CLI tool is also just a wrapper around the core kotlin multiplatform library, so is usable in applications too!