Giter Site home page Giter Site logo

notes's Introduction

Notes

Local notes, gpg-encrypted.

Simple CLI (similar to pass). Single-file installation, < 400 lines of code.

screenshot

Run notes -h for a full description of available commands.

Dependencies

  • gpg
  • git (optional)
  • sed
  • tree
  • find

Storage

Notes are stored in $NOTES_DIR, which defaults to $HOME/.note-store if it is unset.

Each note is stored as a file, with filename formatted as <name>.md.gpg. The contents of each note are never stored in plain text, only the filenames themselves.

Editing

When running note edit <note name>, the associated note is decrypted using your default gpg key, then opened using your $EDITOR.

Git

You can optionally initialize a git repo within the notes directory by running notes git init. After that, every change to the store will be automatically tracked with a new commit to that repo.

You can also run any git other command from within that directory by simply prepending the notes command, like so:

notes git <normal git commands + args>

For example, creating an encrypted backup of your entire notes storage is as easy as pushing to a remote repository (since notes are only stored in their encrypted form).

notes git push <remote>

Known security issues

When a note is opened for editing, it is first decrypted to plaintext using your GPG credentials. When you exit the editor, this plaintext file is usually deleted. However, there are situations when it will not be deleted.

For example, if your computer crashes while you are editing a note, the plaintext version of the note will be left on your disk (this actually happened to me once).

In order to reduce the risk of leaving plaintext lying around, a few precautions are taken:

  1. The notes list command (alias notes) will highlight any plaintext note files in RED.
  2. Plaintext note files are automatically ignored in .gitignore with **/*.md, so they will not be tracked by git.
  3. The command notes clean will automatically clean up any plaintext files.
  4. Any variables exposing plaintext within the code are suffixed with _PLAINTEXT for clarity.

notes's People

Contributors

rexgarland avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.