Skip to main content

Simple note-taking with CLI & Git integration.

Project description

pyzet

Tests

"I, of course, do not think everything by myself. It happens mainly within the Zettelkasten".

pyzet is a CLI tool targeted at note-taking and personal knowledge management loosely inspired by the Zettelkasten approach, hence the name. The whole workflow is centered around Git repos where notes are stored.

Installation

Prerequisites:

  • Python 3.10+
  • Git 2.25+ (but older also should be fine)

Unix and Windows are supported. You can install pyzet with pip:

pip install pyzet

Tutorial

For the quick setup for the either platform (make sure to create missing folders):

pyzet sample-config unix > ~/.config/pyzet/pyzet.yaml
pyzet sample-config windows | Set-Content ~/.config/pyzet/pyzet.yaml

Run pyzet init to create Git repo.

You can read the more detailed tutorial in docs.

Shell completion

pyzet supports tab completion. To enable it in your shell, add the following to your .bashrc, .zshrc, or equivalent shell configuration file:

eval "$(register-python-argcomplete pyzet)"

Configuration

A config file should be placed inside ~/.config/pyzet/pyzet.yaml, and looks like this:

repo: ~/zet
editor: /usr/bin/vim
editor_args: []
  • repo: the location of the ZK Git repo

  • editor: use it to overwrite the default editor (by default we refer to EDITOR and VISUAL env variables)

  • editor_args (default: empty): optional list of CLI arguments which should be passed to the editor

Support for multiple ZK repos

You can have multiple repos, and only a single config file, because there is --repo flag that you can always set to point to a custom repo (and possibly, create an alias that includes it). If --repo flag is used, the value from YAML is ignored.

Supported editors

See docs.

Writing parsable zettels

See docs.

Development

[!NOTE] uv is required for justfile commands to work correctly.

Prerequisites:

  • uv installed and on PATH
  • just installed and on PATH

Installation and testing

Development dependencies are stored in requirements-dev.txt. tox is used to specify test envs and how to install dependencies.

To install package in the editable mode with dev deps:

just venv

To run pre-commit checks:

just pre-commit

To run tests against all supported Python versions:

just test

To measure code coverage:

just coverage

To run all the above tests & checks:

just all

Building and releasing

To build a new version and verify it with twine:

just build

[!IMPORTANT] Make sure to generate an API token in PyPI.org in order to upload the new version.

To run all checks, build the package, and release it

just release

Inspiration and further reading

@rwxrob inspired me to write a stand-alone tool for note taking rather than use a ready solution. He posted a good summary in this video.

See also:

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

pyzet-0.14.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

pyzet-0.14.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file pyzet-0.14.0.tar.gz.

File metadata

  • Download URL: pyzet-0.14.0.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pyzet-0.14.0.tar.gz
Algorithm Hash digest
SHA256 b9dae050bd441a4e216fd404a6735acbf04ab1a9786d8ba44fc8376907b586a2
MD5 3281893dd1a4094031fc240907b3ce07
BLAKE2b-256 68192f09d12b6d225d2a312dcc8f2914002edb0b4f585a71b32c8406370dad79

See more details on using hashes here.

File details

Details for the file pyzet-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: pyzet-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pyzet-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98924610a81425d45cf8224a747c11902e3142eeced5ec40e38322f60b104070
MD5 edd1ea26ff535b23f2e71558521668a1
BLAKE2b-256 b106a644a4293374fc0bc8b40804ebfed3dfbdc7e8915442172bde211938343c

See more details on using hashes here.

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