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-settings-viewer

v1.0.6

Published

A CLI tool to parse and view Salesforce settings XML files in a user-friendly HTML format.

Readme

sf-settings-viewer

A Node.js CLI tool to retrieve Salesforce Settings metadata (like Security.settings) and render it as a beautiful, dark-themed HTML UI, with options to export the data as JSON or CSV. Also supports custom package.xml files for retrieving any Salesforce metadata.

This tool is especially useful for admins, architects, and developers who want a readable, auditable view of org-level settings that are otherwise buried in XML.


Screenshots

Security Settings

SF-Security

All Settings

SF-Settings


✨ Features

  • 🔐 Retrieves Salesforce Settings metadata (e.g., Security)
  • 📦 Automatically generates a package.xml or use your own
  • 🎯 NEW: Support for custom package.xml files to retrieve any metadata type
  • ⚙️ Uses Salesforce CLI (sf) under the hood
  • 📊 Export settings to JSON or CSV
  • 🚀 Opens the generated UI automatically in your browser

📦 Installation

npm install -g sf-settings-viewer

🧰 Prerequisites

Make sure you have:

  • Node.js 18+
  • Salesforce CLI (sf) installed
  • Authenticated Salesforce org (sf auth web login)

🚀 Usage

Get Security Settings

sf-settings-viewer \
  -o myOrgAlias \
  -i Security \
  -d ./mywork

Get All Settings

sf-settings-viewer \
  -o myOrgAlias \
  -i '*' \
  -d ./mywork

Use Custom Package.xml (NEW)

sf-settings-viewer \
  -o myOrgAlias \
  -p /path/to/package.xml \
  -d ./mywork

This allows you to retrieve any metadata type defined in your custom package.xml file (not just Settings). Perfect for:

  • Retrieving multiple metadata types at once
  • Custom retrieval workflows
  • Integration with existing package.xml files

Options

| Option | Description | Required | | ---------------------- | ----------------------------------- | -------- | | -o, --org <username> | Salesforce org username or alias | Yes | | -i, --item <name> | Settings name (e.g., Security or *) | Either -i or -p | | -p, --package <file> | Path to custom package.xml file | Either -i or -p | | -d, --dir <dir> | Working directory | Yes | | -a, --artifact <name>| Artifact name (default: Settings) | No |

✅ The -d option is required and defines where the Salesforce project and metadata will be generated.

⚠️ You must specify either -i (item) or -p (package), but not both.


🔄 What the CLI Does (Step-by-Step)

When using -i (Settings mode)

  1. Creates a Salesforce project
   sf project generate --name <dir>
  1. Generates package.xml
   <types>
     <members>Security</members>
     <name>Settings</name>
   </types>
  1. Retrieves metadata
   sf project retrieve start -x package.xml -o <org> -w 10
  1. Reads the settings file
   force-app/main/default/settings/Security.settings-meta.xml
  1. Parses XML and generates UI

    • Dark theme (Tailwind CSS)
    • Collapsible sections
    • Searchable keys & values
  2. Outputs

    • settings.html
    • settings.json
    • settings.csv
  3. Automatically opens the UI in your browser

When using -p (Custom package mode)

  1. Creates a Salesforce project (if needed)
  2. Copies your custom package.xml to the project directory
  3. Retrieves metadata based on your package.xml
  4. Saves package.xml to output/package.xml
  5. Reports success and shows where metadata was retrieved

🖥️ UI Preview

The generated UI includes:

  • 📁 Grouped sections (Password Policies, Session Settings, SSO, etc.)
  • 🔍 Easy readability for audits
  • 📤 Buttons to export as CSV or JSON

📁 Output Structure

Settings Mode (-i)

mywork/
├── force-app/
│   └── main/default/settings/
│       └── Security.settings-meta.xml
├── output/
│   ├── security-settings.html
│   ├── security-settings.json
│   ├── security-settings.csv
│   └── package.xml

Custom Package Mode (-p)

mywork/
├── force-app/
│   └── main/default/
│       ├── classes/
│       ├── triggers/
│       └── ... (whatever your package.xml retrieves)
├── output/
│   └── package.xml

💡 Example Use Cases

Audit Security Settings

sf-settings-viewer -o production -i Security -d ./audit-2024

Retrieve Multiple Metadata Types

Create a package.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>*</members>
    <name>ApexClass</name>
  </types>
  <types>
    <members>*</members>
    <name>ApexTrigger</name>
  </types>
  <version>65.0</version>
</Package>

Then run:

sf-settings-viewer -o myOrg -p ./package.xml -d ./retrieve-all

Compare Settings Across Orgs

# Retrieve from prod
sf-settings-viewer -o production -i Security -d ./prod-settings

# Retrieve from sandbox
sf-settings-viewer -o sandbox -i Security -d ./sandbox-settings

# Compare the JSON files
diff ./prod-settings/output/settings.json ./sandbox-settings/output/settings.json

🔮 Future Enhancements

  • Diff between two orgs
  • Support all Settings types
  • CI-friendly export mode
  • Interactive UI for editing and deploying settings

📜 License

MIT © Mohan Chinnappan