Skip to content

Instantly share code, notes, and snippets.

@bjhomer bjhomer/instructions.md
Last active Dec 27, 2017

Embed
What would you like to do?
How to make the Day One command line tool automatically write to Day One 2

Using the Day One CLI with Day One 2

The dayone command line tool was originally written to work with Day One Classic, and by default writes its entries to the default Day One Classic journal directory1. If you want to use the dayone tool to write entries in to Day One 2 instead, there are a couple options.




Option 1. Use this option if you don't use Day One Classic at all.

Modify the settings file for Day One Classic to automatically use the Day One 2 auto-import journal instead.

Run the following command in Terminal:

defaults write "$HOME/Library/Group Containers/5U8NS4GX82.dayoneapp/Data/Preferences/dayone.plist" JournalPackageURL "$HOME/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Auto Import/Default Journal.dayone"

Fixed!2 Now the CLI tool will automatically work!

echo "This is my new entry" | dayone new

Note that Option 1 will break Day One Classic. If you still use Classic, don't use Option 1. On the other hand, if you don't use Day One Classic at all, then Option 1 is a great option.



Option 2. Use this option if you're still using Day One Classic as well as Day One 2.

Tell dayone to ignore the default journal and write to Day One 2 instead by using the -j flag.

echo "This is my new entry" | dayone -j "~/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Auto Import/Default Journal.dayone" new



1: Unfortunately, for users that have never installed Day One Classic, attempting to look up the default journal for the non-existent app currently causes the dayone command line tool to crash.

2: No, you can't use ~, you have to use $HOME. The defaults tool won't auto-expand ~, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.