Knowledge Management
Personal board, calendar, sessions, and local agent chat — inside VS Code.
Install: Extensions → Search "Knowledge Management" (publisher zhirafovod) or:
code --install-extension zhirafovod.km-vscode
Then Command Palette → Knowledge Management: Open.
The extension bundles a local daemon. Your data stays in git-backed folders on this machine (~/docs/planning, ~/docs, ~/.sessions by default if you set the settings below). Status → Sync pulls those repos; it never pushes, and it never syncs ~/fleet.
First launch on another Mac
- Clone stores (skip if they already exist):
git clone git@github.com:zhirafovod/docs.git ~/docs
git clone git@github.com:zhirafovod/sessions.git ~/.sessions
- Settings (
settings.json):
{
"km.storeRoot": "/Users/<you>/docs/planning",
"km.kbRoot": "/Users/<you>/docs",
"km.sessionsRoot": "/Users/<you>/.sessions"
}
- Knowledge Management: Open. Status → Sync now.
Requires Node 22+ on PATH (the bundled daemon is Node). If nothing is configured, Open starts a demo store.
Open with Demo Data always boots an ephemeral demo daemon (does not touch your stores).
Commands
| Command |
Palette |
Behavior |
km.open |
Knowledge Management: Open |
Probe http://127.0.0.1:4700/api/health. If down, spawn the bundled daemon with km.daemonArgs or the three roots (or --demo if unset), then open the panel. |
km.openDemo |
Knowledge Management: Open with Demo Data |
Fresh --demo daemon on an ephemeral port. |
Settings
km.storeRoot — planning store; empty → --demo for km.open
km.sessionsRoot — --sessions-root when store root is set
km.kbRoot — --kb-root when store root is set
km.daemonArgs — full daemon argv for km.open (overrides the three roots). Same as KM_DAEMON_ARGS in the desktop app.
km.preferLiveUi — default true. If the live app is already running (:4700 + UI :4173), the panel loads that UI so it matches localhost instead of the vsix snapshot. Off, or no runner: bundled UI.
If port 4700 is already the live KM instance, Open reuses it.
Standalone .app (no VS Code): see desktop INSTALL.
Thin VS Code shell: it does not reimplement the UI. It ensures the daemon is running and opens a webview. window.__KM_DAEMON__ is injected so WsBridge talks to that daemon.
An installed VSIX is self-contained: media/ui + media/daemon/cli.cjs. F5 in this repo falls back to monorepo-relative paths.
Dev loop
From the monorepo root:
npx tsc -b packages/daemon
npm run build -w @unpolarize/ui
npm run build -w km-vscode
Open this folder (packages/shells/vscode) in VS Code and press F5 (Extension Development Host). In the new window, run Knowledge Management: Open with Demo Data.
If the monorepo is the workspace, launch with:
--extensionDevelopmentPath=${workspaceFolder}/packages/shells/vscode
Package
npm run package -w km-vscode
code --install-extension packages/shells/vscode/km-vscode.vsix
km-vscode.vsix is gitignored. The package script rebuilds, then vsce package --no-dependencies.
Closing the extension host kills any daemon this extension spawned.