Search and read MDN locally in the terminal.
You can download a precompiled binary from the releases page, rename the file to
mdn and place it in a location in your
Download and index the MDN data files:
Then, you can query MDN by running the
mdn command, e.g. to search for "html":
Search terms can be separated by spaces:
mdn css grid layout
You'll need to use quotation marks around terms containing special characters:
mdn '<br />' tag
To get raw markdown output instead of pretty rendered markdown, use the
mdn --raw-output html
Install Go 1.19 or later.
Install the Go dependencies:
go get .
Build the binary:
go build -o build/mdn
Install pre-commit, then enable the pre-commit hooks in the repo: