Note CLI is a tool that allows users to create or open notes without ever leaving the terminal. If you're someone like me who lives in the terminal and is obsessed with note-taking, this might be the perfect tool for you.
Whether you’re using Nvim or Obsidian, this utility helps you create notes on the fly without losing focus losing focus.
- Golang version > 1.21
- Nvim installed
go install github.com/MovieMaker93/note-cli@latest
This installs a go binary that will automatically bind to your $GOPATH
Clone the Note-Cli repository from GitHub:
git-clone https://github.com/MovieMaker93/note-cli
Build the Note-Cli binary:
go build
Install in your PATH
to make it accessible system-wide:
go install
Verify the installation by running:
note-cli version
You can set up your Vault path, Daily Note directory, New Note default directory, and date format via environment variables. A full example can be found in the .env
file.
Brief description:
DAILY_PATH
: Defines the directory where you store your daily notes in ObsidianNEW_NOTE_PATH
: Defines the directory for your new notes in Obsidian (consume or refine)VAULT
: Defines the absolute path to your Obsidian VaultDATE_FORMAT
: Set your preferred date format. Forgg/mm/dd
format, use02-01-2006
; for the US format use2006-01-02
.
You can either create a new note (of type refine
or consume
) or open/create today’s note.
When creating a new note, you have two options:
- Interact with the UI
- Use an imperative command
Both methods allow you to create a note with a title, content, and type. The available note types are consume
and refine
.
Note
For consume notes, a link to the new note will be automatically created in your Today note.
For the second option, you can use the provided flags to create a refine note without interacting with the UI:
note-cli new -t example-consume -c example-content --type consume
See note-cli new -h
for all the options and shorthands.
Another useful command is today
, which allows you to open the existing today’s note or create one if it’s missing:
note-cli today
The creation of both the Today and New notes is based on custom templates. You can find them inside: cmd/template/note/files
These templates are built using Go's tmpl
package. If you wish to customize them, simply modify the following files:
cmd/template/note/file/consume.tmpl
--> for consume notecmd/template/note/file/refine.tmpl
--> for refine notecmd/template/note/file/today.tmpl
--> for today note