{"id":49727572,"url":"https://github.com/salesforcecli/plugin-license-management","last_synced_at":"2026-05-09T05:14:44.536Z","repository":{"id":356552985,"uuid":"1199722784","full_name":"salesforcecli/plugin-license-management","owner":"salesforcecli","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-08T14:50:23.000Z","size":997,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T16:42:23.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salesforcecli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T16:33:02.000Z","updated_at":"2026-05-08T14:50:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/salesforcecli/plugin-license-management","commit_stats":null,"previous_names":["salesforcecli/plugin-license-management"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/salesforcecli/plugin-license-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-license-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-license-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-license-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-license-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforcecli","download_url":"https://codeload.github.com/salesforcecli/plugin-license-management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Fplugin-license-management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-09T05:14:43.657Z","updated_at":"2026-05-09T05:14:44.525Z","avatar_url":"https://github.com/salesforcecli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# License Management Plugin\n\n[![NPM](https://img.shields.io/npm/v/@salesforce/plugin-license-management.svg?label=@salesforce/plugin-license-management)](https://www.npmjs.com/package/@salesforce/plugin-license-management) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-license-management.svg)](https://npmjs.org/package/@salesforce/plugin-license-management) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0)\n\nManage Permission Set Licenses (PSLs) in your scratch orgs. This plugin lets you provision PSL seats into a target scratch org — either one at a time via command line flags, or in bulk using a JSON definition file.\n\n## Before You Begin\n\n- Install and authenticate the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli).\n- Ensure you have the appropriate permissions to manage Permission Set Licenses in the target org.\n\n## Install\n\n```bash\nsf plugins install @salesforce/plugin-license-management@x.y.z\n```\n\n## Issues\n\nPlease report any issues at https://github.com/forcedotcom/cli/issues\n\n## Contributing\n\n1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)\n2. Create a new issue before starting your project so that we can keep track of\n   what you are trying to add/fix. That way, we can also offer suggestions or\n   let you know if there is already an effort in progress.\n3. Fork this repository.\n4. [Build the plugin locally](#build)\n5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.\n6. Edit the code in your fork.\n7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.\n8. Sign CLA (see [CLA](#cla) below).\n9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.\n\n### CLA\n\nExternal contributors will be required to sign a Contributor's License\nAgreement. You can do so by going to https://cla.salesforce.com/sign-cla.\n\n### Build\n\nTo build the plugin locally, make sure to have yarn installed and run the following commands:\n\n```bash\n# Clone the repository\ngit clone git@github.com:salesforcecli/plugin-license-management\n\n# Install the dependencies and compile\nyarn \u0026\u0026 yarn build\n```\n\nTo use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.\n\n```bash\n# Run using local run file.\n./bin/dev license provision\n```\n\nThere should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.\n\n```bash\n# Link your plugin to the sf cli\nsf plugins link .\n# To verify\nsf plugins\n```\n\n## Commands\n\n\u003c!-- commands --\u003e\n\n- [`sf license provision`](#sf-license-provision)\n\n## `sf license provision`\n\nProvision Permission Set Licenses (PSL) into a target org.\n\n```\nUSAGE\n  $ sf license provision -o \u003cvalue\u003e [--json] [--flags-dir \u003cvalue\u003e] [--api-version \u003cvalue\u003e] [-n \u003cvalue\u003e | -f \u003cvalue\u003e]\n    [-l \u003cvalue\u003e | ] [-q \u003cvalue\u003e | ]\n\nFLAGS\n  -f, --definition-file=\u003cvalue\u003e  Path to a JSON file that contains the PSL provisioning request information.\n  -l, --license=\u003cvalue\u003e          Permission Set License name.\n  -n, --namespace=\u003cvalue\u003e        License package namespace.\n  -o, --target-org=\u003cvalue\u003e       (required) Username or alias of the target org. Not required if the `target-org`\n                                 configuration variable is already set.\n  -q, --quantity=\u003cvalue\u003e         Number of licenses to provision.\n      --api-version=\u003cvalue\u003e      Override the api version used for api requests made by this command\n\nGLOBAL FLAGS\n  --flags-dir=\u003cvalue\u003e  Import flag values from a directory.\n  --json               Format output as json.\n\nDESCRIPTION\n  Provision Permission Set Licenses (PSL) into a target org.\n\n  Provision Permission Set Licenses (PSL) into the target org. Successful execution sets the quantity of seats for the\n  given PSL in the indicated org.\n\n  There are two ways to run this command. You can provide the information to identify a single PSL via command line\n  flags, or provision multiple PSLs in a single call by supplying a JSON formatted file.\n\n  See https://github.com/salesforcecli/plugin-license-management#sf-license-provision for the format and options\n  contained within the JSON file.\n\nEXAMPLES\n  Provision a single Permission Set License into an org:\n\n    $ sf license provision --target-org myScratchOrg --namespace demo --license newLicense --quantity 5\n\n  Use a JSON formatted input file to provision one or more Permission Set Licenses into an org:\n\n    $ sf license provision --target-org myScratchOrg --definition-file test/config/provisionPSLs.json\n```\n\n_See code: [src/commands/license/provision.ts](https://github.com/salesforcecli/plugin-license-management/blob/1.1.1/src/commands/license/provision.ts)_\n\n\u003c!-- commandsstop --\u003e\n\n# Local Testing\n\n### 1. Log in to your Dev Hub\n\n```bash\nsf org login web --set-default-dev-hub --instance-url \u003cdev-hub-url\u003e\n```\n\n### 2. Create a scratch org\n\nBefore creating the scratch org, update `test/config/scratch-org-def.json` with your values:\n\n| Field       | Description                          |\n| ----------- | ------------------------------------ |\n| `orgName`   | Display name for the scratch org     |\n| `namespace` | Your package namespace (e.g. `myNS`) |\n\n```bash\nsf org create scratch --definition-file test/config/scratch-org-def.json --alias \u003cscratch-org-alias\u003e\n```\n\n### 3. Install the package into the scratch org\n\nMake the package available in the scratch org. Some ways to do this include:\n\n**Install a released package version**\n\n```bash\nsf package install --package \u003cpackage-version-id\u003e --target-org \u003cscratch-org-alias\u003e\n```\n\n**Push source directly**\n\n```bash\nsf project deploy start --target-org \u003cscratch-org-alias\u003e\n```\n\n### 4. Open the scratch org (optional)\n\n```bash\nsf org open --target-org \u003cscratch-org-alias\u003e\n```\n\n### 5. Provision licenses\n\n```bash\n# Provision a single PSL\nsf license provision --target-org \u003cscratch-org-alias\u003e --namespace \u003cnamespace\u003e --license \u003clicense-name\u003e --quantity \u003cnumber\u003e\n\n# Provision multiple PSLs using a definition file\nsf license provision --target-org \u003cscratch-org-alias\u003e --definition-file \u003cpath-to-definition-file\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforcecli%2Fplugin-license-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforcecli%2Fplugin-license-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforcecli%2Fplugin-license-management/lists"}