Tooling for an Acme/Edwood-centric archive of notes.
README.md

neowiki #

neowiki is a collection of tools for managing a personal Zettelkasten-style wiki: a tree of timestamped, tagged, interlinked Markdown notes filed under a date-based directory hierarchy (wikidir/YYYY/MM-Mon/DD/).

Notes carry YAML front matter with a title, date, and space-separated #tag list. Tools across the system read and write this front matter to create, locate, and link notes consistently.

It's a ideosyncratic tool but maybe an interesting example of wrapping Edwood/Acme with complex tooling. Most of it is also my first experience with a doing a lot of vibe coding. Queue complicated opinions. Thanks to Claude. But maybe it would have been better if I'd done it all the hard way and been contributing to open source all along the way? I started writing the previous version of wikitools back in 2009 but got tired of refactoring my own legacy code.

Components #

wiki — Maintenance CLI (TypeScript) #

wiki.ts (compiled to ./wiki) provides bulk maintenance operations over the wiki tree.

Command Description
linter Walk the wiki root and report files with naming, path, or wiki-link issues. Exits non-zero if issues are found.
backlinks Rebuild backlink metadata (stored as extended attributes) for all files. -n is a dry run.
updateone <file> Propagate one file's backlink entry to all files it links to.
tidy Move files to canonical date-based locations and rewrite stale links. -n is a dry run.

All commands require --root=<wikiDir>.

wikinew — Create Articles (Go, Alfred) #

wikinew creates a new wiki article and opens it in the configured editor. It is designed to be invoked as an Alfred Script Filter: it accepts tag and title words on the command line, outputs an Alfred JSON items list for interactive autocomplete (using the wiki's tag list), and on selection writes the new article to disk and opens it.

wikiedit — Open Articles (Go, Alfred) #

wikiedit opens an existing wiki article in the editor. Like wikinew, it is designed as an Alfred Script Filter: it accepts free-text and @tag terms, runs a Spotlight (mdfind) query scoped to the wiki root, and returns matching files as Alfred items. Selecting an item opens the file.

Alfred latency for wikiedit can be profiled with WIKIEDIT_TIMING; see wikitimings below.

transclude — Excerpt Notes (Go, Acme/Edwood/Sam) #

transclude is an Acme/Edwood/Sam helper. It reads selected text from stdin, creates a new wiki note titled <source title> excerpt with the source file's tags, writes a [[wiki-link]] to the new note on stdout, and opens it in the editor.

The source file is taken from the $samfile environment variable (set automatically by Acme/Edwood/Sam to the focused window's path) or via --samfile.

edwikiwatch — Acme/Edwood TOC Watcher (Go) #

edwikiwatch is a background daemon for the Edwood/Acme editor. It watches the wiki root and the set of open editor windows, maintaining a live table-of-contents window that lists open wiki files alongside their backlinks.

edwikiwatch --root=<wikiDir> [--tooldir=<dir>] [--debug]

sharesheet — Web Capture (iOS/macOS, Swift) #

sharesheet/ is a Swift Share Sheet app extension for iOS and macOS. It appears in the system share sheet when viewing a webpage in Safari or other apps, and creates a new wiki note pre-populated with the page title, URL, and any selected text.

scriptable — Mobile Article Creation (iOS) #

scriptable/ is JavaScript for the Scriptable iOS app. It provides a mobile-side alternative to wikinew: creating new wiki articles from an iPhone or iPad. (Search and edit are not implemented. I use iA Writer: The Benchmark of Markdown Writing Apps - iA on iOS to edit, search, browse notes.)

wikitimings — Alfred Latency Reporter (Go) #

wikitimings is a developer tool for tuning Alfred workflow responsiveness. It reads a WIKIEDIT_TIMING JSON-lines log produced by wikiedit and renders a self-contained HTML report with per-phase timing breakdowns.

wikitimings [-open] <timing.jsonl>

Build and Install #

TypeScript CLI #

Requires Bun v1.3+.

bun install          # install dependencies
bunx tsc --noEmit    # type-check
bun test             # run tests
bun run build.ts     # build ./wiki
bun run build.ts --install   # build and install to ~/wrks/archive/bins/darwin/arm64/wiki

Go Commands #

go build ./cmd/wikinew
go build ./cmd/wikiedit
go build ./cmd/transclude
go build ./cmd/edwikiwatch
go build ./cmd/wikitimings

Or build all at once:

go build ./...

Tests:

go test ./...

Configuration #

Go tools read a JSON config file (default ~/.wikinewrc, override with --config-file or $WIKITOOLS_CONFIG):

{
  "wikidir": "/path/to/wiki",
  "editor": "/usr/local/bin/editinacme"
}

Debug Tools #

internal/showmetadata.ts prints parsed metadata for one or more Markdown files. Run directly with bun:

bun run internal/showmetadata.ts [--resolved|--resolvedback --root=<wikiRoot>] <file.md> [...]
Mode Description
(none) Print raw YAML front matter, wiki links, regular links, attachment links, and body tags.
--resolved Resolve wiki links and pretty-print full metadata.
--resolvedback As above, and also display backlink extended attributes.

Dependencies #

# wiki links go to the editor (conceivably I didn't need a wiki port?)
type is text
data matches '\[\[([.a-zA-Z¡-￿0-9_\-/]+)\]\]'
data set $1
data set `wikilinks path $wikihome $wdir $data`
plumb to wiki
plumb start editinacme -nw  $data

Contribution #

I welcome:

  • human written patches
  • bug reports
  • feature requests but reserve the right to ignore them.

I would prefer to not get your vibe-coded patches -- I can just do the same thing from a bug report and know that the llm already has the whole project context and my guidance to it.