NeoNote is a terminal app to manage notes. The main goal is to speed up note-taking by cutting down on all but the essential tasks. It stores your notes for you and provides filtering and searching options to organize them semi-automatically.
- Create/Edit/Delete Notes
- Import/Export notes (-> no lock-in to NeoNote)
- Filter notes based on metadata, full text search and creation/modification date
- Use boolean logic to combine multiple filter conditions
- Dump your notes to the console for use in other programs
You can find builds for linux x86 in the releases section.
NeoNote is built with the Haskell build tool cabal. You'll need it along with a recent Haskell compiler.
To build from source, run:
cabal build allThen, you will find the executable inside the dist-newstyle folder.
Take a look at the NeoNote help menu to get a quick overview of the commands and to explore the various options.
Most commands can be shortened to one letter, eg. nn c instead of nn create.
nn create
An editor will open where you can write your note. You can also start composing your note directly in the terminal by just typing the text:
nn c "Your first note with NeoNote"NeoNote stores metadata for your notes, which you can edit in the frontmatter.
---
answer: 42
foo: bar
my-tag
---
here is the content of the noteThe frontmatter is surrounded by --- delimiters. In the frontmatter, each line stores a simple key value property.
The field answer has value 42, foo has value bar and my-tag has no value. Although my-tag has no value, it is still present and essentially serves as a tag.
Field names and values may contain alphanumerical characters and the special characters "._-+". For field names, special characters may not be at the start or at the end. Also, "created", "c", "modified" and "m" are reserved keywords any may not be used for field names.
Field values may only contain simple data: a single number, a single word or a string enclosed by ". In the future, I might add more complex types (e.g. dates or lists).
To review already existing notes, you will normally use the picker UI. It can be opened with the following command:
nn pick
Within this UI, you can incrementally search through your notes. It is possible to edit with ENTER, delete with CTRL-X and print to console with CTRL-Y.
nn edit
edit will directly open your editor with all matched notes.
Per default, it will only match 1 note with no filtering.
This means it will open the note which was last modified.
You can specify a filter, a search term and the amount of notes to match. The following command
will open at most 3 notes with the word todo.
nn edit --number 3 todo
Similarly to the edit command, there exist delete and view commands to delete and view multiple notes.
This will delete up to a hundred notes with the property #archived.
nn delete --number 100 "#archived"
This will view up to 10 notes with the word linux
nn view --number 10 linux
The list command essentially functions as a way to print note metadata in a machine-readable way. It can give you information about note ids, properties and modification/creation dates.
nn list
Per default, it lists the ids of the 10 most recently modified notes.
You can change which attributes of the note are shown with --attribute (-a for short):
nn list --attribute id --attribute created --attribute properties
Now, in addition to the id, the creation date and the properties will be shown. This command can also be shortened:
nn l -a i -a c -a p
You can combine this with filtering and searching. The following command will list up to 5 notes with the word haskell.
nn list --number 5 haskell
You can filter notes using the filter grammar.
nn view "programming"
This will show you notes which contain the word programming.
This can also be used with delete, edit, list and pick.
*matches every note! amatches ifadoes not matcha | bmatches if eitheraorbmatchesa & bmatches if bothaandbmatcha bmatches if bothaandbmatch. Currently,a bis the same asa & b.#foomatches if note contains the propertyfoo, no matter its value#foo=barmatches if note contains the propertyfoowith valuebar#foo>4matches if note contains the propertyfoowith a value greater than4. Supported comparison operators are=,>,<,>=, and<=.#foo~bamatches if note contains the propertyfoowith a value likeba.foomatches if note contains the string foo- Use brackets (
(a)) to group expressions - Use quotes (
"%many +words$") to escape search strings and search for special characters
Here are a few examples:
nn view "*" # matches everything
nn view "#programming & ~html" # matches notes with the property programming without the word html
nn view "#programming | #coding" # matches notes with either the property programming or the property coding
nn view "(#programming | #coding) & ~html" # matches programming/coding notes without html
In addition to searching for properties/full text, you can also filter based on the creation and modification date of a note.
#createdand#modifiedliterals to access the date of a noteYYYY-MM-DDfor day literalsHH-MM-SSfor time literals
nn view "#created = 2023-07-01" # matches all notes created on 2023-07-01
nn view "#modified = 2023-07-01" # matches all notes modified on 2023-07-01
nn view "#modified > 2023-07-01" # matches all notes modified after 2023-07-01
nn view "#modified < 2023-07-01" # matches all notes modified before 2023-07-01
nn view "#modified > 2023-05-30 & modified < 2023-07-01" # matches all notes modified in June 2023
nn view "#modified > 2023-07-01 & #programming" # matches all notes modified after 2023-07-01 with the tag programming
nn view "#modified > 10:30:00" # matches all notes modified after 10:30:00
You can shorten the date keywords to #c and #m respectively.
In the future, less restrictive date specifications might be possible.
For example, you could apply the filter modified = July or created = around 10am.
nn import file1 file2 file3...
Importing notes is the same as creating the files one by one and copy-pasting their contents into the editor.
nn export <note filter>
Exporting notes will dump all filtered notes into a single folder. Thus, it is possible to use other tools to manage your notes.
You have two options to specify configurations:
config.iniwithin the xdg config directory which will be created on the first neonote execution- environment variables (
NEONOTE_PATH,NEONOTE_EDITOR,NEONOTE_EXTENSION)
Per default, neonote stores notes as md (Markdown) text within a notes.db database in a folder neonote in the XDG data directory (.local/share/neonote on Linux).
You can choose any editor you want by specifying it in the configuration. However, you need to make sure that the editor blocks until the editing process is finished and that it can open multiple files simultanously.
If your editor command has a %, it will be replaced with the files to edit separated by a .
If it does not have a %, the files are appended at the end of your command.
Here are some example editor configurations:
- Vim:
vimorvim % - Helix:
helixorhelix % - Nano:
nanoornano % - VSCode:
code --waitorcode --wait % - VSCodium:
codium --waitorcode --wait %
If you have not set any editor, NeoNote will default to the editor set in the EDITOR environment variable or fall back to vim.
