zk – Ultra-minimal CLI Zettelkasten

zk is a single-file, zero-dependency CLI that keeps a plain-text Zettelkasten fast and portable on Linux and Windows. Notes live in a flat folder, carry timestamp IDs plus kebab-case slugs, and stay linkable through Markdown or wiki-style links. Backlinks, graphs, and tag/alias helpers are baked in—no database or background daemon required.

At a glance

Contents

Quick start

# Install: put ./zk in your PATH and make it executable
chmod +x zk
export ZK_DIR=~/Zettel            # required
export EDITOR=vim                 # optional (defaults: vim on Linux, notepad on Windows)

zk new "First note"
zk jot "Idea: inverse outline of Chapter 2 [[2025_0910_2124]]"
zk find outline
zk link outline                   # -> [Outline](./2025_0910_2124_outline.md)
zk backlinks 2025_0910_2124

Environment

Data model

Core commands

Vim integration

Smart link handling without plugins:

let g:zk_dir = expand('~/Zettel')
let g:zk_link_style = 'md'   " or 'wiki'

Templates

Examples

export ZK_DIR=~/Zettel_Jamie

# Create and tag a note
zk new "Rapid note-taking process"
zk tag 2025_1009_1952 "workflow; zettelkasten"

# Generate Markdown or wiki links
zk link rapid
zk link --style wiki rapid

# Traverse and clean-up
zk backlinks 2025_1009_1952
zk audit --dead
zk graph --center 2025_1009_1952 --depth 2

# Quick Vim flow
# - gx follows Markdown/wiki links in a new tab
# - <leader>[[ inserts a link; <leader>zl uses fzf if available

Performance and testing

Learn more

Back to top