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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ravi004/sf-seeder

v1.3.1

Published

Powerfull Data Seeding & Migration Tool

Readme

🌱 @ravi004/sf-seeder

A powerful Salesforce CLI plugin to seed data into your org using flexible, JSON-based data plans. Define your data relationships, use Faker for generating realistic values, reference records dynamically, and ensure your test orgs are always ready.

NPM Downloads/week License


📦 Installation

sf plugins install @ravi004/sf-seeder

🚀 Commands

▶️ sf seeder:plan:run

Run a seeding plan to insert dummy or mock data into a Salesforce org.

Flags

| Flag | Type | Required | Description | | --------------- | ------- | -------- | ------------------------------------------------ | | --target-org | org | ✅ | Salesforce org alias or username | | --plan, -p | file | ✅ | Path to JSON plan file | | --dryrun | boolean | ❌ | Run the plan without actual insertion | | --save | string | ❌ | File path to save dryrun output | | --summaryonly | boolean | ❌ | Show only summary (must be used with --dryrun) |

Example

sf seeder:plan:run --target-org MYORG --plan ./my-first-plan.json --dryrun --save output.json

sf seeder:plan:validate

Validate the structure and correctness of a seeding plan before executing.

Flags

| Flag | Type | Required | Description | | --------------------- | ------- | -------- | --------------------------------------------------- | | --target-org | org | ✅ | Salesforce org alias or username | | --plan, -p | file | ✅ | Path to JSON plan file | | --validate-metadata | boolean | ❌ | Validate field names and lookups using org metadata |

Example

sf seeder:plan:validate --target-org MYORG --plan ./my-first-plan.json

Use --validate-metadata to also validate against metadata.


🛠 sf seeder:plan:generate

Automatically generate a starter seeding plan for selected objects.

Flags

| Flag | Type | Required | Description | | -------------- | ------- | -------- | ----------------------------------------------- | | --target-org | org | ✅ | Salesforce org alias or username | | --objects | string | ✅ | Comma-separated list of SObjects to include | | --count | integer | ❌ | Number of records per object (default: 3) | | --output | string | ❌ | Output file name (default: seeding-plan.json) |

Example

sf seeder:plan:generate --target-org MYORG --objects Opportunity,Contact --count 3 --output plan.json

📁 sf seeder:data:migrate

Migrate data from source ORG to target ORG for selected SOQL and sobject fields in SOQL.

Flags

| Flag | Type | Required | Description | | ------------------ | ---- | -------- | --------------------------------------- | | --source-org, -s | org | ✅ | Salesforce source org alias or username | | --target-org, -t | org | ✅ | Salesforce target org alias or username | | --plan, -p | file | ✅ | Path to JSON plan file |

Example

sf seeder:data:migrate --source-org MY_SOURCE_ORG --target-org MY_TARGET_ORG --plan plan.json

📄 Sample Seed Plan

[
  {
    "sobject": "Account",
    "count": 1,
    "saveRefs": true,
    "fields": {
      "Name": "#{faker.company.name}",
      "Industry": "Technology",
      "AnnualRevenue": 50000000
    }
  },
  {
    "sobject": "Contact",
    "count": 1,
    "saveRefs": false,
    "fields": {
      "LastName": "User-#{counter}",
      "FirstName": "Test",
      "Email": "test.user.#{counter}@globaltech.demo",
      "AccountId": "@{Account.Id}"
    }
  },
  {
    "sobject": "Opportunity",
    "count": 1,
    "saveRefs": false,
    "fields": {
      "Name": "Major Deal #{counter}",
      "AccountId": "@{Account.Id}",
      "StageName": "Prospecting",
      "CloseDate": "2025-12-31",
      "Amount": 150000
    }
  }
]

📄 Sample Migrate Plan

{
  "objects": [
    {
      "operation": "Upsert",
      "sobject": "Account",
      "query": "SELECT Id, Name, External_Id__c FROM Account LIMIT 2",
      "externalId": "External_Id__c"
    },
    {
      "sobject": "Contact", // Default Insert Operation
      "query": "SELECT Id, Name, Email FROM Contact LIMIT 2"
    }
  ]
}

🔧 Features

  • 🌟 Supports dynamic values using Faker.js
  • 🔁 Use #{counter} to create unique values
  • 🔗 Reference previously created records using @{SObject.Field}
  • 🧪 Dryrun to preview changes
  • ✅ Validate plan structure and fields
  • ⚙️ Auto-generate seed plans with required lookups
  • 📁 Migrate data between different Salesforce ORG

📚 Best Practices

  • Use --dryrun --summaryonly together to quickly assess the impact.
  • Validate your plan before running it with plan:validate.
  • Use saveRefs: true in the plan to reference records between objects.
  • Use faker for realistic test data and #{counter} for uniqueness.

Happy Seeding! 🌱✨