Skip to main content

plain-text daily notes with optional encryption

Project description

duras

License

Daily notes as plain text files, with search and optional encryption.

Standalone tool, but most effectively used together with duras_bridge, a minimal Vim / Neovim plugin that integrates the CLI directly into the text editor.


Install

pip install duras

Requires Python 3.9 or later. No dependencies. gpg optional for encrypted notes.


Quick start

duras                          # open today's note in $EDITOR
duras append "fix login bug #todo"
duras search todo
duras tags

Note format

One file per day:

~/Documents/Notes/YYYY/MM/YYYY-MM-DD.dn

Each note is self-describing plain UTF-8 text:

date: 2026-04-28

2026-04-28 09:10  started work
2026-04-28 14:32  fix null check in login handler #todo
2026-04-28 16:00  called bank re: account — follow up Thursday

Properties:

  • plain UTF-8, LF line endings
  • header date: field matches filename and directory
  • entries are timestamped lines, two spaces between timestamp and text
  • filesystem is the index; no database, no hidden state
  • atomic writes
  • readable with any text tool

Encrypted note:

YYYY/MM/YYYY-MM-DD.dn.gpg

via the GNU Privacy Guard.


Scope

Fits:

  • terminal-based workflows
  • grep-based retrieval
  • long-lived plain text notes
  • optional encryption

Not a fit:

  • sync system
  • GUI or rich text editor
  • query engine or database

Commands

open

duras               # today
duras open -1       # yesterday
duras open 2026-04-19
duras open -- +10   # pass +10 to $EDITOR (jump to line)

append

duras append "text"
duras append -d -1 "yesterday"
cat file | duras append
cmd | duras append

Text argument is optional. When omitted, stdin is read automatically.

show

duras show
duras show -1

list / stats

duras list
duras list -n 0     # all notes
duras stats

Order: by filename (ISO date), not mtime.

search / tags

duras search error
duras search todo -i    # case-insensitive
duras tags              # all tags with counts
duras tags project      # notes containing #project

Literal match, not regex. Encrypted notes excluded.

export

duras export ~/backup
duras export ~/backup --encrypt

Creates a timestamped .tar.gz. --encrypt pipes through gpg; no plaintext archive is written.

other

duras path          # absolute path to today's note
duras dir           # notes root directory
duras today         # print today's date
duras audit         # validate directory structure
duras echo          # notes on this date in past years
duras near          # notes within ±3 days of today
duras mv 2026-04-17 2026-04-16

Encryption

duras -c open
duras -c append "secret"
duras -c show
  • uses system gpg
  • append -c is memory-only; no plaintext temp file
  • open -c writes a temp file to /dev/shm when available

Dates

YYYY-MM-DD   absolute
0            today
-1           yesterday
-7           one week ago

Future dates are rejected.


Environment

variable meaning
DURAS_DIR notes directory (default: ~/Documents/Notes)
EDITOR editor (fallback: nano, vi, ed)
DURAS_GPG_KEY GPG recipient (default: self)

.editorconfig is written to the notes directory on first run. It configures any supporting editor to use UTF-8, LF line endings, and 72-column line length for .dn files.


Exit codes

code meaning
0 ok
1 error
2 not found
3 invalid input
4 external failure

Limits

  • encrypted notes are not searchable
  • depends on system gpg for encryption

Docs


Variants

duras

Standard variant for Unix-like systems. Uses system gpg. No dependencies.

duras_ashell

For iOS a-Shell mini. Uses PGPy instead of system gpg. No external binaries. Handles .asc keys directly; no keyring. Compatible encrypted format.


License

ISC License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duras-1.1.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duras-1.1.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file duras-1.1.1.tar.gz.

File metadata

  • Download URL: duras-1.1.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for duras-1.1.1.tar.gz
Algorithm Hash digest
SHA256 4e79151c28aeb532625db59c54dd83095ca4c7a11525fc7c2011f584a3490c69
MD5 1d17519eecfdbbdbd69c53f5a946a5e6
BLAKE2b-256 e1864a0f4c73a09f80078847bfa39ecbbbe818faf5b3c4edfaad4fd4a0515823

See more details on using hashes here.

Provenance

The following attestation bundles were made for duras-1.1.1.tar.gz:

Publisher: publish.yml on sduras/duras

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file duras-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: duras-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for duras-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12a41f92978c58839eb350b1c18d381322b501d9f355f07f23d72328fcdd4814
MD5 7c0f83bff6c45744fe3cd3a07464e232
BLAKE2b-256 e132c83e39431a8c639d5b882137e9560a639b3d2cd3427bd1d4e533613b1dec

See more details on using hashes here.

Provenance

The following attestation bundles were made for duras-1.1.1-py3-none-any.whl:

Publisher: publish.yml on sduras/duras

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page