AndrewCopeland / zettelkasten

Creating notes with the zettelkasten note taking method and storing all notes on github
Apache License 2.0
89 stars 11 forks source link

zettelkasten

A note taking application following the Zettelkasten method.

Installation

curl -s -o /usr/local/bin/zk https://raw.githubusercontent.com/AndrewCopeland/zettelkasten/master/zk && chmod +x /usr/local/bin/zk

Getting started

To initialize the zettelkasten config just run zk init.

$ zk init
Zettelkasten Directory: /Users/acopeland/git/AndrewCopeland/zettelkasten/kasten
Zettelkasten auto git push[yes/no]: no
Zettelkasten git directory(optional):
Default command line text editor[vi/emacs/nano]: vi
$

Usage

Usage:  zk COMMAND

A note taking application following the Zettelkasten method.

Commands:
  n, new            Create a new zettel and use default editor
  nv, new-vi        Create a new zettel and edit with vi
  ne, new-emacs     Create a new zettel and edit with emacs
  nc, new-code      Create a new zettel and edit with Visual Studio Code
  o, open           Open an existing zettel in default editor
  ov, open-vi       Open an existing zettel in vi
  oe, open-emacs    Open an existing zettel in emacs
  oc, open-code     Open an existing zettel in Visual Studio Code
  ob, open-browser  Open an existing zettel in github using OS default browser
  p, push           Push zettels to GitHub
  c, cat            Print an existing zettel to terminal
  t, tag            Search zettels for a specific tag
  s, search         Search for a sub string within all zettels
  ls, list          List all zettels
  rm, remove        Remove a zettel
  ln, link          Link 2 zettels together
  rml, rm-link      Remove a link between 2 zettels
  home              Display zettelkasten home directory
  init              Initialize the $HOME/.zettelkasten
  variables         List all variables defined in $HOME/.zettelkasten
  update            Update to latest zk script
  add, add-media    Add specific media (images, music, pdf, etc) to kasten
  lsm, list-media   List all media zettels
  sync              Sync local zettelkasten with git zettelkasten

To create a zettel perform the following. This will open up vi and once you are done save the zettel.

zk new "my first zettel"

To open an existing zettel perform the following. This will open up vi on the existing zettel, you can update zettels using this command. This command will search for the zettel using the substring my-first-zettel and will open it if only 1 result was found.

zk open my-first-zettel

To link zettels together perform the following.

zk link my-first-zettel my-second-zettel

Zettelkasten configuration

When executing zk init a configuration file is created in your home directory called .zettelkasten. This file contains variables that are used by zk. An explaination of each of these variables are below:

Uninstall

To remove the application perform the following:

rm /usr/local/bin/zk
rm "${HOME}/.zettelkasten"

Limitations