CLI: Creating entries with photos/attachments is broken

  • Unknown's avatar

    Currently, trying to create a new entry with a photo/attachment using the CLI is broken. For example:

    dayone -j test -a photo.jpg -- new This is a test

    The command succeeds and a new entry is created, but the entry shows an empty frame instead of the image.

    I emailed support and they were able to reproduce this bug, but it isn’t prioritized since they haven’t received any other tickets about it. If you are trying to use this functionality, please email them or comment so they can move this up in their backlog.

    CLI version: 2026.3.2.1730

  • Unknown's avatar

    I managed to work around this issue, but agree that its a proble.

    One detail that seemed important: I copied the media into a temporary folder inside Day One’s group container first, cleared extended attributes, then passed those absolute staged paths to the long-form attachments option:

    dayone –attachments /absolute/path/photo1.jpg /absolute/path/photo2.jpg — new

    The files had already been in a stable local folder, but staging them somewhere Day One itself could clearly access seemed to be part of what made the import reliable.

    After creating each batch, I also opened one of the new entries in Day One so the app could finish processing/rendering the attachments.

    One caveat: the attachments initially appeared individually in the body. I needed a follow-up pass to replace the placeholders with the generated dayone-moment://... references and place those refs together, which made Day One render them as a grouped gallery.

    Anecdotally, this worked for me across 100+ created entries with 500+ media items. Codex helped a lot in the troubleshooting…

  • Hi folks,

    We now offer a new standalone Day One CLI for macOS, Windows, and Linux (blog announcement coming soon). It supports photo, video, audio, and PDF attachments, plus commands to read and update entries.

    This is a separate tool from the older Mac CLI, with different commands. To install it through npm, you need Node.js LTS:

    npm install -g @dayone/cli@latest
    dayone --version
    dayone setup
    dayone sync
    dayone list journals

    Copy your target journal’s ID from the last command. Replace YOUR_JOURNAL_ID below, then create a test entry:

    dayone entry write --journal-id "YOUR_JOURNAL_ID"
    --body "A photo from today"
    --attach "/absolute/path/photo.jpg"
    dayone sync

    You can repeat --attach to include multiple files. The CLI saves changes locally first. dayone sync uploads them to your account. Keep the attachment files in place until sync completes.

    One detail for existing CLI users: both tools can use the name dayone. Check which -a dayone on your Mac and confirm that dayone --version reports the new version, currently 0.22.0.

    Please try a new test entry first. If an attachment still fails, let us know the CLI version, file type, and error message. (But friendly reminder please don’t share private journal content or encryption keys).

  • Unknown's avatar

    @jplaut – I’m having the same issue, did you work out how to remove the blank images?

    @samuelseay the new cli is still in beta and I don’t want to move to it until yet. Are you going to fix this issue in the existing cli?

  • @williamsdb: Unfortunately, the existing bundled CLI will not get a direct fix for the blank image issue. The CLI is packaged inside the Day One app itself, and that packaging puts it under Apple’s App Sandbox restrictions, which block it from reading file paths outside Day One’s own storage. (It used to work, but with changes to the sandbox restrictions in macOS, it doesn’t work anymore.) That is why the entry gets created but the photo cannot be read in. It is a structural limitation of how the current CLI is distributed, not something a patch to the existing CLI can resolve.

    The new standalone CLI (package @dayone/cli, currently version 0.22.0, installable via npm for macOS, Windows, and Linux) is the supported path going forward and handles photo, video, audio, and PDF attachments without this restriction. It’s undergoing active development, and it’s what we recommend for current use.

    If you would rather stay on the existing CLI for now, chrisbc14cfdbb6’s workaround earlier in this thread, staging files inside Day One’s group container, clearing extended attributes, then passing the staged absolute paths with the long-form attachments option, is still the only way to get images to render. It takes more steps than a normal import.

    If you try the new CLI and run into any problems, posting the version, file type, and exact error here will help get it looked at.

  • Unknown's avatar

    Thanks @staff-brandonh and @samuelseay. I’ve tried the new CLI (0.22.1) and can confirm attachments work. entry write --attach uploads photos and they render correctly after dayone sync. However, I am currently unable to switch over because the new CLI does not allow for setting entry location, time zone, stars, or tags (the Github README says it supports this, but I was unable to get it working using the npm installed package). Is there a timeline for adding these to entry write?

    CLI versions: @dayone/cli 0.22.1 on macOS; bundled CLI from the current Mac app.

Reply to CLI: Creating entries with photos/attachments is broken