note
No fuzz terminal application for quick and simple note taking.
Installation
This is a Go application, and currently there are no pre-packaged binaries.
To install this program you need the following pre-requisites:
- Go
- go-sqlite3
After these are installed, the installation of this program is done by running
go install github.com/bdazl/note@latest
Usage
note uses cobra and viper
to handle command line arguments and configuration. This means that any sub-command that you use
can be invoked with the -h flag, to get information about usage and parameter to that command.
Available Commands:
add Add new note
completion Generate the autocompletion script for the specified shell
edit Edit content of note
export Export notes to JSON or YAML file
get Get specific note(s)
help Help about any command
id Lists all or some IDs
import Import notes from JSON or YAML file
init Initialize note configuration and database
list Lists notes from one or more spaces
move Move note to another space
pin Pin note(s) to top
remove Remove note(s) with id(s)
space Lists all or some spaces
table Lists available notes in a table format
unpin Unpin note(s) from top
version Version of this program
Init note
The first time you use note you need to initialize a configuration and a database. This is done by
calling the init sub-command:
note init
This will store a configuration and a database file. The locations of these files can
be modified by specifying -c and --db respectively. These arguments are global to all commands
and, if specified, will override the config initialized above. The configuration can be a
wide array of formats.
By default the Freedesktop XDG Base Directory Specification
is used. Mainly note looks at the $XDG_DATA_HOME and $XDG_CONFIG_HOME to determine default directories.
If these variables are not defined, default values are set according to specification.
Add note
There are three main methods of adding your note. The quickest way is to simply invoke note like this:
note add This is My First Note
note add "This is Another Note"
note will respond with an id that you use if you want to modify or access it later:
Created note: 1
You can write a note with your default $EDITOR:
note add
If no such editor exist, a default has been chosen for you. It is possible to define the editor in the
configuration file.
A note can also be created by specifying a file that you want note to read:
note add -f some.txt
note can also read from standard input (-):
echo note made by other program | note add -f -
Spaces
All notes belong to a space, which can be any string you define:
note add -s MySpace This is a Song
By default, your notes will fall into the main space. You can list all spaces occupied with one or
more notes, by running:
note space [id...]
If you specify one (or more) id:s in the above command, only spaces occupied by the notes you specify will
be shown. You can also use the alias note spc [ids...] which is equivalent to the previous statement.
To list IDs occupied by a space, you can use the following command, and similarly to the space command
above, if you specify one or more positional arguments - only ID's in those spaces will be shown
note id [space...]
Content of notes
To get an overview of your notes, it's often useful to get a table. This can be done simply with:
note
If you want to have control over how many preview words will be shown, use the specific sub-command:
note table --preview 5 [space...]
To retrieve the content of specific note(s), invoke get:
note get id [id...]
To list the full content of your notes, invoke the list (or ls) command, you can specify any number
of space(s) as a filter. There are also a number of sorting, limiting and styling options to this command:
note ls [space...]
Edit notes
Edit note in $EDITOR:
note edit id
Pin/unpin note(s) to the top:
note pin id [id...]
note unpin id [id...]
Move note to space:
note move space id [id...]
Import/export
Notes can be exported and imported to JSON or
YAML. By default the export is printed to standard output:
note export [file]
Configuration
At the moment the configuration file is not that useful, this is in TODO-stage at the moment. Use with
care.
License
MIT License