How to upload assets without user interaction?
Answering my own question for reference.
I was tunneling too hard on the PHP, a simple bash script takes care of the upload.
# assuming the image is already downloaded and no CP-login required
curl -F assets-upload=@/path/to/image mycraftsite/admin/actions/assets/uploadFile

EDIT
Better answer: Thanks to this answer I discovered the insertFileByLocalPath() function in AssetsService.
  $entry = craft()-&gt;entries-&gt;getEntryById($id);
  if($entry &amp;&amp; isset($entry[&quot;imageFetchUrl&quot;])) {
    $url = $entry-&gt;getFieldValue(&quot;imageFetchUrl&quot;);
    $tmpfname = tempnam(&quot;/tmp&quot;, &quot;UL_IMAGE&quot;);
    $img = file_get_contents($url);
    file_put_contents($tmpfname, $img);
    craft()-&gt;assets-&gt;insertFileByLocalPath($tmpfname, 'fetchedImg.jpg', $myFolderId);
  }