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

dangling-fields

v1.0.1

Published

A CLI tool to identify and report dangling field permissions in Salesforce profiles and permission sets

Readme

🔍 Dangling Fields Finder

License: MIT

A powerful CLI tool to identify and report dangling field permissions in Salesforce profiles and permission sets. Quickly find dangling field references that don't exist in your local project or Salesforce org.

✨ Features

  • 🔎 Comprehensive Scanning - Analyzes profiles and permission sets for dangling field permissions
  • 🌐 Org Validation - Checks both local metadata and live Salesforce org
  • 📊 Beautiful Reports - Generates interactive HTML reports with DataTables
  • 📥 CSV Export - Export findings to CSV for further analysis
  • 🎯 Selective Scanning - Process specific files or entire directories
  • Rate Limiting - Configurable pause between API calls to respect org limits
  • 🎨 Dark Theme UI - Modern, eye-friendly interface

Screenshot

demo1

📦 Installation

Global Installation (Recommended)

npm install -g dangling-fields

Usge

npx  dangling-fields --help

🚀 Usage

Basic Usage

Scan Specific Files

dangling-fields -o [email protected] -f "Admin.profile,CustomPermSet.permissionset" -s /path/to/sfdx/project  

Adjust API Rate Limiting

dangling-fields -o [email protected]  -f "Admin.profile,CustomPermSet.permissionset" -s /path/to/sfdx/project -p 2000

🛠️ Command Line Options

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --sfdxProjectFolder | -s | Path to SFDX project folder | Current directory | | --orgUsername | -o | Salesforce org username (required) | - | | --what | -w | What to check | fieldPermissions | | --pause | -p | Pause duration (ms) after each file | 1000 | | --files | -f | Comma-separated list of files to check | All files |

📋 Prerequisites

  • Node.js 14.x or higher
  • Salesforce CLI (sf command) installed and authenticated
  • A Salesforce DX project with metadata in standard format

🔧 How It Works

  1. Connects to Org - Uses Salesforce CLI to authenticate and retrieve org information
  2. Scans Metadata - Reads profile and permission set XML files from your project
  3. Validates Fields - Checks each field permission against:
    • Local field metadata files
    • Live Salesforce org field definitions
  4. Generates Report - Creates an interactive HTML report with all findings
  5. Exports Data - Allows CSV export for further analysis

📊 Report Features

The generated HTML report includes:

  • Searchable Table - Quickly find specific objects or fields
  • 🔢 Pagination - Navigate large datasets easily
  • 📈 Sortable Columns - Sort by any column
  • 📥 CSV Export - Download findings for spreadsheet analysis
  • 🎨 Visual Indicators - Clear checkmarks (✅) and crosses (❌)
  • 📱 Responsive Design - Works on all screen sizes

🎯 Use Cases

1. Metadata Cleanup

Identify and remove field permissions for deleted or non-existent fields before deployment.

2. Deployment Validation

Verify profiles before deploying to production to avoid deployment errors.

dangling-fields -s ./deploymentPackage -o [email protected]

3. Audit Specific Profiles

Check only specific profiles or permission sets.

dangling-fields -o [email protected] -f "Admin.profile,SalesUser.profile"

4. Continuous Integration

Integrate into your CI/CD pipeline to catch issues early.

npx dangling-fields -o $SF_USERNAME

📝 Example Output

Console Output

🔍 Initializing...
Connected to org: [email protected]

🔧 Processing all files...

➡️ Processing: Admin.profile-meta.xml
   🔍 Account.CustomField__c not found locally, checking org [email protected]...
   ❌ Missing: Account.CustomField__c
   ✅ Found in org: Contact.Email

Continue? (y/n): y

✅ Completed scan. Found 3 missing fields.
HTML report generated at: /path/to/missing_fields_report.html

HTML Report Preview

The report displays a table with:

  • Source file name
  • Object name
  • Field name (highlighted in red for missing fields)
  • Local existence status (✅ or ❌)
  • Org existence status (✅ or ❌)

📄 License

This project is licensed under the MIT License (c) Mohan Chinnappan