Command Line Interface
The MDNMan CLI allows developers to quickly access and explore the MDN Web Docs reference library directly from the command line. This tool is ideal for looking up JavaScript, HTML, and CSS documentation without leaving your terminal.
js
, html
, css
Section titled “js, html, css”Description
Section titled “Description”These commands search the MDN reference documentation for JavaScript (js
), HTML (html
), or CSS (css
) topics, respectively. Each command accepts the same set of options and returns relevant documentation entries based on the search query provided.
Options
Section titled “Options”Option Name | Alias | Default Value | Description |
---|---|---|---|
--output | -o | stdout | Specifies the format in which to return the MDN documentation. Supported formats include stdout , file , and vim . |
--section | -s | none | Limits the result to a specific section of the documentation (e.g., syntax , examples , specifications ). |
--path | -p | ./ref.md | Writes the output to the specified file path instead of displaying it in the terminal. Useful for saving documentation locally. |
--help | -h | none | Displays help information and usage details for the selected command. |
Example Usage
Section titled “Example Usage”mdnman js foreachmdnman html div --output file --path my/custom/pathmdnman css font-family --output vim --section syntax
interactive
Section titled “interactive”Launches an interactive mode that lets you search and browse the MDN reference library through a guided, prompt-based interface.
Options
Section titled “Options”Option Name | Alias | Default Value | Description |
---|---|---|---|
--output | -o | stdout | Specifies the format in which to return the MDN documentation. Supported formats include pager , stdout , file , and vim. |
--path | -p | ./ref.md | Writes the output to the specified file path instead of displaying it in the terminal. Useful for saving documentation locally. |
--help | -h | none | Displays help information and usage details for the selected command. |
Example Usage
Section titled “Example Usage”mdnman interactive --output file --path my/custom/path