Dump iCloud keychain in Terminal
iCloud Keychain is stored on disk in a different format than a traditional keychain ref1, ref2. It's located at ~/Library/Keychains/ in a folder named as a long UUID. You can see the modified timestamp change on the contents of that folder as you change something in your iCloud keychain.

Whilst you can use AppleScript and Usable Keychain Scripting to work with the system and login keychains, there's no way to access the iCloud keychain.

So the only option you're left with is to AppleScript GUI operation of the Keychain Access app.