Notiz is a CLI notes manager.
It outputs notes in markdown format, meaning you can add tables, code snippets with syntax highlight, URLs and much more to notes that are displayed directly in your terminal.
All notes are stored in your own MongoDB instance: your data is yours. The easiest way is using a free M0 database from MongoDB Atlas. This also means you can treat your notes as actual documents/records that will be persisted until you delete them through either your CLI or directly in your database (i.e. DB tools).
Keep in mind this is a work in progress!
Simply install the CLI tool from npm
:
Can't install globally with Bun yet, since Bun isn't currently running postinstall
scripts.
npm i -g @jliocsar/notiz@latest
Create a secret of your choice and set as an env. variable named NOTIZ_SECRET
in your terminal's rc file (i.e. .zshrc
, .bashrc
...):
export NOTIZ_SECRET='my secret'
Then simply authenticate your database through Notiz's CLI itself:
notiz auth
Make sure you input your MongoDB connection URI with your username & password authentication!
Your URI will be stored in a encrypted file in the ~/.notiz
directory, it'll use your NOTIZ_SECRET
env. variable as a secret for the encryption.
All contributions are welcome here!
If you want to contribute, simply clone the repository and run the following command from the root folder:
bun i
This will install all dependencies and transpile files from .civet
to .civet.tsx
, so you can also run the command from the notiz
executable.
The main scripts are:
bun start
bun transpile
Note The database credentials used in development are the same from your usual Notiz command, so keep that in mind!
notiz <cmd> [options]
Commands:
notiz upgrade Upgrades the command to its latest version
[aliases: u]
notiz auth Updates the database access configuration
[aliases: a]
notiz configure <option> <value> Configures the CLI options [aliases: conf]
notiz search <content> Search notes by content [aliases: s]
notiz preview Preview all notes [aliases: p]
notiz delete <id...> Delete note(s) by ID(s) [aliases: d]
notiz open [id] Opens a note by its ID [aliases: o, e]
notiz view [id...] Views note(s) by ID(s) [aliases: list, v, l]
notiz create Create a note [aliases: c, n]
Options:
--help Show help [boolean]
--version Show version number [boolean]
Important The default editor used by Notiz is configured by the
notiz configure editor
command, or by setting theVISUAL
/EDITOR
env. variables. If neither are present, Notiz will usenvim
by default.Check more details about the editor priority here.
Creates a new note.
The create
command will open the configured editor to create a new note.
The metadata part of the document will have a title
field that's required, besides the actual note content.
Warning Notes cannot be empty! They must have a content to be stored.
Each note can have an expires at
date, which is a combination of [value] [unit]
, the unit being any available from the dayjs library.
Has the aliases
c
andn
.
notiz create
Create a note
Options:
--help Show help [boolean]
--version Show version number [boolean]
-e, --expires Note expiration time [string]
Opens a note by its ID.
Used for updating or just viewing a note.
Provide "last"
/"@"
or no IDs to open the last edited note.
Has the alias
o
.
notiz open [id]
Opens a note by its ID
Positionals:
id Note id ("last"/"@" or none to open the last one) [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
-e, --expires Sets a new note expiration time [string]
Views note(s) by ID(s).
Used for viewing the actual content of the note.
Provide "last"
/"@"
to view the last edited note, or no ID to view all notes.
Has the aliases
v
andl
.
notiz view [id...]
Views note(s) by ID(s)
Positionals:
id Note id(s) ("last"/"@" to view the last one, none to view all)
[array] [default: []]
Options:
--help Show help [boolean]
--version Show version number [boolean]
Deletes note(s) by ID(s).
Provide "all"
to delete all notes.
Has the alias
d
.
notiz delete <id...>
Delete note(s) by ID(s)
Positionals:
id Note id [array] [required] [default: []]
Options:
--help Show help [boolean]
Configures the CLI options
Has the alias
conf
.
notiz configure <option> <value>
Configures the CLI options
Positionals:
option Option to configure [string] [required] [choices: "editor"]
value Value to set the option to [string] [required]
Options:
--help Show help [boolean]
--version Show version number [boolean]
Upgrades Notiz to its latest version.
A simple wrapper around the npm i -g ...
command.
Has the alias
u
.
notiz upgrade
Upgrades the command to its latest version
Options:
--help Show help [boolean]
--version Show version number [boolean]
Updates the current database credentials used by Notiz.
The credentials are stored on ~/.notiz/database
in a encrypted file.
Has the alias
a
.
notiz auth
Updates the database access configuration
Options:
--help Show help [boolean]
- Write docs using GH's Wiki;
- Auto-sync docs after a few mins.
Feel free to contribute to this project with any features you'd like.
There's no contributing guidelines or anything similar at the moment, but there might be in the future.