Context: Self-hosted server vault. Notes embed assets as ![[assets/image.png]]. The server already exposes GET /api/assets/raw?path=... (the web and desktop clients use it internally to render images — apps/web/src/bridge/http-bridge.ts, apps/desktop/src/main/remote/server-client.ts), but as a user I have no way to actually download an asset out of the vault.
What's missing today:
- Web app UI — no download button in the Assets view, no "save image as…" on images embedded in a note.
- Desktop app UI — same, including when connected to a remote/self-hosted vault.
- zn CLI — no
zn asset list/get/put commands.
- MCP server — no asset tools, so agents/scripts have to hand-roll raw
curl calls against /api/assets/raw to pull embedded images.
Related papercut: unknown paths outside /api/* return the SPA's index.html with HTTP 200 (e.g. /files/assets/image.png, /assets/image.png). Naive download attempts therefore "succeed" but yield an HTML file. A 404 for non-API asset-ish paths (or at least correct content-type handling) would prevent silent failures.
Requested surfaces:
- Web UI: download action in Assets view + context menu on embedded images
- Desktop UI: same, for local and remote vaults
- CLI:
zn asset list / zn asset get <path> / (optionally zn asset put)
- MCP:
list_assets / get_asset tools mirroring the HTTP API
Keyboard-first note: the download actions should be reachable without a mouse (e.g. a key on the Assets view rows / command-palette entry), in line with the project's keyboard-first principle.
Context: Self-hosted server vault. Notes embed assets as
![[assets/image.png]]. The server already exposesGET /api/assets/raw?path=...(the web and desktop clients use it internally to render images —apps/web/src/bridge/http-bridge.ts,apps/desktop/src/main/remote/server-client.ts), but as a user I have no way to actually download an asset out of the vault.What's missing today:
zn asset list/get/putcommands.curlcalls against/api/assets/rawto pull embedded images.Related papercut: unknown paths outside
/api/*return the SPA'sindex.htmlwith HTTP 200 (e.g./files/assets/image.png,/assets/image.png). Naive download attempts therefore "succeed" but yield an HTML file. A 404 for non-API asset-ish paths (or at least correct content-type handling) would prevent silent failures.Requested surfaces:
zn asset list/zn asset get <path>/ (optionallyzn asset put)list_assets/get_assettools mirroring the HTTP APIKeyboard-first note: the download actions should be reachable without a mouse (e.g. a key on the Assets view rows / command-palette entry), in line with the project's keyboard-first principle.