Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moviemaker93/note-cli
CLI utilities to create notes without leaving the comfort of the terminal. Inspired by the Zettelkasten methodology, it integrates natively with Nvim and Obsidian 🛠️
https://github.com/moviemaker93/note-cli
Last synced: 4 days ago
JSON representation
CLI utilities to create notes without leaving the comfort of the terminal. Inspired by the Zettelkasten methodology, it integrates natively with Nvim and Obsidian 🛠️
- Host: GitHub
- URL: https://github.com/moviemaker93/note-cli
- Owner: MovieMaker93
- License: mit
- Created: 2024-09-25T22:44:16.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-03T22:40:48.000Z (about 1 month ago)
- Last Synced: 2024-10-04T06:42:01.233Z (about 1 month ago)
- Language: Go
- Homepage:
- Size: 218 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Introducing Note Cli
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.
![Refine](./public/refine.gif)## Table of Contents
- [Install](#install)
- [Environment Configuration](#environment-configuration)
- [Commands and Usage Example](#commands)
- [How to Customize note templates](#template)
Install### Requirements
- **Golang** version > 1.21
- **Nvim** installed### Binary Installation
```bash
go install github.com/MovieMaker93/note-cli@latest
```This installs a go binary that will automatically bind to your $GOPATH
### Building and Installing from Source
Clone the Note-Cli repository from GitHub:
```bash
git-clone https://github.com/MovieMaker93/note-cli
```
Build the Note-Cli binary:
```bash
go build
```
Install in your `PATH` to make it accessible system-wide:
```bash
go install
```
Verify the installation by running:
```bash
note-cli version
```
Environment ConfigurationYou 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 Obsidian
- `NEW_NOTE_PATH`: Defines the directory for your new notes in Obsidian (consume or refine)
- `VAULT`: Defines the absolute path to your Obsidian Vault
- `DATE_FORMAT`: Set your preferred date format. For `gg/mm/dd` format, use `02-01-2006`; for the US format use `2006-01-02`.
CommandsYou 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 commandBoth methods allow you to create a note with a title, content, and type. The available note types are `consume` and `refine`.
### Example
![Example refine note](./public/refine.gif)> [!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:
```bash
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:
```bash
note-cli today
```
How to Customize Note templatesThe 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** note
- `cmd/template/note/file/refine.tmpl` --> for **refine** note
- `cmd/template/note/file/today.tmpl` --> for **today** note