- Go 89.8%
- Shell 9.3%
- Makefile 0.9%
| .github/workflows | ||
| assets | ||
| cmd | ||
| internal | ||
| .gitignore | ||
| .goreleaser.yaml | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| README.md | ||
tn
Terminal note - A fast CLI note manager featuring search, Git, and Obsidian
Contents
- Motivation
- Features
- Installation
- Usage
- Demo
- Dependencies
- Configuration file
- Storage structure
- Example template
- Ideas
Motivation
This is the second iteration of the utility (the first one was written in Python). I decided to rewrite it in Go to learn the language, boost performance, and expand its feature set.
As someone who loves working in the terminal and uses Obsidian, I appreciate that notes are stored as plain files in a specific directory. This allows me to read, edit, or add notes seamlessly from both the GUI app and the console. My goal was to eliminate context switching to a heavy UI, allowing me to instantly find information in my knowledge base or jot down a quick thought on the fly.
Instead of a complex TUI (Terminal User Interface), I wanted a tool that leverages familiar utilities with a unified interface, integrating smoothly with fzf, fd, rg / grep, and editors like nvim or hx.
Features
- Find and open notes in a terminal-based text editor
- Create a new note and open it immediately in your editor
- Support for note templates (just specify the template path in the config file)
- Interactive search and deletion of notes
- Inline notes: save quick thoughts directly to a timestamped file via command arguments
- Find and open notes directly in the Obsidian desktop app
- Automatic Git synchronization
- Manual Git synchronization
Installation
Choose one of the following methods to install tn:
1. Using go install (For Go developers)
If you have Go installed on your system, you can build and install the binary directly from the source:
go install github.com/belousovsergey56/tn@latest
Make sure your $GOPATH/bin (usually ~/go/bin) is added to your system's PATH.
2. Quick Install Script (Via curl)
You can install the latest pre-compiled binary with a single command:
curl -sSfL https://raw.githubusercontent.com/belousovsergey56/tn/main/install.sh | sh
3. Manual Download (GitHub Releases)
- Go to the Releases page.
- Download the archive matching your operating system and CPU architecture (e.g., tn_Linux_x86_64.tar.gz).
- Extract the archive and move the tn binary to a directory in your PATH (such as /usr/local/bin or ~/.local/bin).
Usage
tn help/tn -h/tn --help- Help about any commandtn configortn c- Open config file for edittn deleteortn d- Interactive search and delete a notetn editortn e- Interactive search and edit a note in the terminaltn greportn g- Interactive full-text search across notestn [text]ortn inline [text]ortn i [text]- Create a quick timestamped note directly from argumentstn new [filename]ortn n [filename]- Create a new note and open it in the terminaltn openortn o- Interactive search and open a note in Obsidiantn syncortn s- Manually synchronize your notes vault with the remote Git repository
Demo
Command Walkthrough
tn help (Help about any command)
Learn more about any command and its available flags directly in your terminal:
tn config / tn c (Open configuration file)
Quickly open and edit the utility's configuration file in your preferred text editor:
tn new / tn n (Create a new note)
Create a new note (optionally using a template) and open it instantly in the terminal:
tn inline / tn i (Save quick thoughts)
Save a quick thought on the fly directly from command arguments without entering the text editor:
tn edit / tn e (Search and edit a note)
Interactively find and open any existing note in your terminal-based editor:
tn grep / tn g (Full-text search)
Perform an interactive, fuzzy full-text search across all your notes simultaneously:
tn delete / tn d (Delete a note)
Interactively search for a note and safely remove it from your vault:
tn open / tn o (Open a note in Obsidian)
Find any note using fuzzy search and open it immediately within the Obsidian application:
tn sync / tn s (Git synchronization)
Manually synchronize your local notes vault with your remote Git repository:
Dependencies
- github.com/BurntSushi/toml v1.6.0
- github.com/ktr0731/go-fuzzyfinder v0.9.0
- github.com/spf13/cobra v1.10.2
Configuration file
# Storage mode: currently "files", planning to add a "db" mode for database storage later.
storage_mode = "files"
# Path to the directory where notes will be stored.
# Supports ~ or $HOME.
path_to_main_vault = "$HOME/terminal-note"
# Path to the directory where inline notes will be stored.
# Supports ~ or $HOME.
path_to_inline_note = "$HOME/terminal-note/cli_note"
# File extension for text notes: e.g., .txt, .md
file_extension = ".md"
# Path to the template file.
# Supports ~ or $HOME.
path_to_template_note = "$HOME/terminal-note/Templates/base.md"
# Editor to write notes comfortably: vi, vim, nvim, micro, nano, etc.
editor = "hx"
Storage structure
➜ ~/my-note
.
├── cli_note
│ ├── 2026-06-01 17_44_34.md
│ ├── 2026-06-01 17_45_34.md
│ └── 2026-06-02 10_41_32.md
├── file name with space.md
├── networking.md
├── newgifile.md
├── one more file 4.md
├── one more file.md
├── research new work.md
└── Templates
└── base.md
Example template
---
Creation date:
Modification date:
links:
tags:
---
Ideas
- Import/Export from and to databases
- Implement database storage mode