yq can manipulate just the frontmatter of a file with its --front-matter flag. This should be useful for trying to merge my notes on books with my Calibre database.