Encrypted, project-local notes for your terminal.
Project description
pwdNote
Encrypted, project-local notes for your terminal.
pwdnote keeps project-specific notes — TODOs, deployment notes, AWS account
details, session IDs, customer context, reminders — encrypted on disk, right
next to your code, without ever exposing plaintext inside the repository.
It is local-first, encrypted-by-default, Git-friendly, and
terminal-native. The single encrypted file (.pwdnote.enc) is safe to
commit; without your key it is just ciphertext.
pwdnote started as a simple way to keep personal project notes close to my code, without worrying about accidentally committing secrets or overcomplicating the workflow.
Demo
Installation
uv tool install pwdnote
That's it — no further setup. The encryption key is generated automatically on first use.
Quick start
cd my-project
pwdnote init # create .pwdnote.enc
pwdnote edit # open it in your editor
pwdnote # print the decrypted note
pwdnote add "Remember to rotate AWS credentials" # appends a new line
Commands
| Command | Description |
|---|---|
pwdnote |
Show the decrypted project note. |
pwdnote init |
Create an encrypted note (# Project Notes). |
pwdnote edit |
Decrypt, open in $VISUAL/$EDITOR, re-encrypt on save. |
pwdnote add "text" |
Append - text to the note without opening an editor. |
pwdnote status |
Show the project root, note file, and encryption status. |
pwdnote gitignore |
Add recommended ignore entries (.pwdnote.tmp, .pwdnote.cache). |
pwdnote config path |
Print the config file path. |
pwdnote config show |
Print the effective configuration. |
pwdnote config init |
Create config.toml with defaults. |
Aliases
Short built-in aliases are available for the most common commands:
| Alias | Command |
|---|---|
pwdnote i |
pwdnote init |
pwdnote e |
pwdnote edit |
pwdnote a |
pwdnote add |
pwdnote s |
pwdnote status |
Configuration
Configuration is optional. With no config file the defaults apply and behaviour is unchanged.
The config file lives at ~/.config/pwdnote/config.toml (honouring
XDG_CONFIG_HOME). Run pwdnote config init to create it with the defaults:
[notes]
initial_content = "# Project Notes\n"
auto_gitignore_note_file = false
[editor]
command = ""
[security]
key_backend = "file"
notes.initial_content— content used bypwdnote initfor a new note.notes.auto_gitignore_note_file— whentrue,pwdnote initadds.pwdnote.encto.gitignore.editor.command— when set, overrides$VISUAL/$EDITOR.security.key_backend— onlyfileis supported today. Other values fail with a clear error; advanced key backends may come later.
Project root detection
pwdnote does not operate only on the current directory. Starting from your
working directory it searches upward:
- If
.pwdnote.encexists, that location is used. - Otherwise, if
.gitexists, that location is treated as the project root. - The search stops at the filesystem root.
So from project/backend/api, running pwdnote finds
project/.pwdnote.enc.
Editor integrations
pwdnote exposes a few non-interactive commands for tools such as a VS Code
extension:
| Command | Purpose |
|---|---|
pwdnote read |
Print the decrypted note to stdout (no formatting). |
pwdnote write --stdin |
Replace the note with content from stdin (add --create to create it). |
pwdnote root |
Print the detected project root. |
pwdnote note-path |
Print the resolved .pwdnote.enc path. |
These write machine-readable output to stdout and errors to stderr. Encryption is always handled by the CLI, so integrations never touch the key or the file format.
About the .pwdnote.enc file in this repository
This repository intentionally includes a .pwdnote.enc file.
The file contains real project note data encrypted by pwdnote. It is included to demonstrate one of the core design goals of the tool: project notes can be stored alongside source code and committed to Git while remaining encrypted on disk.
The repository stores only ciphertext. Without the corresponding encryption key, the contents cannot be read.
By default, .pwdnote.enc is designed to be commit-safe. If you prefer not to commit your project notes, you can manually add .pwdnote.enc to your .gitignore or use pwdnote gitignore to add it automatically.
Security model
- Authenticated encryption. Notes are encrypted with
Fernet (AES-128-CBC with an
HMAC-SHA256 authentication tag) from the well-maintained
cryptographylibrary. We do not implement custom cryptography. - Integrity protection. Tampered or corrupted files fail to decrypt rather than returning garbage.
- Key storage. A single key is generated on first use and stored at
~/.config/pwdnote/key(honouringXDG_CONFIG_HOME) with0600permissions inside a0700directory. - No plaintext on disk.
pwdnote editwrites to a temporary file with restrictive permissions and always deletes it afterwards. - Commit-safe.
.pwdnote.encis meant to be committed; it is ciphertext. Do not ignore it. (The temporary/cache artifacts are ignored instead.)
The crypto backend lives behind a small abstraction (encrypt_text /
decrypt_text), so it can be replaced later — and future versions may add
macOS Keychain, 1Password, age, or GPG key backends.
Limitations
- The key lives on your machine. If you lose
~/.config/pwdnote/key, encrypted notes cannot be recovered. Back the key up somewhere safe. - There is no built-in sync. Sharing a note across machines means sharing the same key (e.g. via a secrets manager).
- One note per project root.
pwdnoteis intentionally simple — no databases, no cloud, no plugins, no AI features.
Contributing
git clone https://github.com/inspiringsource/pwdnote
cd pwdnote
uv sync # install deps + dev tools
uv run pytest # run the test suite
uv run pwdnote --help # try the CLI from source
Issues and pull requests are welcome. Please keep the tool small and reliable — new storage/key backends should slot in behind the existing abstractions.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pwdnote-0.3.0.tar.gz.
File metadata
- Download URL: pwdnote-0.3.0.tar.gz
- Upload date:
- Size: 76.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
133cfd9c896a1d4c2ebf75ae2f67bd49df6e9f33fc005583769fac2e20b1cd75
|
|
| MD5 |
386681c2f269a437a046a4711b000125
|
|
| BLAKE2b-256 |
c070f8fd2a8f613a1db3edf433ef278442c900c277bf54c368f5b0e727772a24
|
File details
Details for the file pwdnote-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pwdnote-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2028e03b2536b90572fcfbe2f36d7928f79362a07898a4ebc507a353f94f1b6e
|
|
| MD5 |
001c7a0d2b929031fa9bef034dbc593b
|
|
| BLAKE2b-256 |
61791946fb1a64c9ee26d52aed247f657f2cad4a8b319e4bac3e8f174c1a6d1a
|