nrp wrote a script to generate keys compatible with Kwikset KW1.
But the obsolescent KW1 has been falling out of use in new locks for almost two decades so I adapted the script for the newer 6-pin KW10 locks. (The KW10 doesn't add any other sophistication--just one extra pin.)
Download and run the OpenSCAD script with the appropriate pin numbers for your lock. To aid in matching keys, the script includes common cut-to-keel measurements for common pin indexes. Measure your key with a vernier caliper and locate the closest match in the list.