Skip to content
/ nt Public

Write TODO notes directly from CLI with clipboard integration.

License

Notifications You must be signed in to change notification settings

TimoKats/nt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NT

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

NT is a TODO application for the CLI. Beside basic commands, it integrates with the clipboard, recognizes deadlines, and supports self-hosting. 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

Command Description
undo Undoes 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.
tags Lists 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

Enrichment Code Description
Tags @tagname / :tag:tagname Can be inserted into *text* when using 'add'. Adds a tag to a note.
Deadlines :due:Sun / :due:14-12 Can be inserted into *text* when using 'add'. Finds the first datetime associated with a (week)day. Formats can be configured.
Clipboard :c Inserts 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 / --all Adding 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

Command Endpoint Description
run Creates a prompt that starts NTS. By default it runs on port 8282.
push /push Pushes a notebook from the client to the server.
pull /pull Pulls a notebook from the server to the client.
ping /ping Health 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!

About

Write TODO notes directly from CLI with clipboard integration.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages