You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michał Góral 3e94ae321e zet-note: allow overwrite {dt} placeholder 2 months ago
modules zet-note: allow overwrite {dt} placeholder 2 months ago
src Mention ZET_ROOT in zet's help 4 months ago
test Switch to pytest for tests 4 months ago
.gitignore Switch to pytest for tests 4 months ago
CHANGELOG added zet-note 2 months ago
Cargo.toml Release 0.3.0 4 months ago
LICENSE Added license 2 years ago
Makefile rm gzet, zet is aware of ZET_ROOT 4 months ago gzet will now obey $XDG_CONFIG_HOME 4 months ago First tests 4 months ago
run-tests Switch to pytest for tests 4 months ago
test-requirements.txt Switch to pytest for tests 4 months ago

zet - modular, Zettelkasten aware command line notebooks manager

Zet is generic notebooks manager with tools built to specifically address some pain points during maintaining Zettelkasten-style notes, but by itself it isn't bound to any particular methodology or notes format.

It comes with a set of useful built-in tools, but is easily extensible.


$ # initialize first empty notebook:
$ zet init

From now on you can run zet from a drectory in which zet.toml is found. Optionally, you can use gzet, a global zet, which points zet appropriate zet.toml. gzet expects that a special environment variable, ZET_ROOT will be set, either in its run environment, or via a configuration file stored in $XDG_CONFIG_HOME/zet/gzet.conf, For example:

# ~/.config/zet/gzet.conf

export ZET_ROOT="$HOME/notebooks"


Zet founds a root directory of your notebooks by searching backwards for zet.toml file, which is also its configuration file. It is an ordinary TOML configuration file, which contains a [[notebooks]] array of tables, where each entry exists for a separate notebook. Each notebook must have at least a name and path. Zet parses this configuration file and saves it as environment variables which are passed to subcommands.

Subcommands are searched inside PATH environment variable. On top of PATH initially set by user, zet sets additional directories to which users and system administrators can install user-wide and system-wide zet subcommands. Zet subcommands are simply programs named zet-<subcommand. For example, calling zet foo will run zet-foo executable.

Subcommands receive all unparsed arguments passed to zet (typically set after the subcommand name). Their environment is updated with a set of variables which all start with ZET_ prefix. Zet will pass a colon-separated list of notebook names inside ZET_NOTEBOOKS variable. Data for each notebook is stored in ZET_NOTEBOOK_<NAME>_<VAR> variables.

Users can set some subcommands parameters in zet.toml file. Zet parses and passes command subsection of this file, which contains a subtable with parameters for each separate command.

Exmple zet.toml

root = "content"

name = "Personal"
path = "content/0"
git = "ssh://"

name = "Work"
path = "content/work"
git = ""


Zet can be configured to use and understand several separate notebooks. For some commands, you can choose files inside them by using a special "notebook notation:


It means that inside a notebook named as name, find a file.ext inside a directory/subdirectory. Usually, most of the parts of this notation can be skippedb and zet will use sensible defaults for them.

Default notebooks

Default notebook is held inside $ZET_ROOT/.default-notebook. If this file is missing, zet will use the first notebook configured in zet.toml.

Default notebook can be get and set with zet default-notebook command


Opening Files

zet open can open files stored inside notebooks. It accepts a partial description of file in notebook notation. If more than one file matches the description, you will be interactively prompted to choose a file to open.

Importing Files and URLs

zet import can import both files and URLs to your notebooks.

Destination of imported file can be chosen by using a notebook notation (see Notebooks section). Each part of it can be skipped. Missing directories will be automatically created and existing files won't be overwritten. Instead, importing existing files will transform their basenames to be unique.

When importing URLs, a Markdown file is created by downloading a web page and converting it with pandoc.