notes is a simple command-line utility that helps with managing a flat directory of notes powered by fzf, fd and ripgrep.
You can install the script onto your machine by simply copying it into the appropriate location:
curl https://raw.githubusercontent.com/terror/notes/master/notes -o /usr/local/bin/notes
chmod +x /usr/local/bin/notesnotes requires a few environment variables to be set, namely:
$EDITOR: The text editor you'll be editing your notes with [default:vim]$NOTE_DIR: Path to your notes directory [default:~/notes]$NOTE_EXT: File extension of your notes [default:md]$NOTE_FORMAT_COMMAND: Command to run when formatting notes [default:prettier --single-quote --prose-wrap always --write]
Moreover, a few external dependencies are required for full usage of the program, namely:
bat- A cat clonefd- A fast and user-friendly alternative to findfzf- A fuzzy file finderprettier(if$NOTE_FORMAT_COMMANDis set to use it) - A document formatterripgrep- A line-oriented search tool
Below are the available ways you can interact with the program:
A simple note management CLI powered by fzf, fd, and ripgrep.
Usage: notes [COMMAND]
Available commands:
d | daily Open up todays note
h | help Show this message
k | keybindings View all fzf window keybindings
s | search Start a full-text search
Running notes without any arguments will spawn an interactive fzf window
that lets you perform actions on your notes directory.
notes sets a bunch of keybindings within the fzf window for note
interactions:
<ctrl-\> Toggle the preview window
<ctrl-c> Exit
<ctrl-d> Delete the selected file
<ctrl-e> Create a new file whose name is the current query string
<ctrl-f> Format the selected file
<ctrl-j> Scroll down the preview window
<ctrl-k> Scroll up the preview window
<ctrl-r> Reload the result buffer
<enter> Edit the selected file
Most notably, you can create and remove notes using ctrl-e and ctrl-d.
I'm not aware of any similar tool out there. I suppose it is loosely inspired by zettelkasten-based tools, with the goal of being very simple to use.
