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

sfdc-generate-data-dictionary

v1.2.15

Published

Generate data dictionary from a Salesforce Org

Readme

version

Generate data dictionary from a Salesforce Org. This tool can also generate a file that can be imported in Lucidchart to define entities and relationships.

Getting Started

Works in Unix like system. Windows is not tested.

Installing

npm install -g sfdc-generate-data-dictionary

Screenshots

Usage

Command Line

$ sgd -h

  Usage: sgd [options]

  Generate data dictionary from a Salesforce Org

  Options:

    -u, --username [username]                             salesforce username
    -p, --password [password]                             salesforce password
    -l, --loginUrl [loginUrl]                             salesforce login URL [https://login.salesforce.com]
    -a, --apiVersion [apiVersion]                         salesforce API Version [48.0]
    -c, --allCustomObjects [allCustomObjects]             retrieve all custom objects [true]
    -lc, --lucidchart [lucidchart]                        generate ERD file for Lucidchart [true]
    -s, --sobjects [sobjects]                             sObjects to retrieve separated with commas
    -D, --debug [debug]                                   generate debug log file [false]
    -d, --deleteFolders [deleteFolders]                   delete/clean temp folders [true]
    -e, --excludeManagedPackage [excludeManagedPackage]   exclude managed packaged [true]
    -ht, --hideTechFields [hideTechFields]                hide tech fields [false]
    -tp, --techFieldPrefix [techFieldPrefix]              Tech field prefix ['TECH_']
    -o, --output [dir]                                    salesforce data dictionary directory path [.]

Example

$ sgd -u "[email protected]" -p "password" -l "https://test.salesforce.com" --sobjects "Account,Contact,Opportunity,Case" -c false

Module

  var sgd = require('sfdc-generate-data-dictionary');

  sgd({
      'username': '',
      'password': options.password,
      'loginUrl': options.loginUrl,
      'projectName': '',
      'allCustomObjects': true,
      'debug': false,
      'cleanFolders': true,
      'output':'.'
      }, console.log);

Debugging

Since 1.0.3, you can now run the tool in debug mode to generate a file that contains information about each step during the process. Information contained in the debug files will be enriched following your feedback to have the most accurate information for debugging.

Please paste the content of this file in your issues to help analysis.

Debug files location

For a local module:

CURRENT_DIR/node_modules/sfdc-generate-data-dictionary/files

Global module:

  • Mac: /usr/local/lib/node_modules/sfdc-generate-data-dictionary/files
  • Windows: %AppData%\npm\node_modules\sfdc-generate-data-dictionary\files

Built With

  • commander - The complete solution for node.js command-line interfaces, inspired by Ruby's commander.
  • bytes - Utility to parse a string bytes to bytes and vice-versa.
  • excel4node - Node module to allow for easy Excel file creation.
  • jsforce - Salesforce API Library for JavaScript applications (both on Node.js and web browser)

Versioning

SemVer is used for versioning.

Authors

License

This project is licensed under the MIT License - see the <LICENSE.md> file for details