MCPcopy
hub / github.com/zk-org/zk

github.com/zk-org/zk @v0.15.5 sqlite

repository ↗ · DeepWiki ↗ · release v0.15.5 ↗
970 symbols 3,471 edges 127 files 438 documented · 45%
README

zk logo

A plain text note-taking assistant

Screencast

Description

zk is a command-line tool helping you to maintain a plain text Zettelkasten or personal wiki.

Looking for a quick usage example?

Or want to see it in action? Checkout Shivan's video, Note-taking System ALL Programmers Should Consider.

Highlights

Note: Links in the below list are outbound ↗

See the changelog for the list of upcoming features waiting to be released.

What zk is not

  • A note editor.
  • A tool to serve your notes on the web – for this, there are some static site solutions.

Install

Check out the latest release for pre-built binaries for macOS and Linux (zk was not tested on Windows).

Homebrew

brew install zk

Or, if you want the latest state of main:

brew install --HEAD zk

Nix

zk is available in nixpkgs and has a Home Manager module.

If you want to run zk without permanently installing it:

nix run nixpkgs#zk

Or, if you want to create an ephemeral shell with zk available:

nix shell nixpkgs#zk

To permanently install zk on NixOS at the system level, include nixpkgs.zk in environment.systemPackages in your system configuration (/etc/nixos/configuration.nix by default):

environment.systemPackages = [
  # Your other packages here
  nixpkgs.zk
];

If you are using Home Manager, instead of installing for all users on the system, you can permanently install and configure zk just for your user via the Home Manager module. Add this to your Home Manager configuration:

programs.zk.enable = true;

# Modify `${XDG_CONFIG_HOME}/zk/config.toml` through this attr
programs.zk.settings = {
  # Add your own configuration settings for zk here
};

Alpine Linux

zk is currently available in the testing repositories:

apk add zk

Arch Linux

You can install the zk package from the official repos.

sudo pacman -S zk

MacPorts

sudo port install zk

Build from scratch

Make sure you have a working Go 1.21+ installation, then clone the repository:

git clone https://github.com/zk-org/zk.git
cd zk
make build

The latest state of main can be considered the stable pre-release state. To use the absolute latest state (bugs to be expected) and to contribute:

git checkout dev
make build

On macOS / Linux

$ make
$ ./zk -h

Contributing

We warmly welcome issues, PRs and discussions.

Be sure when contributing to branch from dev, not main.

Here you can read some useful info for contributing to zk.

Related projects

Extension points exported contracts — how you extend this code

Styler (Interface)
Styler stylizes text according to predefined styling rules. A rule key can be either semantic, e.g. "title" or explicit [6 …
internal/core/style.go
Logger (Interface)
Logger can be used to report logging messages. The native log.Logger type implements this interface. [3 implementers]
internal/util/logger.go
Transaction (Interface)
Inspired by https://pseudomuto.com/2018/01/clean-sql-transactions-in-golang/ Transaction is an interface that models the
internal/adapter/sqlite/transaction.go
NoteContentParser (Interface)
NoteContentParser parses a note's raw content into its components. [3 implementers]
internal/core/note_parse.go
Provider (Interface)
Provider returns a date instance. [2 implementers]
internal/util/date/date.go
TxFn (FuncType)
TxFn is a function that will be called with an initialized Transaction object that can be used for executing statements
internal/adapter/sqlite/transaction.go
Template (Interface)
Template produces a string using a given context. [3 implementers]
internal/core/template.go
RowQuerier (Interface)
(no doc) [1 implementers]
internal/adapter/sqlite/util.go

Core symbols most depended-on inside this repo

Equal
called by 200
internal/util/test/assert/assert.go
Nil
called by 134
internal/util/test/assert/assert.go
Date
called by 71
internal/util/date/date.go
NewString
called by 45
internal/util/opt/opt.go
Err
called by 33
internal/util/logger.go
WriteString
called by 33
internal/util/pager/pager.go
NewNotEmptyString
called by 30
internal/util/opt/opt.go
Err
called by 25
internal/util/test/assert/assert.go

Shape

Function 434
Method 348
Struct 146
TypeAlias 20
Interface 13
FuncType 9

Languages

Go100%

Modules by API surface

internal/adapter/sqlite/note_dao_test.go68 symbols
internal/core/config.go38 symbols
internal/adapter/lsp/server.go32 symbols
internal/adapter/handlebars/handlebars_test.go27 symbols
internal/core/note_new_test.go26 symbols
internal/core/notebook.go25 symbols
internal/adapter/sqlite/note_dao.go23 symbols
internal/util/opt/opt.go22 symbols
internal/adapter/sqlite/note_index.go22 symbols
internal/adapter/lsp/document.go21 symbols
internal/core/note_index.go18 symbols
internal/util/logger.go16 symbols

Dependencies from manifests, versioned

github.com/AlecAivazis/survey/v2v2.3.4 · 1×
github.com/aymerick/raymondv2.0.2+incompatible · 1×
github.com/bmatcuk/doublestar/v4v4.0.2 · 1×
github.com/go-testfixtures/testfixtures/v3v3.6.1 · 1×
github.com/gosimple/slugv1.12.0 · 1×
github.com/gosimple/unidecodev1.0.1 · 1×
github.com/kballard/go-shellquotev0.0.0-2018042803000 · 1×
github.com/kr/prettyv0.3.0 · 1×

For agents

$ claude mcp add zk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact