Using the Day One CLI with Day One 2
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.
dayone to ignore the default journal and write to Day One 2 instead by using the
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
defaults tool won't auto-expand
~, unfortunately. ↩