Cannot add attachments from the CLI

  • Unknown's avatar

    I have been working with the CLI this week and noticed that the -a flag does not properly pull in attachments. If it is an image (I tried .png and .jpg) it shows a blank square where the image should be, and if it is audio (I tried .wav, .m4a, and .mp3) it shows an unplayable file that is 0 seconds in length.

    Anyone else experiencing this? Known bug right now?

  • Unknown's avatar

    Sorry about this, Craig. This is a known bug we have not resolved on this CLI as we’ve been building out a new CLI that’s far more advanced and maintained. We’re planning to make it public this week. Stay tuned. I will update this thread with the announcement.

  • Unknown's avatar

    Well, that’s actually good news! Can’t wait to see the new CLI.

  • Unknown's avatar

    Any updates on this?

  • Hi @craigeley – Sorry it’s taking longer than expected. We’re aiming to release it in the next month, but it’s not fully stable yet.

    If you want to try it as-is, you can find it here: https://www.npmjs.com/package/@dayone/cli

    Feedback and bug reports are appreciated! Thank you.

  • Unknown's avatar

    Hey @staff-donnie – finally had some time to mess around with this, and it is pretty powerful! If I’m understanding this correctly, this basically works completely independently of having the app installed, right? It seems to make its own version of the your Day One db and works directly between that and the cloud? Obviously this feels like it has big implications for headless computers and agentic workflows.

    My one item of feedback so far is that–for human users–I wish there was a less verbose version of dayone list journals for when I’m just trying to grab a journal id, but maybe I’m missing something obvious there. Thanks!

  • Unknown's avatar

    Hi, I found the new @dayone/cli (v0.21.0) via this thread. Agree an easier way to get the journal ID would be helpful, although they are easy to find in the app UI. Great to have this new more powerful system. I have a question about inline attachment placement:

    The README suggests that attachments can be positioned within the entry body using:

    ![](dayone-moment://)

    This works as expected with an image:

    dayone entry write
    --journal-id <journal-id>
    --body $'Beforenn![](dayone-moment://)nnAfter'
    --attach image.png

    But doesn’t work using the same syntax with a PDF:

    dayone entry write
    --journal-id <journal-id>
    --body $'Beforenn![](dayone-moment://)nnAfter'
    --attach document.pdf

    Is this a known issue or something that can be fixed in a future release? Thanks.

  • Unknown's avatar

    Hey @staff-donnie, is there any news on this issue with PDF placement in the new CLI? It isn’t fixed as of v0.21.1.
    Thanks as always for all the hard work on Day One :)

  • That matches what other CLI users have reported: the -a flag creates the entry, but the attached file itself doesn’t come through. Images appear as a blank square, and audio plays as a 0-second, unplayable clip.

    This is a known issue. There’s no officially supported fix on the user side yet. A few people have had partial luck by staging the file inside Day One’s own app container folder, under ~/Library/Group Containers/5U8NS4GX82.dayoneapp2/, before running the command, rather than pointing -a at a file on the Desktop or in Downloads. It’s not guaranteed to work for every file type, and it’s not something we can vouch for, but it’s worth a try.

    The real fix is a bigger change than a quick patch, so we don’t have a timeline to share, but it’s on our list.

    @chadpardoe, on the PDF question: that’s likely the same underlying cause, since it comes down to the CLI reading a file from outside its container.

Reply to Cannot add attachments from the CLI