Skip to content

Nithe14/note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stupid shell script to manage markdown notes from cli.

Why

  • I think nb is too complex just for taking notes.
  • I don’t like the way notes handles searching.

Dependencies

  • git – to keep notes tracked
  • ripgrep – to search through note contents
  • exa – to list notes and folders
  • bat – to view notes with syntax highlighting
  • A terminal text editor is recommended

How to use

Notes are stored in $NOTEDIR, which defaults to ~/notes.
Run note name to create and/or open ~/notes/name.md, or note notebook/name to create and/or open ~/notes/notebook/name.md. If you use vim/nvim as your $EDITOR, opening directories is supported as well by passing a path like note notebook/.

“Tags” are just words starting with the # symbol, with no space (for example #linux).

$ note --help
Usage: note [command|option] NOTE

If no command or option is provided, the program will open the NOTE path in nvim.
The default NOTE path is: /home/nithe/notes.

NOTE should refer to a subdirectory or a filename (without extension) within /home/nithe/notes.
Arguments without a leading '-' are treated as commands and must appear as the first positional argument.

Commands / Options:
  ls, -l, --list           List notes in the NOTE path
  rm, -d, --delete         Delete a note from the NOTE path
  s,  -s, --status         Show the Git status of the NOTE path
  v,  -v, --view           View the NOTE path using `bat`
  f,  -f, --find QUERY     Search for QUERY in notes content
  ft, -t, --tags TAGS      Search for notes by tags (separator-separated).
                           The separator can be:
                             - "or": regex OR match
                             - "and": inserts `.*` between tags (experimental)
                             - <space>: equivalent to OR
  -h, --help               Show this help message and exit

Intallation

Install script

sudo curl https://raw.githubusercontent.com/Nithe14/note/refs/heads/master/note > /usr/local/bin/note; sudo chmod +x /usr/local/bin/note

Install completions

Bash

sudo curl https://raw.githubusercontent.com/Nithe14/note/refs/heads/master/completions/note_completions.sh > /usr/share/bash-completion/completions/note

Fish

curl https://raw.githubusercontent.com/Nithe14/note/refs/heads/master/completions/note_completions.fish > ~/.config/fish/completions/note.fish

Zsh

Refer to your distro zsh documentation for installation details.
The completion script is available here: note_completions.zsh.

Completions

The autocompletion does not suggest options/commands cause there are too few to care about. Instead, it suggests files and directories from your $NOTEDIR.
Create your first note, and you’ll see how it works in practice.

About

Stupid shell script to manage markdown notes from cli.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages