Zero-dependency markdown notes, synced to Koofr WebDAV or GitHub.
gn is a simple bash script that pulls a
markdown note from cloud storage, opens it in
$EDITOR, and pushes it back if you changed
anything. Supports Koofr (WebDAV) and GitHub. No git, no
daemons, no heavy apps to install - just
curl and a local folder.
gn.sh above and make it run this
to make it executable:
mv gn.sh ~/bin/gn && chmod +x ~/bin/gn
gn, or
anything you like) to hold your notes.
repo scope — this lets gn read
and write files in your repository over the GitHub
API. The setup menu will ask you to paste in your
token, username, and repository name once; these are
saved to your local config file.
~/gn/gn.conf with
chmod 600 permissions - only your local user
can read the file.
$ gn
No config found at ~/gn/gn.conf - let's set one up.
Select your provider:
1) Koofr (WebDAV)
2) GitHub
Choice [1-2]: 2
GitHub Personal Access Token (input hidden):
GitHub username (repo owner): your-username
Repository name: gn
Save this config for future runs? [Y/n] Y
To clear or alter your configuration later, run
gn -c to wipe gn.conf and re-run
setup.
gn [options] [note]
| Command | What it does |
|---|---|
gn |
Open (or create) default note.md
|
gn ideas |
Open ideas.md - pulls, edits,
pushes if changed
|
gn -d ideas |
Delete a note, local and remote (with confirmation) |
gn -r old new |
Rename a note, local and remote (WebDAV
MOVE)
|
gn -s |
Sync (pull) all remote notes down to local directory |
gn -c |
Clear saved credentials and reconfigure |
gn -h |
Show help |
The full script - copy it directly if you'd rather not download the file.
Loading gn.sh...