Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notes 📝

build

notes is a simple command-line utility that helps with managing a flat directory of notes powered by fzf, fd and ripgrep.

screenshot

Installation

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/notes

Usage

notes 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 clone
  • fd - A fast and user-friendly alternative to find
  • fzf - A fuzzy file finder
  • prettier (if $NOTE_FORMAT_COMMAND is set to use it) - A document formatter
  • ripgrep - 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.

Prior Art

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.

About

A lightweight command-line utility for managing plain text notes

Resources

Contributing

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages