a bash script · one file · no server
Bana Notes
for the terminal.
bn.sh is a single, dependency-light bash script that turns any cloud storage account into a note-syncing backend for your terminal — plaintext or encrypted, from any machine, with no app to install and no service to trust.
Google Drive · OneDrive · Dropbox · Box · or any rclone remote — bring your own storage.
What it actually does
No daemon, no account with Bana, no proprietary format. Just files, a fast editor loop, and rclone doing the transport.
Run bn and it opens today's scratchpad in $EDITOR.
Save and quit, and the file is pushed to your cloud remote in the background — you're
back at the prompt before the upload even finishes. Run bn groceries
and it does the same for a note called groceries.txt. That's the whole
idea: notes are plain .txt files on disk, mirrored to storage you already
own, edited with the editor you already use.
For anything sensitive, bn -e NAME opens a note that's decrypted
to a temp file, edited, then re-encrypted with OpenSSL (AES-256-CBC) before it ever
touches the cloud — the plaintext never leaves your machine. A second, entirely separate
profile (-c) lets you point at a second remote — a work Dropbox
next to a personal Drive, say — without the two ever mixing.
Built for the prompt, not a browser tab
Vault notes
-e NAME encrypts with AES-256-CBC + SHA-512 before sync. Passphrases are never echoed or written to disk.
Bring your own backend
Built on rclone: Google Drive, OneDrive, Dropbox, Box, or anything else rclone supports — including a fully headless setup flow.
Dual contexts
The -c flag swaps to a completely separate directory and remote — a second identity, one keystroke away.
Conflict-aware pulls
Every edit checks remote mtimes first and pulls a newer copy before you start typing, so two machines don't fight each other.
Background push
Saves return control to your shell immediately; the upload runs in a subshell and logs failures to .sync_errors instead of blocking you.
Zero real dependencies
Pure POSIX-ish bash plus OpenSSL, which ships almost everywhere. Missing rclone gets offered as an automatic, scoped-to-your-home download.
Command reference
Exactly what bn -h prints.
bn -c -l or bn -c mynote.Get it running
Five minutes, one file, one setup wizard.
Download the script
Save bn.sh anywhere — your Downloads folder is fine, you'll relocate it in a moment.
Make it executable
bash needs the execute bit set before it will run the file directly.
chmod +x bn.sh
Move it onto your PATH
Put it somewhere your shell already looks, so bn works from any directory. ~/bin or ~/.local/bin are the usual spots — create one if you don't have it yet.
mkdir -p ~/bin mv bn.sh ~/bin/bn chmod +x ~/bin/bn
If ~/bin isn't already on your PATH, add it to your shell profile:
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Using zsh instead? Swap ~/.bashrc for ~/.zshrc.
Run it once to configure storage
The first run walks you through linking a cloud backend. rclone is required — if it's not already installed, bn offers to fetch a scoped copy into ~/bin automatically, no root needed.
bn
You'll be asked to pick a provider:
Options 1–4 open a browser tab to authorize. Option 6 is for servers or headless boxes: it prints an rclone authorize command to run on a machine that does have a browser, then asks you to paste back the resulting token.
Start taking notes
Setup finishes by installing itself onto your PATH automatically, so from here on bn just works.
bn # today's scratchpad bn groceries # a named note bn -e taxes # an encrypted note bn -l # list everything bn -h # full help