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-user-inactivator

v1.0.2

Published

Salesforce User Inactivation Tool with Web UI

Downloads

255

Readme

Salesforce User Inactivation Tool

A powerful Node.js CLI tool with a beautiful dark-themed web UI for managing user inactivation across multiple Salesforce orgs.

Features

  • 🎨 Modern Dark UI - Beautiful Tailwind CSS interface with dark theme
  • 📊 Three-Panel Layout - Users, Orgs, and Status panels with resizable splitters
  • 🔍 User Search - Quick search functionality for filtering users
  • Selective Inactivation - Choose specific user/org combinations
  • 📈 Real-time Status - Live updates and detailed reports
  • 🚀 SF CLI Integration - Uses official Salesforce CLI for operations

Screenshots

User-inactivate

Prerequisites

  • Node.js (v16 or higher)
  • Salesforce CLI (sf) installed and configured
  • Authenticated Salesforce orgs

Installation

npm install -g sf-user-inactivator

Usage

Prepare Your CSV File

Create a CSV file with user emails. The tool accepts various column names:

email
[email protected]
[email protected]

Or:

Email,Name
[email protected],John Doe
[email protected],Jane Smith

Run the Tool


sf-user-inactive -o [email protected] [email protected] -u users.csv

# With custom port
sf-user-inactive -o [email protected] -u users.csv -p 8080

Command Options

  • -o, --orgs <usernames...> - Salesforce org usernames (space-separated, required)
  • -u, --users <file> - Path to CSV file with user emails (required)
  • -p, --port <number> - Port for web UI (default: 3000)

How to Use the Web UI

  1. Select a User - Click on a user email in the left panel
  2. Choose Orgs - Check the boxes for orgs where you want to inactivate the user
  3. Review Selections - The button shows total selections count
  4. Inactivate - Click "Inactivate Selected" and confirm
  5. View Report - Check the right panel for detailed results

UI Features

  • Resizable Panels - Drag the vertical splitters to adjust panel widths
  • User Search - Type in the search box to filter users
  • Status Indicators - Color-coded success/error/skipped status
  • Detailed Reports - See exactly what happened with each operation

How It Works

  1. The tool queries each org for the specified user using SOQL
  2. If the user exists and is active, it updates the IsActive field to false
  3. Results are displayed with success/error/skipped status
  4. Users already inactive or not found are skipped

Example Workflow

# 1. Create users CSV
echo "email\[email protected]\[email protected]" > users.csv

# 2. Run the tool
sf-inactive -o [email protected] [email protected] -u users.csv

# 3. Browser opens automatically at http://localhost:3000
# 4. Use the UI to manage inactivations

Report Format

The status panel shows:

  • Summary: Count of successful, failed, and skipped operations
  • Detailed Report: Each operation with:
    • User email
    • Target org
    • Status (success/error/skipped)
    • Detailed message

Error Handling

The tool handles:

  • Users not found in orgs
  • Users already inactive
  • Network/connection errors
  • Invalid org credentials
  • CSV parsing errors

Tips

  • Authenticate all orgs before running: sf org login web
  • Use org aliases for easier management: sf alias set [email protected]
  • Test with a small CSV first to verify connectivity
  • Keep the browser window open while operations are running

Security Notes

  • The tool only inactivates users, never deletes them
  • Requires proper Salesforce CLI authentication
  • All operations use official SF CLI commands
  • Web UI is local-only (localhost)

Troubleshooting

"User not found or already inactive"

  • The user doesn't exist in that org, or is already inactive

"Command failed"

  • Check SF CLI is installed: sf --version
  • Verify org authentication: sf org list

CSV not loading

  • Ensure CSV has proper headers (email/Email/EMAIL)
  • Check file path is correct

License

  • MIT (c) Mohan Chinnappan