Skip to main content

Synopsis

dms web [--port PORT] [--dir DIRECTORY] [--no-open]

Description

dms web starts a lightweight HTTP server (Python’s built-in http.server) and opens the DMS Vault in your default browser. The Vault is a single-page web application that provides a graphical alternative to the terminal wizard for users who prefer a form-based interface. DMS Vault features:

Form-based record creation

Dropdown menus for type, role, and access level are populated directly from the DMS schema. All required fields are clearly marked.

Live validation

Each record is validated against the schema as you fill in the form. Errors and warnings appear inline before you save.

JSON and JSON-LD copy

Copy the raw DMS JSON or a full JSON-LD representation to the clipboard with one click.

Record browser

Browse all records saved in the records directory without leaving the browser.
The server runs entirely locally at http://127.0.0.1. No data is sent to any external service. Press Ctrl+C in the terminal to stop the server.

Options

--port
integer
default:"8080"
Port for the local HTTP server. Change this if port 8080 is already in use.
--dir
path
default:"records"
Directory where saved records are written. The directory is created automatically if it does not exist.
--no-open
boolean
default:"false"
Suppress automatic browser launch. The server still starts; navigate to the URL printed in the terminal manually.

API endpoints

The server exposes a small JSON API used by the Vault frontend:
MethodPathDescription
GET/Serves the Vault HTML page.
GET/api/schemaReturns schema metadata (types, roles, access levels, required fields).
GET/api/recordsLists all saved records from the records directory.
GET/api/new-idGenerates a new UUID v4.
POST/api/validateValidates a record object and returns errors and warnings.
POST/api/saveValidates and saves a record as TYPE_XXXXXXXX.json in the records directory.
POST/api/export-jsonldConverts a record object to JSON-LD and returns the result.

Examples

dms web

Notes

The server binds to 127.0.0.1 only. It is not accessible from other machines on your network by design.
Use --no-open when running dms web inside a Docker container or a remote SSH session where a browser cannot be launched automatically.
The /api/save endpoint only writes records that pass schema validation. Submitting an invalid record returns HTTP 400 with a list of errors — it will not be saved to disk.