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

sf-datadictionary

v1.0.1

Published

Salesforce Org Data Dictionary Generator — Node.js CLI with Web UI

Downloads

167

Readme

⚡ SF Data Dictionary

A Node.js CLI that generates a fully interactive Salesforce Org Data Dictionary — fetching all object and field metadata from your org and serving it as a polished, searchable web UI with multiple themes.


How it works

sf mohanc md describeGlobal  →  ObjectList.txt
sf mohanc md describe        →  org-md.csv
                             →  local HTTP server  →  browser
                             →  org-md.db  (optional, with -s)
  1. Calls sf mohanc md describeGlobal to enumerate all SObjects in your org
  2. Calls sf mohanc md describe to pull full field metadata for every object
  3. Cleans the CSV (strips repeated header rows emitted per-object by the plugin)
  4. Serves the result as a live web UI
  5. Optionally exports everything to a SQLite database with -s

Screnshots

Web View

Web View-2

Prerequisites

| Requirement | Notes | |---|---| | Node.js ≥ 18 | Uses native ESM ("type": "module") | | Salesforce CLI (sf) | npm install -g @salesforce/cli | | mohanc plugin | sf plugins install sfdx-mohanc-plugins | | sqlite-explorer cli |npm install -g sqlite-explorer-cli|

Installation

npm install -g sf-datadictionary

Usage

sf-data-dict [username] [options]

If username is omitted, you'll be prompted to enter it.

Options

| Flag | Default | Description | |---|---|---| | [username] | (prompted) | Salesforce username or org alias | | -s, --sqlite | off | Export org-md.csv to org-md.db (SQLite) | | -t, --theme <n> | dark | UI theme — see Themes below | | -p, --port <number> | 3000 | Port for the local web server | | --no-open | — | Skip auto-opening the browser | | -V, --version | — | Print version | | -h, --help | — | Show help |


Examples

# Pass username directly
sf-data-dict my-sandbox-alias

# Export to SQLite as well
sf-data-dict [email protected] --sqlite

# Ocean theme on a different port
sf-data-dict my-alias --theme ocean --port 4444

# Retro amber terminal aesthetic + SQLite
sf-data-dict my-alias -t retro -s

# Don't auto-open browser (e.g. in CI or a remote shell)
sf-data-dict my-alias --no-open

Web UI Features

The UI is a single self-contained HTML page served by a lightweight Node HTTP server. All data is embedded directly — no backend calls after the initial page load.

Table

  • All columns from the CSV are rendered automatically — the table is fully dynamic and adapts to whatever fields sf mohanc md describe emits
  • Columns are sortable (click any header to sort ascending/descending)
  • Smart per-column rendering: colour-coded type badges, reference tags, boolean colouring, picklist value truncation with hover tooltip, right-aligned numeric lengths

Filtering

  • Full-text search across all columns simultaneously
  • Dropdown filter by SObject name
  • Dropdown filter by field type (string, reference, picklist, etc.)
  • Dropdown filter by nillable (true / false)
  • Live row and object counts update as you filter

Object Sidebar

  • Scrollable list of every SObject in the dictionary
  • Click any object to jump directly to it and filter the table
  • Active state highlights the selected object
  • "All Objects" resets to the full view

Object Separator Rows

  • When viewing all objects, a divider row appears between each SObject group showing the object name and field count (e.g. ◆ Account 62 fields)

Themes

  • 5 built-in themes, switchable live in the browser via the top-right buttons
  • Each theme has its own font pairing, colour palette, and accent colour

Themes

| Theme | Aesthetic | Fonts | |---|---|---| | dark | Deep purple / violet | JetBrains Mono + Space Grotesk | | light | Clean white / blue | DM Mono + Syne | | retro | Amber terminal on black | Courier New + Special Elite | | ocean | Deep sea blues / cyan | Fira Code + Exo 2 | | midnight | Near-black / emerald | IBM Plex Mono + Plus Jakarta Sans |

Theme can also be switched in the browser without restarting the server — the selection is passed as a ?theme= query parameter and the page reloads.


SQLite Export (-s)

When --sqlite is passed, org-md.csv is also written to org-md.db in the current directory.

What it does:

  • Reads the CSV and strips all repeated header rows (the sf mohanc md describe plugin re-emits the header at the start of each SObject block)
  • Creates a single table org_metadata with one TEXT column per CSV column
  • Inserts all data rows in a single transaction

Querying the database afterwards:

# Open with the sqlite-explorer
sqlite-explorer" org-md.db

# Example queries
SELECT DISTINCT sobjectName FROM org_metadata ORDER BY sobjectName;
SELECT name, label, type, length FROM org_metadata WHERE sobjectName = 'Account';
SELECT * FROM org_metadata WHERE type = 'reference';
SELECT * FROM org_metadata WHERE nillable = 'FALSE' AND type != 'id';

Output files:

Output files: All files are written to a dedicated temp folder — never your current working directory: {os.tmpdir()}/sf-datadictionary-{username}/ ├── ObjectList.txt # Raw list of all SObject API names ├── org-md.csv # Full field metadata CSV └── org-md.db # SQLite database (only with -s)


Troubleshooting

sf: command not found Install the Salesforce CLI: npm install -g @salesforce/cli

sf mohanc commands not found Install the plugin: sf plugins install sfdx-mohanc-plugins

Org authentication error Make sure you're authenticated: sf org login web -a my-alias

Port already in use Use a different port: sf-data-dict my-alias --port 3001