Installation

duras is a native binary with no runtime dependencies. You need OCaml and dune to build it.

Requirements

  • OCaml (version 5.0 or later)
  • dune (version 3.0 or later)
  • gpg — optional, only needed for encrypted notes

On Debian or Ubuntu:

sudo apt install ocaml ocaml-dune

On macOS with Homebrew:

brew install ocaml dune

Build and install

git clone https://codeberg.org/duras/duras.git
cd duras
make build
make install

This installs duras to /usr/local/bin/duras and the man page to /usr/local/share/man/man1/duras.1.

To install to your home directory instead:

make install PREFIX=~/.local

Make sure ~/.local/bin is in your PATH.

Verify

duras --version
duras today

The second command prints today's date and creates your notes directory at ~/Documents/Notes if it does not already exist.

Notes directory

By default, notes are stored in ~/Documents/Notes. To use a different location, set the DURAS_DIR environment variable:

export DURAS_DIR=~/notes

Add this to your shell configuration file (.bashrc, .zshrc, etc.) to make it permanent.

Editor

duras opens notes in the editor set by the EDITOR environment variable. If EDITOR is not set, it tries nano, vi, and ed in that order.

export EDITOR=vim