Who is Jrnl for?
Jrnl can be an excellent note or journal tool for those with loads of ideas and take lots of intermittent notes quickly in the command line without the need for excessive resource-intensive apps overload e.g. Linux.
Jrnl – A human-friendly command-line journal or note app
Despite all the flashy and aesthetic modern notes apps, I still like the idea of the classic minimalistic terminal command line for journaling or taking notes. Why? It is probably still the most resource-efficient way to take notes with lesser memory consumption. That means a lesser probability of lagging and waiting due to insufficient CPU and memory resources of heavy graphics notes apps.
This post will share some of the Jrnl basics or useful commands and features.
Jrnl is a time-centric journal command line program.
What are the benefits or why Jrnl for taking notes or journals?
- Few and human-friendly commands e.g. intuitive timestamps like today
- Free and Open-source with dozens of contributors and recent (March 2022) updates
- Minimalistic and simple note or journal app that helps to focus without distractions
- Fast note-taking
- Powerful search
- Simple YAML document database in local file storage
- Files encryption option
- Easier than Vim and Git
Issues can be reported on Github as well.
However, some disadvantages of using Jrnl include a slight learning curve, no hyperlinks or modern elements, and even editing existing notes require an external resource or editor app.
How to take fast notes and use Jrnl?
How to install Jrnl?
First, open the Mac or Linux terminal (Launchpad ->Search for Terminal) and install it with this line
brew install jrnl
Please read the More Information section below on installation solutions. If you need help or basic commands usage, just type and enter Jrnl –help. You may also read about Jrnl basic usage here.
How to create Jrnl journal or note entries?
Perhaps the easiest way is to just type jrnl and enter. Multi-lines notes can be finished up with Ctrl-d.
~ $jrnl [Writing Entry; on a blank line, press Ctrl+d to finish writing] This is a multi line entry @jrnl @fun
Jrnl single line or paragraph entry feels quick and productive or fun like tweets.
$jrnl this is a note journal entry.
Jrnl entries are timestamped by default. With no time entered, it assumes to be now. Below are some valid Jrnl commands to create entries. Remember to type the colon : to let Jrnl know to file under that timestamp.
$jrnl yesterday 3pm: This entry will be timestamped to yesterday 3pm $jrnl tomorrow: This will be stamped with tomorrow's date $jrnl 1 March 2022: This happened on 1 March 2022 $jrnl 4 Feb 2022: This is for 4th of February
How to view Jrnl note entries?
jrnl -n 2 will display the last 2 entries’ content.
~ $jrnl -n -2 2022-03-14 22:51 This is an exa note sample. 2022-03-15 09:00 What will happen tomorrow?
jrnl –list will display where is the location of the main file.
We can also view the entire journal content with the terminal more command as shown.
Jrnl –short will output the titles with timestamps.
We can also limit the number of rows or results with -n.
Documents $jrnl --short -n 3 2022-03-14 22:26 This 2022-03-14 22:51 This is an exa note sample. 2022-03-15 09:00 What will happen tomorrow?
How to search Jrnl notes or journal entries?
This is also one of the powerful features of Jrnl as a note program. There are at least a few useful ways to quickly search our notes. Below are some self-explanatory search options with year, month, from (with until), starred, tagged, and contain commands. Notice how human-friendly these search terms are and easier to recall.
$jrnl -year 2022 $jrnl -month feb $jrnl -from jan $jrnl -from jan -until feb $jrnl -starred $jrnl --tag $jrnl -contain First
Below are some example outputs.
Documents $jrnl --tags @dog : 1 @cat : 1 Documents $jrnl -contain cat 2022-03-01 09:00 This is tagged with @cat and @dog Documents $jrnl -contain first 2022-03-14 15:31 Test First JRNL note | One | Two | Three | Four | /Users/xxxx/.local/share/jrnl/journal.txt
We can add conditions with the -and command as shown.
Documents $jrnl -contain entry -and -from mar 2022-03-14 20:10 second entry of journal 2022-03-14 20:11 yesterday third entry goes here 2022-03-14 21:00 This is a special entry, like a bookmark
How to edit a Jrnl note or journal entry quickly?
The fastest way can be with vi or vim. Or type open followed by the journal entry name.
In Vim, type i to start editing. Once finished, type ESC and :wq to save and quit. More information here.
How to bookmark or star a Jrnl entry?
Simply attach an asterisk * in front of the journal entry and starred entries can be viewed with the -starred command as shown.
Documents $jrnl *This is a special entry, like a bookmark [Entry added to default journal] Documents $jrnl -starred 2022-03-14 21:00 This is a special entry, like a bookmark
How to delete a Jrnl entry?
Search for the note with an “–delete” command appended. We can delete whatever our search results turned up.
Documents $jrnl -contain del 2022-03-14 21:41 this is for del Documents $jrnl -contain del --delete Delete entry '2022-03-14 21:41 this is for del'? [y/N] y Documents $
How to export Jrnl entries?
We can easily export all entries into a JSON file with just this one command as shown. With the greater than sign >, it will just output to the display screen, which you can select and copy too.
jrnl --format json > output-file
Jrnl can also format to fancy, XML, markdown, text, and more. View more in jrnl –help. For example, we can export our jrnl notes in Markdown format and import them into another note app e.g. Bear. Bear is ‘hashtaggy’, so it pays to include hashtags in your notes entries to leverage that feature.
We can also import notes with jrnl < input-file.
How to have multiple journals in Jrnl?
Follow the instructions here to modify the config file. For example, we can use a new work journal with the command jrnl work –short.
We can do more with Jrnl including configuring to be folder type, an external editor, and so on.
How to backup or sync our Jrnl files to the Cloud?
For example, we may use Dropbox to sync the Jrnl file to the Cloud. OneDrive can also auto-sync our files to the Cloud. We may easily copy or easily export to any of the many formats to a backup location.
How to encrypt and decrypt Jrnl?
Easy. Just type jrnl –encrypt and enter to be prompted for a password. Actions performed from henceforth e.g. jrnl –short will require the password. To decrypt, jrnl –decrypt to be prompted for the password.
Leverage the power of Jrnl
Over time, our proficiency and needs may change and terminal command lines usage mastery can be quite advanced and complicated. But imagine the efficiency of executing complex operations at your fingertips with ease. Jrnl is designed to be human-friendly but we should not make the mistake of thinking it is uselessly simplistic. More tips and tricks here.
For example, we may use commands with more conditions. Can you guess what the below command will do?
~ $jrnl @bookmark -starred -n 10 -to "apr 2022" --short
This will report how many words we typed to date for this year by piping into the built-in wordcount utility program. I think you get the idea of how creative you can get with a command-line note app like Jrnl.
~ $jrnl -from "jan 1 2022" -to today | wc -w 121
How to configure Jrnl with an external editor?
To configure an external editor, simply specify the editor name in the jrnl.yaml file e.g. /Users/username/.config/jrnl/jrnl.yaml, for example with vim or nano (replace username with that of your profile in your system)
If you set the editor, when we type jrnl enter from command line, it will launch that external editor by default, and save it into jrnl upon save and exit.
This way we get to have an organized and easily searchable journal entries with the use of an editor of our choice.
What are some basic useful terminal commands?
- pwd – current working diretory
- cd folder_name – enter that folder
- cd .. – exit current folder
- cp filename1 filename2 – copies from filename1 to filename 2
- ls – list contents in current directory
- more filename – display the content of that file
- more filename | grep “search term” – will reveal the portion relevant to the search term in the file
- clear – will clear the current screen
- rm filename – delete that file
- exit – will logout and ready for terminal to be closed
- df -h – reveal file systems usage. Capacity % is more useful
- man ls – will reveal more information about the command ls for example
- find ~/Desktop -name search_term – will reveal the files that fits the search term in the ~/Desktop directory
- TAB – When working with long directories and filenames in the command line, a very useful feature is to type the TAB key (above Capslock) after typing the first few characters for auto-complete or suggestions.
The main disadvantages of using the terminal command line to take notes:
- Higher learning curve
- Lack of large and consistently good open-source projects dedicated to this purpose
- No support for modern elements e.g. hyperlinks and images
The benefits of using the terminal command line to take notes can be (depending on the program):
- Faster and more productive
- More stable
- Minimalistic interface that can minimize distraction
- Powerful notes search
Plus, it is kind of fun to take efficient notes in the terminal command line.
At times, we just want to create quick and important notes without the graphical bells and whistles. Jrnl does feel like it is the simplest note-taking app that we have been missing out on. It is the quality of the idea that counts and even an old laptop with Linux can still be used for taking good notes!
There is beauty in minimalism, keeping it simple. And somehow JRNL illustrates that to a T with human-friendly commands. Remember jrnl –help and Jrnl.sh if you need help. We may also customize the Terminal to be more aesthetic with a different theme and font size with Terminal->Preferences (CMD+comma).
The power of jrnl is also in the supreme efficient way to search through all the journals. Other than with the time options, perhaps the most useful is with jrnl
| -contains search_term.
Considering the intuitive appeal (human-friendly commands) and power of Jrnl features (including searches, exports, and advanced piping) for free, it is definitely a good and even excellent note and journal app in its own domain.
We can export or copy notes for pasting and importing into other apps as well e.g. import .txt or .md into the Bear app. A feasible scenario may be using Jrnl to jot down numerous notes over time, and selectively export starred or tagged entries into a Markdown extension for import. An idea is to start a small note or journal app for a certain aspect of our life or project and add on to it regularly e.g. writing a book.
The target audience of Jrnl is suited for those who are comfortable working with the command line and just mainly want to be productive jotting down lots of ideas in fast digital notes or journal entries before searching and compiling them. Jrnl can be ideal for saving any text information quickly. We can do it with a graphical interface, but the beauty of Jrnl is in the supreme efficient way to record down text information. Taking text notes can be accomplished in the fastest way from the command line for those familiar with this environment.
The main reason why jrnl is useful can be jotting down information without the need to overkill with intensive resources apps or programs. Imagine we live in a modern digital age where we can load up a note-taking app that takes up tens if not hundreds of MBs just to note down a single sentence.
How to take notes in Vim?
For those who are still interested in Vim for taking notes, please take a look here.
Can Jrnl be used on Linux?
Yes. It is also installed with brew install jrnl. You may also be interested in Inspiring Note-taking Apps For Linux (4 Evaluated) and 3 Linux Distributions For Beginners, Programming, And Old Laptops.
Is it easy to install Jrnl? What can be the possible solutions to jrnl installation errors?
I ran into an error the first time I installed with brew install jrnl. Warning: Transient problem: HTTP error Will retry in 1 seconds. 3 retries. This turned out to be a possible outdated homebrew issue. I had to copy this line from the Homebrew homepage to reinstall homebrew:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
and then run these 2 lines to update it:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch –unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch –unshallow
Wait for some time (large download), run this again and the problem is fixed: brew install jrnl
Is there an easy guide to installing Linux?
Please head over to Easy Guide: Good Linux For Your Home & Business.
Is there a command line web browser?
Those comfortable with taking notes from the command line may well be interested in a quick way to search for web information. w3m is not only an efficient text browser that can complement jrnl but also display images from within iTerm, read more here.