Playing with jrnl and testing an alternative
I discovered Jrnl this past week and had a play. Nice toy. I installed it in my personal Python environment and tested it out.
What struck me immediately was how many modules it installed; there were at least 15 in there, each one doing one specific task.
I gave up after 10 minutes, wondering why this is so complicated to post single-line entries into a text file. Jrnl does have a beautiful display for when you want to read back your entries, but that, I feel, is more overkill.
I’m not rubbishing Jrnl - a lot of thought and hard work has gone into it, clearly. It is a cool little tool with features such as tagging, search and back-dated entries which can be added in plain-language format like “yesterday”.
Do I recommend it? Yes, if you are looking for a full-featured command line journal tool. Check it out here: https://jrnl.sh/en/stable/
Replicating Jrnl with native Linux .bashrc
I was curious. I wanted to see whether I could have the same-ish functionality, but by using what I already have (no new dependencies).
In my .bashrc, I added:
write() { echo -e "\n$(TZ=UTC date '+%Y-%m-%d %H:%M:%S %Z') \n$*" >> ~/Documents/journal.txt; }
- -e is to enable interpretation of backslash escapes. This is to add gaps between the entries.
- date with time zone is on its own line.
$*takes the command line entry and,- outputs it to the file.
The command can be a single-line entry like this:
write Hello world! This is text in one line.
The journal file is updated and looks like this:
2025-11-09 08:27:10 UTC
Hello world! This is text in one line.
Multi-line entries can be added like so:
write 'This is the second entry.\nWith a new line.\nAnd another.'
And the resulting journal file now contains this:
2025-11-09 08:27:10 UTC
Hello world! This is text in one line.
2025-11-09 08:29:33 UTC
This is the second entry.
With a new line.
And another.
With my solution, I can have multi-line entries, something I could not figure out how to do in Jrnl. Come to think about it now, perhaps entries with Jrnl need to be entered in the same way.
I personally do not have a use case for something like this — I prefer to use a text editor.
