Skip to content

tmd serve

Starts an HTTP server that provides a browser-based UI and REST API for your vault.

Terminal window
tmd serve
tmd serve -p 8080

Opens the web UI at http://localhost:3000 (default port). The interface mirrors the TUI’s three-panel layout: sidebar (type groups + object list), body (markdown content), and properties panel.

FlagShortDefaultDescription
--port-p3000Port to listen on
--host127.0.0.1Host to bind to (use 0.0.0.0 for all interfaces)
--vault.Path to vault directory (global flag)
  • Three-panel layout — sidebar, body, and properties panel
  • Object browsing — expand type groups, click to view objects
  • Property editing — double-click a property value to edit inline
  • Body editing — click “Edit” to switch to a markdown editor (⌘+Enter to save, Esc to cancel)
  • Object creation — press N or click ”+ New” in the sidebar
KeyAction
.Toggle focus mode (full-width body)
pToggle properties panel
nOpen create object dialog

The server exposes a REST API under /api/ for programmatic access.

MethodEndpointDescription
GET/api/typesList all types with metadata and object counts
GET/api/types/{name}Get type schema with property definitions
MethodEndpointDescription
GET/api/objectsList all objects (optionally filter with ?type=book)
GET/api/objects/{type}/{slug}Get single object with properties and body
PUT/api/objects/{type}/{slug}Update object body ({"body": "..."})
POST/api/objectsCreate object ({"type": "book", "name": "...", "template": "..."})
MethodEndpointDescription
GET/api/properties/{type}/{slug}Get display-ready properties for an object
PUT/api/properties/{type}/{slug}/{key}Update a single property ({"value": "..."})
MethodEndpointDescription
GET/api/templates/{type}List available templates for a type

For frontend development with hot reload:

Terminal window
# Terminal 1: Go server
tmd serve
# Terminal 2: Vite dev server (proxies /api to localhost:3000)
cd web/frontend && npm run dev

The Vite dev server runs at http://localhost:5173 with hot module replacement. API requests are automatically proxied to the Go server.