Send to Day One (via cli)

Hi Folks,

Here is an Action written in JS to export the current Draft to a new Day One journal entry. Unlike the other options listed in the Integration Guide, this one uses the Day One command line interface (CLI) utility. Note that because of this dependency this action is macOS only.

The advantage of this approach is that it preserves metadata, including: tags, creation date, and (most importantly) location.

Send To Day One (via cli)

Before using this, launch Day One and use the “Install Command Line Tools…” option from the Day One menu.

Constructive feedback appreciated, thanks!


Now opens the new entry in Day One and also prompts to archive/trash the draft.

Does this only work on Desktop?

Because of the use of the Dqy One CLI utility, this approach won’t be cross platform. It will be usable on macOS only. The post is tagged for “mac” so there is a suggestion for this - just no explicit mention.

For anyone who might not be familiar with command line interface tools, the linked page on the utility does indicate it is Mac only.

Note: The following information applies to Day One Mac 2.1.2 and later.

I would suggest that the action is set so that it is not listed on iOS. The script step is set to be enabled on Mac, but these action level settings mean the action will be listed.

An alternative might be to have an iOS only step that does not use the CLI utility, or notifies the user that because it needs to utilise the command line tool, it will only function on macOS.

Thanks, have updated the description above, and removed visibility on iOS. Previously I had it disabled on iOS but I guess that is not sufficient.

From what I saw, you had disabled the first step of the action for iOS. That step settings are typically used where you want different steps within an action to run on different OSes.

The settings at the action level determine if the action is visible to end users in non-Management lists on the OSes.

They actually serve different functions, but there are no hard and fast rules on the use as such. I can think of scenarios where you might have a macOS only action visible on iOS and where you might hide an action entirely on both flavours of OS.

1 Like

Understood, thanks for clarifying.

This is really nice and I’ve managed to get it working. I suspect that, looking at the DayOne CLI page, it’s possible to send to a specific journal? I’ve tried amending your script but in the manner of someone fumbling around in the dark looking for a light switch. Any chance you could tweak so as to allow user to insert a journal name into the code? Cheers.