Validate, initialize, and preview declared-md profile files.
Three commands for the three declared-md standards: whoami.md, whois.md, and whatis.md.
npm install -g declared-mdOr use without installing:
npx declared-md <command>Create a new profile file in the current directory. The command asks for required fields interactively and writes the file.
npx declared-md init whoami
npx declared-md init whois
npx declared-md init whatisFor whoami, you can optionally prefill name, location, and links from a public GitHub profile.
Validate a file against its schema. Auto-detects the file in the current directory if no path is given.
npx declared-md validate
npx declared-md validate ./whoami.md
npx declared-md validate ./path/to/whois.mdExit codes:
0valid1invalid (schema errors)2CLI error (file not found, parse error, etc.)
Example output for an invalid file:
invalid whoami.md
x handle: must be 2-39 characters, lowercase letters, numbers, and hyphens only
x links.site: must be a valid HTTPS URL (must start with https://)
x status: must be one of: open-to-work, working, building, learning, unavailable
3 errors found.
Start a local HTTP server that renders a preview of the profile. Opens the browser automatically. Reloads when the file changes.
npx declared-md preview
npx declared-md preview ./whoami.mdThe preview runs on http://localhost:3939. Press ctrl+c to stop.
The file is validated before the preview starts. If it is invalid, errors are shown and the server does not start.
The full specification is at declared-md.github.io.
JSON Schemas are in the declared-md/spec repository under schemas/.
MIT