Journaling with Terminal & text files
Terminal is way better than Apple Notes.
I had a 267-day streak of daily journaling. It ended on March 12, 2023. Why did I stop? Let's read my own words from Mar 12, 2023:
I think this is going to be the last journal entry I do for a while. It’s gotten to be considerably more of a chore than I’d like it to be. I may pick this back up by early May.
Translation: I stopped because there was too much friction. Writing, formatting, and generally working with my journal entries had too many steps. Let's do a side-by-side comparison of Apple Notes vs. Terminal:
Writing
Apple Notes
To write my daily journal entry, I had to:
- Open Apple Notes
- Navigate to the journalEntries folder
- Manually type
[YYYY-MM-DD] story
as the title - Press enter twice
"That's not that much work!" you say. Yeah, but it probably takes 15 seconds, and I can do it in 2 seconds with Terminal:
Terminal
To write my daily journal entry, I only have to hit this 11-keystroke chord:
<CMD> <SPACE> <t><e><r><m> <ENTER> <e><d><j> <ENTER>
Only takes 2 seconds? Yeah. I'm a fast typer and the chord is burned into my muscle memory. "What does edj
do?"[1]
alias edj="cd ~/Documents/journalEntries && vim \"$(date +%Y.%m.%d).txt\""
Make a journalEntries
directory within ~/Documents
and slap that puppy into your .zshrc
and it works. Every time. I know I'm only saving like 13 seconds/day, but I care about those 13 seconds. Plus I feel way cooler when using Terminal.
Formatting
Apple Notes
I love consistency, and keeping a consistent formatting style is extremely difficult. Should I allow myself to use boldface, italics, or underlining? Should I integrate images or emojis into my journal entries? Should I make some text headings and subheadings? I have too many options in Apple Notes. I feel like Calvin's dad in this classic Calvin & Hobbes comic about peanut butter:

Terminal
It is easy to keep a consistent formatting style, because it's all plaintext. No emojis. No images. No headings or subheadings[2]. It's clean and simple.
Backing Up
Apple Notes
Every month, I could either:
- Manually copy + paste the contents of every journal entry into a Google Doc or something, then export that whole doc as a PDF.
- Use File > Export to PDF for every single journal entry.
This would take me around 5-10 minutes. What about Terminal?
Terminal
Takes 5-10 seconds.
cp ~/Documents/journalEntries/2024.* /Volumes/flashDrive/appropriateFolder
Searching
Apple Notes
You can only search within notes in Apple Notes. So if you want to find something, you have to skim through every note and keep spamming CMD + F.
Terminal
Put into your .zshrc
:
search() {
grep -rni --color=always "$*" ~/Documents/journalEntries \
| sed "s|$HOME/Documents/journalEntries/||" \
| less -R
}
Then use search [term]
and find stuff almost instantly with the power of grep
.
Conclusion
For many reasons, my switch from Apple Notes to Terminal has been a great one. I plan to write a journal entry for every day in 2024, and I'm really excited.