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

ssdx-cli

v1.8.0

Published

A template for creating npm packages using TypeScript and VSCode

Readme

SSDX CLI

SSDX CLI is a helper tool designed to streamline the process of working with Salesforce DX (SFDX). It provides commands to quickly create and manage scratch orgs, assign resources, and authenticate orgs, making it easier to develop and deploy Salesforce applications.

Features

  • Scratch Org Management: Quickly create and configure scratch orgs.
  • Resource Assignment: Assign Apex, JavaScript, permission sets, licenses, and metadata to orgs.
  • Org Authentication: Authenticate Salesforce orgs for development and deployment.

Installation

To install SSDX CLI, ensure you have Node.js (>=20) and install ssdx-cli from npm:

npm install ssdx-cli --global

Or locally:

npm install ssdx-cli --save-dev

Commands

auth

Authenticate a Salesforce org:

ssdx auth --env-name production

Options:

  • -n, --env-name <string>: The local name of the scratch org.

create

Create and configure a new scratch org:

ssdx create -n my_feature

Options:

  • -n, --scratch-org-name <string>: The alias to give the scratch org.
  • -d, --duration-days <number>: The number of days to keep the scratch org (default: 5).
  • -c, --config-file <string>: The scratch org config file (default: as defined in ssdx-config.json).
  • -v, --target-dev-hub <string>: The alias or username of the dev hub org.
  • --skip-dependencies: Skip dependency installation.
  • --skip-deployment: Skip the deployment step.
  • --ci: Disable fancy output for CI environments.
  • --disable-notifications: Disable OS notifications (useful for CI environments)

resource

Assign resources to a Salesforce org based on the configuration in ssdx-config.json.

ssdx resource [options]

Options:

  • -o, --target-org <string>: The org to run the scripts on.
  • --pre-dependencies: Run "pre_dependencies" resources.
  • --pre-deploy: Run "pre_deploy" resources.
  • --post-deploy: Run "post_deploy" resources.
  • --post-install: Run "post_install" resources.
  • --show-output: Show output of resource assignments.
  • -l, --test-level <string>: Specify the test level for metadata operations (default: NoTestRun).
  • --ci: Disable fancy output for CI environments.
  • --disable-notifications: Disable OS notifications (useful for CI environments)

Configuration

The CLI uses a configuration file named ssdx-config.json at root level, to define resource assignments and other settings.

{
  // optional
  "default_config": "config/project-scratch-def.json",

  // runs before installing dependencies
  "pre_dependencies": [],

  // runs before metadata push
  "pre_deploy": [
    {
      "type": "permissionSetLicense",
      "value": "EmbeddedServiceMessagingUserPsl",
      "continue_on_error": true
    },
    {
      "type": "apex",
      "value": "bin/apex/enableChatUser.apex",
      "continue_on_error": true
    }
  ],

  // runs after metadata push
  "post_deploy": [
    {
      "type": "apex",
      "value": "bin/apex/addToGroup.apex",
      "continue_on_error": true
    },
    {
      "type": "js",
      "value": "bin/js/manipulateMetadataBeforeDeploy.js"
    },
    {
      "type": "metadata",
      "value": "unpackaged"
    },
    {
      "type": "permissionSetGroup",
      "value": "PermissionSetGroupDevName"
    },
    {
      "type": "permissionSet",
      "value": "PermissionSetDevName"
    },
    ,
    {
      // Automatically sets --targetusername when using SFDMU
      "type": "sf",
      "value": "sf sfdmu run --sourceusername csvfile --path ./sfdmu -w -n"
    }
  ],

  // runs after successfully installing a package to an environment (must be called specifically using the resource command)
  "post_install": [
    {
      "type": "js",
      "value": "bin/js/manipulateMetadataBeforeDeploy.js"
    },
    {
      "type": "metadata",
      "value": "unpackaged"
    }
  ]
}

Local Development

To develop and make changes to the CLI itself, do:

  1. Run npm install
  2. Run either npm run bin or npm run bin:js
  • The former runs the TypeScript code natively, the latter compiles it to JavaScript and runs it (slower, but more production like code)

To run with commands, run npm run bin create or npm run bin resource. See documenation above for how to use the CLI when installed. Will be exactly the same, but ssdx is changed to npm run bin when running locally.

To use parameters when running locally, run npm run bin create -- -n MyName or npm run bin resource -- --pre-dependencies

Deploying

Make sure all changes are being made from a branch (with correct naming convention, see below) and pushed using a PR. Detailed instructions:

  1. Make a branch based on main
  2. Give it a name with a prefix, e.g. feature/my-new-feature. Allowed prefixes are:
    • breaking/.. → major version will be updated (1.x.x → 2.0.0)
    • feature/.. → minor version will be updated (x.1.x → x.2.0)
    • refactor/.. → patch version will be updated (x.x.1 → x.x.2)
    • fix/.. → patch
    • ci/.. → patch
    • test/.. → no new release
    • docs/.. → no new release
  3. Make a PR from branch to main
  4. Upon merging, the package is automatically deployed to NPM
    • Should be available almost immediately, but you might need to specify version number to install due to caching being out-of-date

See branch.config.json for allowed prefixes and release.config.mjs for release management (major/minor/patch version numbers to incremented).

License

This project is licensed under the MIT License.