https://github.com/dcchambers/note-keeper
:notebook: A tiny bash tool for taking and organizing notes.
https://github.com/dcchambers/note-keeper
bash cli command-line-tool commandline hacktoberfest note-taking notes shell-script terminal
Last synced: 5 months ago
JSON representation
:notebook: A tiny bash tool for taking and organizing notes.
- Host: GitHub
- URL: https://github.com/dcchambers/note-keeper
- Owner: dcchambers
- License: mit
- Created: 2018-08-01T02:15:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-28T03:23:26.000Z (about 1 year ago)
- Last Synced: 2025-10-12T11:29:47.119Z (8 months ago)
- Topics: bash, cli, command-line-tool, commandline, hacktoberfest, note-taking, notes, shell-script, terminal
- Language: Shell
- Homepage:
- Size: 14.8 MB
- Stars: 65
- Watchers: 4
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Notekeeper

A tiny bash script for taking and organizing simple text notes.

- Write a TODO list.
- Use as a copy/paste clipboard.
- Make ASCII art. :)
:question: Why use this instead of just typing `vim /path/to/my/note.md` ?
- Type fewer characters.
- Print and manage note files easily.
- Open the same note from any directory.
- Automatically organizes notes with a sane directory structure.
## Installation
### Homebrew
- Notekeeper can be easily installed via homebrew!
```
brew tap dcchambers/tap
brew update && brew install notekeeper
```
### Arch Linux
- Maintained by [Luis Pérez](https://github.com/luisperezmarin) - thank you!
```
paru -S notekeeper
```
### Manual Install
- Simply download the `note.bash` script file.
- Place it somewhere nice (`mv note.bash /usr/local/bin/note`).
- Make it executable with `chmod +x /usr/local/bin/note`
- Add it to your `path` if necessary (e.g. `export PATH=$PATH:/usr/local/bin`)
- You can then run the script anywhere by simply typing `note` at the command line.
## Usage
- Running `note` by itself with no arguments will create a new note file
at `~/$NOTE_DIR/$year/$month/$day/$year-$month-$day.md` if one does not exist,
and will open that note file in Vim.
- `-c | --create`
- Use the `-c` flag to create a note without opening it.
- `-p | --print`
- Use the `-p` flag to print the contents of the note.
- `-n | --name `
- Set filename for note. Will be created in $NOTE_DIR.
Can be combined with other options (-c, -p, -t)
- `-e | --edit `
- Use the `-e` flag with a DATE argument to edit a note from a specific date.
- `-h | --help`
- Use the `-h` flag to print usage information.
- `-t | --time`
- Use the `-t` flag to add a timestamp when creating/opening note.
- `-d | --delete `
- Use the `--destroy` flag to permanently delete a note.
- `-l | --list []`
- Use this `--list` flag to list note files. Defaults to `.md` files if no extension is specified.
## Demo (Asciinema)
[](https://asciinema.org/a/404264)
## File Organization
```shell
❱❱ tree ~/notes
/home/username/notes
└── 2020
├── 06
│ ├── 21
│ │ └── 2020-06-21.md
│ └── 22
│ └── 2020-06-22.md
└── 07
└── 28
├── 2020-07-28.md
└── another-note.md
```
## Configuration
- The default editor is set by your `$EDITOR` environment variable.
- If no default editor is set, it will use *Vim*.
- It opens *Vim* in insert mode.
- The default location to store notes is in the `~/notes/` directory.
- To change this, set a `NOTE_DIR` value in your `noterc` file.
### Customize with noterc
You can use a `noterc` file to customize Notekeeper!
- Create this file at `${XDG_CONFIG_HOME}/notekeeper/noterc`
- On MacOS, this will be `~/.config/notekeeper/noterc`
- [Example noterc file](https://github.com/dcchambers/dotfiles/blob/master/.config/notekeeper/noterc)
The following variables can be set to overwrite Notekeeper defaults:
- `NOTE_DIR` - The base directory for storing notes.
- Default is `~/notes`
- `EDITOR`
- By default Notekeeper uses whatever is in your system `$EDITOR` variable,
and falls back to vim if none is set.
- `NOTE_FORMAT` - File format (file extension) used to create new notes.
- Default is `.md`
- `NOTE_NAME` - Default name for new notes that are created.
- The default is `$YEAR-$MONTH-$DAY.$NOTE_FORMAT`
- `PRINT_TOOL`
- Default is `cat`
- `organize_by_date`
- Default is `true`. Set `organize_by_date=false` if you do not want to use a date-based directory structure for organizing notes.
## Dependencies
- Notekeeper uses a few simple tools that you probably already have installed.
- A text editor (such as *Vim* or *Emacs*)
- The `find` program
- A program to print files (like `cat`)
- Basic programs that should be included in almost all Linux/Unix
distributions, including `mkdir`, `touch`, `mv`, `rm`, `echo`, `printf`