Registry / devops / mdsf-cli

mdsf-cli

JSON →
library0.12.1jsnpmunverified

Format and lint markdown code snippets using your favorite tools. Version 0.12.1, published on npm and as a Rust crate. Offers a CLI that automates running external tools (like prettier, eslint, rustfmt, black, etc.) on code blocks within markdown files. Features caching, configuration via TOML, language aliases, and custom commands. Differentiates from similar tools by supporting both formatting and verification, wide language support, and packaging as both npm and Rust binary.

npm install mdsf-cli
INSTALL
IMPORT
SIG · MDSF-CLI
M
mdsf-cli
devopsjavascriptv0.12.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mdsf
npx mdsf-cli format .
npm install mdsf (instead of mdsf-cli)
The npm package is named mdsf-cli, not mdsf. Use npx for one-off runs.
default
const mdsf = require('mdsf-cli');
CommonJS require works for Node.js scripts. Not intended for programmatic use, prefer CLI.
typescript types
No types exported
Package is CLI-only; no TypeScript types are provided.

Install the mdsf CLI globally via npm and format markdown code snippets in files.

# Install globally npm install -g mdsf-cli # Format all markdown files in current directory mdsf format . # Verify formatting without changes (exit code indicates issues) mdsf verify . # Initialize configuration mdsf init # Format specific file mdsf format README.md # Use with npx (no install) npx mdsf-cli format README.md
Debug
Known issues
gotchaPackage name on npm is mdsf-cli, not mdsf. Installing `npm install mdsf` will install a different unrelated package.
fix
Use `npm install -g mdsf-cli`.
affects: >=0.0.0
deprecatedThe npm package is a wrapper around the Rust binary; if you prefer direct install, use cargo or download binary from releases.
fix
For better performance, install via `cargo install mdsf` or download from GitHub releases.
affects: >=0.12.0
gotchamdsf requires external tools (like prettier, rustfmt) to be installed separately; it does not bundle them.
fix
Ensure required formatters/linters are available in PATH.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mdsf'
Installed package named mdsf instead of mdsf-cli.
fix
Run `npm install -g mdsf-cli`.
bash: mdsf: command not found
Global npm installation not in PATH or not installed correctly.
fix
Ensure npm global bin directory is in PATH, or use npx: `npx mdsf-cli format .`
error: no tool found for language 'python'
Required formatter not installed for that language (e.g., black for Python).
fix
Install appropriate tool (e.g., `pip install black`) and ensure it is in PATH.
Upgrade
Version history
0.12.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mdsf-cli — npm install mdsf-cli · libregistry