Libraries
A library is a folder of Markdown notes plus hidden PKM internals. It is the unit pkm indexes, searches, and writes into.
Global Library
Section titled “Global Library”The global library is for personal, cross-project knowledge.
Default path:
~/PKMOverride it with:
PKM_GLOBAL_LIBRARY=/path/to/library pkm init --scope globalProject Library
Section titled “Project Library”A project library lives at the git root of the current repository. Use it for repo-specific notes, decisions, data models, operational runbooks, tickets, and other local context.
pkm init --scope projectScope Defaults
Section titled “Scope Defaults”Commands that write notes default to:
projectwhen run inside a git repositoryglobalotherwise
Commands that read or discover notes can search all discovered libraries unless --scope narrows them.
Hidden Internals
Section titled “Hidden Internals”PKM-owned files live under .pkm/:
.pkm/├── types/├── types.json└── .index/pkm.dbCommit your Markdown and type definitions. Do not commit .pkm/.index/.