Socket
Book a DemoInstallSign in
Socket

mdnman

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdnman

Command line interface for the MDN Web Docs

2.1.1
latest
npmnpm
Version published
Weekly downloads
13
-91.33%
Maintainers
1
Weekly downloads
 
Created
Source

MDNMan

JavaScript reference CLI made possible by MDN Web Docs.

The goal of MDN Man is to create an easy way for the MDN Web Docs to be displayed in other formats such as the command line and Discord/Slack bots. The repository features a build in command line interface as well as a number of functions that can be used to query, parse and display content from the MDN Web Docs.

Documentation

View the official documentation at thenlie.github.io/mdnman/

Installation

When using mdnman within a JavaScript or TypeScript project, install locally via NPM.

npm install mdnman

If you would like access to the CLI at all times in your terminal, install globally via NPM.

npm install --global mdnman

Usage

Command Line Interface

At it's core, mdnman is a command line interface for the MDN Web Docs. It is intended to be a quick, non-network dependent resource for web developers.

Commands

CommandArgumentsDescription
interactivequery (string)Query MDN docs via prompts
jsquery (string)Query MDN JavaScript reference
htmlquery (string)Query MDN HTML reference
cssquery (string)Query MDN CSS reference
glossaryquery (string)Query MDN Glossary
helpcommand (string)Get help for a specific command

Options

OptionFlagDescriptionDefaultValues
Help-h, --helpGet help for a given commandN/AAny command
Output-o, --outputSpecify where the output of the command should gostdoutstdout, vim, pager, file
Section-s, --sectionSpecify a single section of the document to returnnoneAny section heading

Examples

mdnman --help
mdnman js map
mdnman js --output vim --section parameters splice

Node Package Manager

You can also install mdnman through npm to utilize it in your own project. The mdnman package comes with built in TypeScript support and exposes all utility methods built in to the CLI.

Quick Start

import { getMDNDoc, printDoc } from "mdnman";

const doc = await getMDNDoc('javascript', 'map')
if (doc) {
    printDoc(completeParse(doc));
}

Credits

This project would not be possible without the incredible work done by the Mozilla Team on the MDN Web Docs.

github-profile

Questions?

If you have any questions about the project you can reach out to me via email or GitHub with the information below.

Email: leithen113@gmail.com GitHub: Thenlie

FAQs

Package last updated on 24 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.