So you want to send photos to your photo stream on iCloud. I looked for an API and couldn't find one. So I made this mess. It uses AppleScript to launch iPhoto and then puppeteers it until the photos are in iPhoto.