Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xwmx/nb/llms.txt
Use this file to discover all available pages before exploring further.
nb lets you protect individual notes and bookmarks with a password at the moment of creation. Encrypted items are stored on disk with an .enc extension and are decrypted in memory only when you view or edit them — your password is never stored anywhere by nb. This makes it safe to sync encrypted notes to a remote Git repository or a cloud syncing service without exposing their contents.
Creating an Encrypted Note
Add the-e / --encrypt flag to nb add to create a password-protected note. nb will prompt you to set a password before the file is written to disk:
.enc extension:
🔒 indicator identifies encrypted items in all listing views.
Creating an Encrypted Bookmark
Bookmarks can be encrypted in the same way using the-e / --encrypt flag:
Viewing Encrypted Notes
When you view, open, or peek at an encrypted item,nb prompts for the password before displaying the content:
nb open and nb peek work seamlessly with encrypted bookmarks — nb simply prompts for the password before proceeding.
Editing Encrypted Notes
nb edit handles the full encrypt–edit–re-encrypt cycle automatically:
- Prompts for the note’s password.
- Decrypts the content and opens it in your editor.
- Re-encrypts the updated content and saves the new version when you close the editor.
Each encrypted item has its own independent password. There is no master password or keyring — losing the password for an item means that item cannot be decrypted.
Encryption Tool Configuration
nb uses OpenSSL with AES-256 encryption by default. GPG is also supported. Change the tool with nb set encryption_tool:
- OpenSSL (default)
- GPG
openssl command line tool independently of nb.$NB_ENCRYPTION_TOOL environment variable also controls the tool:
| Variable | Default | Supported Values |
|---|---|---|
$NB_ENCRYPTION_TOOL | openssl | openssl, gpg |
Portability: Decrypting Without nb
Becausenb uses standard tools for encryption, you are never locked in. Encrypted files can be decrypted directly from the command line using the same tool that created them — no dependency on nb required.
How Encryption Interacts with Git Sync
Encrypted notes are binary files from Git’s perspective. When a sync conflict occurs on an encrypted note,nb cannot perform a text merge. Instead, it saves both versions as separate files in the notebook — appending --conflicted-copy to the remote version’s filename. Resolve the conflict by comparing both files, combining them manually, and deleting the --conflicted-copy file.