The save tool of the opensnes-* family (The opensnes-* tools: conventions). A .srm is the raw image of a cartridge's save RAM: what an emulator writes beside the ROM, and what luna reads and writes with srm_in / srm_out in a test manifest. opensnes-save makes one, reads one, patches one and compares two — so a test can start from a prepared save instead of playing up to it, and a run's save can be read without a hex editor.
The file has no structure of its own: offsets are the ones your game hands to sramSaveOffset() / sramLoadOffset() (SRAM Save Tutorial).
The size is read from the ROM header: $FFD8 (1 KB << n: 8 KB with the default SRAM_SIZE := 3, 32 KB of BW-RAM on SA-1), or, for a Super FX cartridge, the expansion RAM declared at $FFBD, which the battery keeps (64 KB by default) — the snesdev wiki's ROM header page is the reference for both bytes. A ROM that declares no save RAM is refused, with the Makefile line that adds it (USE_SRAM := 1).
Every subcommand takes --json.
The save is a file of the project, under version control like the manifest that reads it. When the save's layout changes, opensnes-save get on the old file and set on a new one is the migration, in a script.
It does not know your save's layout: no checksum, no version field, no slot table. Those belong to a save format, which the SDK does not define in 1.0 — the sram module copies bytes. It is planned for 1.1, and this tool will then verify and migrate it.