SuperMario64GameSharkWriter is an open source 3-BSD command line program written in C that writes GameShark/Xploder64 codes into a Super Mario 64 USA ROM (must be .z64/big endian format), and modifies the CRC check if neccesary (making this an alternatie to the CHKSUM64 program) allowing edited ROMs to boot in emulators. Unlike the old CHKSUM64 program the ROM will work in Mupen64Plus and many other emulators.
You can write a list of GameShark codes in a txt file, and SM64GSW can write each code line by line into a ROM file. Alternatively, you can type each code into SM64GSW.
As of version 1.1, Linux x86, Linux x86_64, and Windows 95-Windows 10 builds are available on the official web page
(which also contains the complete documentation.