note.py is a simple command-line tool that manages notes or todo items as GitHub issues in your private repository.
Each note is stored as a separate issue. Editing a note updates the issue body. Deleting a note closes the issue.
note.py [n|e|d] [note name]Set the environment variables NOTE_REPO and NOTE_TOKEN:
- Create a private GitHub repository to store your notes.
- Generate a GitHub Personal Access Token.
- Add the following lines to your shell config (
.bashrc,.zshrc, etc.), replacing the placeholders:
export NOTE_REPO="yourusername/reponame"
export NOTE_TOKEN="ghp_..."- Install the script:
git clone https://github.com/bojle/note.py
cd note.py
sudo cp note.py /usr/bin/Create a new note:
note.py n todoSpaces in note names are supported:
note.py n "grocery shopping"This opens your $EDITOR. After writing and saving, the note is pushed to GitHub as an issue.
Edit a note:
note.py e todoDelete (close) a note:
note.py d todoAdditionally, if you use vim, add this snippet to your vimrc to update the issue when you ":w" on the file
augroup NotePush
autocmd!
autocmd BufWritePost *.note.md silent! !note.py push "%:t"
augroup END