npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@project-blue-book/sfdx-metadata-dump

v1.0.1

Published

Concatenate Salesforce metadata source into a single markdown file using sf CLI syntax.

Readme

sfdx-metadata-dump

Concatenate Salesforce metadata source into a single Markdown file. Accepts the same Type:Member syntax that sf project retrieve start -m and sf project deploy start -m accept, including globs and bare type names. The output is ideal for feeding metadata into LLMs, code reviews, and documentation.

Install

npm install -g @project-blue-book/sfdx-metadata-dump

Prerequisites

  • Node.js >= 18
  • The Salesforce CLI v2 (@salesforce/cli) installed and on $PATH
  • Run from inside an SFDX project (a directory with sfdx-project.json)

The tool does not require an authenticated org. It only reads local source.

Quickstart

# A single CustomObject and a single LWC
sfdx-metadata-dump CustomObject:Opportunity LightningComponentBundle:myComponent

# Glob (always quote globs so the shell doesn't expand them)
sfdx-metadata-dump "ApexClass:Account*"

# Every permission set in the project
sfdx-metadata-dump PermissionSet

# Preview what would be included
sfdx-metadata-dump --dry-run "ApexClass:My*"

Options

| Flag | Default | Description | |---|---|---| | -o, --output <path> | docs/METADATA_DUMP.md | Output file path. | | -m, --metadata <args> | | Repeatable alternative to positional args. | | --include-meta-xml / --no-include-meta-xml | on | Include *-meta.xml sidecars. | | --binary-mode <mode> | placeholder | placeholder, skip, or base64. | | --max-file-size <bytes> | 1048576 | Files larger than this are treated as binary. | | --dry-run | off | Print the file list, don't write output. | | --quiet | off | Suppress progress on stderr. | | --debug | off | Print stack traces on unexpected errors. | | -h, --help | | Print usage. |

Output

A single Markdown file. Each file gets a header (its project-relative path) and its contents in a fenced code block with a language hint. Binary files get a placeholder section noting their size. See docs/sfdx_metadata_dump_spec.md for the full output structure.

Troubleshooting

  • "sf: command not found": install the Salesforce CLI globally with npm install -g @salesforce/cli.
  • "Not inside an SFDX project": cd into a directory that contains sfdx-project.json.
  • A glob matched nothing: shells expand * before the tool sees it. Quote the argument: sfdx-metadata-dump "ApexClass:My*".
  • Component resolved to zero files: the metadata may exist only in your org. Run sf project retrieve start -m <Type:Member> first to pull it.

Contributing

git clone <repo>
npm install
npm test

License

MIT