PKSPKMS

(Tags: Backend, Personal_Knowledge_Management, PKSPKMS, Programming_Language/Java)
Page Details
access: Public
status: Active
published: 2025-07-21
creationDate: 2025-01-19
modifiedDate: 2025-07-21
type: Project

[!info] I’ve not yet released it, out of shame. Will do in future.

Paul Kenny’S Personal Knowledge Management System

A HTTP API server and command line tool written in Java that can get data about Markdown files and their links to each other (and other files) in a directory ([[PKMS]]).

Uses YAML frontmatter in Markdown files as metadata and links in text content, including Wikilinks.

Made to complement Obsidian.

My uses:

Server

Currently there is no security for the server. Don’t use it.

# Start server
pkspkms server -port "3000" -directory ""
# In another terminal 
curl GET "http://localhost:3000/list/files?tags=Public" | jq .

Will return something like:

{
	files: [
		{
		
		}
	]
}

Command-line

# Export JSON graph
pkspkms export -directory "" -query "" -output "" -type "graph" -sqlite-db "" -options "wikilinks,backlinks" -depth "2"
# Export Markdown files
pkspkms export -directory "" -query "" -output "" -type "markdown" -sqlite-db "" -options "wikilinks,backlinks" -includeLinked "jpg,png"

Note: -depth retrieves files from outside the query. This can leak you information if you’re not careful.

TODO

  • Get SQlite DB up and running so it’s not hammering your hard drive and taking ages âž• 2025-06-20
  • Refractor âž• 2025-07-12
  • Use docopt format for CLI âž• 2025-07-17

Potential Features

  • Watch for file changes and update DB
  • Virtual files
  • More, better server settings
    • Exclusion list directories
    • Inclusion list directories
  • Export file
    • Have argument to use db file from previous run
    • Markdown
      • Replace Wikilinks with relative markdown links
    • Graph
      • Export JSON with links, backlinks and tags
    • HTML
    • Plaintext
  • Use Obsidian settings (point to .Obsidian directory?)
  • It’d be cool if when exporting, when you’re exporting a file and a link in that file is for a file that isn’t also getting exported it uses that file’s url property instead of the file in the link when link resolving. Would need multiple file exports though.
  • Could abuse Markdown comments for my own dynamic syntax: syntax - Comments in Markdown - Stack Overflow
  • Rewrite in Kotlin, change to Ktor and make Android app
  • Export rules as JSON (pkspkms export -json ''):
{
	"export": [
		{
			"query": 'tags=Blog*',
			"type": "markdown",
			"steps": ["wikilinkToRelativeLink", "bringLocallyLinked"],
			"destination": "/blog/posts/"
		}
	]
}

Known Issues

  • Lots
  • Doesn’t support single line, comma separated tags

Other Personal Knowledge Management Software, Solutions, Etc

Lists