The Jdenticon CLI tool can be used to generate identicons. You can also use it from build scripts etc.
npx jdenticon <value> [-s <size>] [-o <filename>]
In this example an icon is generated for the value "user127" with the shortest possible command line. It will create a PNG icon and write it to stdout.
npx jdenticon "user127"
Below is the --output option used to write the icon to a file. The format is determined from the filename. --back-color is used to remove the transparent background.
npx jdenticon "user127" --output "user127.svg" --back-color "#fff"