Bluetooth HM-10 in central mode bonding with another bluetooth device
The manual for the HM-10 can be found here.

Page 11 has the AT command you are interested in: AT+PIN:

AT+PIN123456
OK+Set:123456


By default the PIN is 000000.

(The manual is quite vague about the role of that command, so I assume since it is the only reference to PIN codes that it does what you require).