hardware:
a PN532 nfc card reader with usb TTL

⚠️remember to set switch bits to serial port comm mode on PN532 before connect to USB TTL
Software
install mfoc with brew
brew install mfoc
Experiment
back up current card
sudo mfoc -O bak.mfd
write card (for a blank card with no block 0)
nfc-mfclassic w a u bak.mfd
write card(attempt to overwrite block 0 including UID)
nfc-mfclassic W a u bak.mfd
Other Examples(for cards with key A):
Read card to file, using key A:
nfc-mfclassic r a u mycard.mfd
Write file to blank card, using key A:
nfc-mfclassic w a u mycard.mfd
Write new data and/or keys to previously written card, using key A:
nfc-mfclassic w a u newdata.mfd mycard.mfd
Format/wipe card (note two passes required to ensure writes for all ACL cases):
nfc-mfclassic f A u dummy.mfd keyfile.mfd f
nfc-mfclassic f B u dummy.mfd keyfile.mfd f
Read card to file, using key A and uid 0x01 0xab 0x23 0xcd:
nfc-mfclassic r a U01ab23cd mycard.mfd
reference