Categorygithub.com/TimoKats/nt
repositorypackage
0.0.1
Repository: https://github.com/timokats/nt.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

NT

example workflow License: GPL v3 GitHub tag stars - nt forks - nt

NT is a quick note taking tool for the CLI. Beside basic commands, it integrates with the clipboard and supports self-hosting using NTS (note taking server). It can be installed using go.

go install github.com/TimoKats/nt@latest

Note taking

NT supports a number of commands that can be enriched with certain patterns. All commands are prefixed with nt. So for example: nt add close the PRs :due:Fri :tag:work

Commands

CommandDescription
undoUndoes the previous command.
add *text*Adds a note to your notebook.
ls *IDs*Lists the notes in your notebook.
rm *IDs*Removes notes (all notes by default!).
cmt *IDs*Adds comment to specific note.
tagsLists the tags in the notebook.
tag *IDs* *tagname*Adds tag to existing note based on id.
mod *IDs*Modifies a selected note. Same args as 'add'.
mv *IDs*Checks/Unchecks a note.
s *query*Filters the notebook based on a query. Query applied to text.

Enrichments

EnrichmentCodeDescription
Tags@tagname / :tag:tagnameCan be inserted into *text* when using 'add'. Adds a tag to a note.
Deadlines:due:Sun / :due:14-12Can be inserted into *text* when using 'add'. Finds the first datetime associated with a (week)day. Formats can be configured.
Clipboard:cInserts the content of your clipboard into a note when using add. Listing a single note also sends data to clipboard.
ID flags--done / --old / --today / --allAdding these flags will select notes you can apply your command to. Note, 'old' means older than today.
ID ranges/selection {1,2..n} / 1-4 Adding these right after your command will select a single note or a range of notes based on their id.

Note hosting

Any installation of NT can double as a server (NTS). It uses a REST API with basic authentication to send information between the server and the client. To setup/interact with your server, you can use the following commands.

[!IMPORTANT] Upon setup (run command) you define your username and password for the basic authentication. This information isn't stored anywhere on your system. However, you can terminate/restart your server safely without losing the contents of your notes.

Commands

CommandEndpointDescription
runCreates a prompt that starts NTS. By default it runs on port 8282.
push/pushPushes a notebook from the client to the server.
pull/pullPulls a notebook from the server to the client.
ping/pingHealth check from the client to the server.

Note, the run command is used wherever you want your server to exist. It will also store the notebooks there. The other commands are used where you take your notes.

Configuration

No configuration is nessesary to use NT. However, you can add a config.toml file in ~/.nt that supports the following options.

[server]
url = "http://000.000.00.000"
port = ":8282"

[notebook]
width = 40
ls_default = "--all"
# I recommend against changing the supported date formats for now...
date_format = ["2006-01-02T15:04", "2006-01-02", "Jan 02", "2", "Mon"] 

Other

I have some things on the roadmap. Like, stashing notes, encrypting notes, and adding more commands. If you have any ideas or additions, feel free to open an issue or pull request. Thanks for checking our my repository!