plugin-signups

Learn about the plugin-signups
Salesforce CLI plugins are based on the oclif plugin framework. Read the plugin developer guide to learn about Salesforce CLI plugin development.
This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the node developer packages used by Salesforce. There is also a default circleci config using the release management orb standards.
Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the posttest
script and it is recommended to keep these tests active in your plugin, regardless if you plan to have it bundled.
Everything past here is only a suggestion as to what should be in your specific plugin's description
This plugin is bundled with the Salesforce CLI. For more information on the CLI, read the getting started guide.
We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
Install
sfdx plugins:install signups@x.y.z
Issues
Please report any issues at https://github.com/forcedotcom/cli/issues
Contributing
- Please read our Code of Conduct
- Create a new issue before starting your project so that we can keep track of
what you are trying to add/fix. That way, we can also offer suggestions or
let you know if there is already an effort in progress.
- Fork this repository.
- Build the plugin locally
- Create a topic branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
- Edit the code in your fork.
- 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.
- Sign CLA (see CLA below).
- Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
CLA
External contributors will be required to sign a Contributor's License
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
Build
To build the plugin locally, make sure to have yarn installed and run the following commands:
git clone git@github.com:salesforcecli/plugin-signups
yarn install
yarn build
To use your plugin, run using the local ./bin/dev
or ./bin/dev.cmd
file.
./bin/dev force:org:shape
There 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.
sfdx plugins:link .
sfdx plugins
Commands
sfdx org:create:shape
Create a scratch org configuration (shape) based on the specified source org.
USAGE
$ sfdx org:create:shape -o <value> [--json] [--api-version <value>]
FLAGS
-o, --target-org=<value> (required) Username or alias of the target org.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Create a scratch org configuration (shape) based on the specified source org.
Scratch org shapes mimic the baseline setup (features, limits, edition, and Metadata API settings) of a source org
without the extraneous data and metadata.
Run "sfdx org list shape" to view the available org shapes and their IDs.
To create a scratch org from an org shape, include the "sourceOrg" property in the scratch org definition file and set
it to the org ID of the source org. Then create a scratch org with the "sfdx force:org:create" command.
ALIASES
$ sfdx force:org:shape:create
EXAMPLES
Create an org shape for the source org with alias SourceOrg:
$ sfdx org:create:shape --target-org SourceOrg
See code: src/commands/org/create/shape.ts
sfdx org:create:snapshot
Create a snapshot of a scratch org.
USAGE
$ sfdx org:create:snapshot -v <value> -o <value> -n <value> [--json] [--api-version <value>] [-d <value>]
FLAGS
-d, --description=<value> Description of snapshot.
-n, --name=<value> (required) Unique name of snapshot.
-o, --source-org=<value> (required) ID or locally authenticated username or alias of scratch org to snapshot.
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Create a snapshot of a scratch org.
A snapshot is a point-in-time copy of a scratch org. The copy is referenced by its unique name in a scratch org
definition file.
Use "sfdx org get snapshot" to get details, including status, about a snapshot creation request.
To create a scratch org from a snapshot, include the "snapshot" option (instead of "edition") in the scratch org
definition file and set it to the name of the snapshot. Then use "sfdx force:org:create" to create the scratch org.
ALIASES
$ sfdx force:org:snapshot:create
EXAMPLES
Create a snapshot called "Dependencies" using the source scratch org ID and your default Dev Hub org:
$ sfdx org:create:snapshot --source-org 00Dxx0000000000 --name Dependencies --description 'Contains PackageA \
v1.1.0'
Create a snapshot called "NightlyBranch" using the source scratch org username and a Dev Hub org with alias
NightlyDevHub:
$ sfdx org:create:snapshot --source-org myuser@myorg --name NightlyBranch --description 'Contains PkgA v2.1.0 \
and PkgB 3.3.0' --target-dev-hub NightlyDevHub
FLAG DESCRIPTIONS
-d, --description=<value> Description of snapshot.
Use this description to document the contents of the snapshot. We suggest that you include a reference point, such
as a version control system tag or commit ID.
See code: src/commands/org/create/snapshot.ts
sfdx org:delete:shape
Delete all org shapes for a target org.
USAGE
$ sfdx org:delete:shape -o <value> [--json] [--api-version <value>] [-p]
FLAGS
-o, --target-org=<value> (required) Username or alias of the target org.
-p, --no-prompt Don't prompt for confirmation.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete all org shapes for a target org.
A source org can have only one active org shape. If you try to create an org shape for a source org that already has
one, the previous shape is marked inactive and replaced by a new active shape. If you don’t want to create scratch
orgs based on this shape, you can delete the org shape.
ALIASES
$ sfdx force:org:shape:delete
EXAMPLES
Delete all org shapes for the source org with alias SourceOrg:
$ sfdx org:delete:shape --target-org SourceOrg
Delete all org shapes without prompting:
$ sfdx org:delete:shape --target-org SourceOrg --no-prompt
See code: src/commands/org/delete/shape.ts
sfdx org:delete:snapshot
Delete a scratch org snapshot.
USAGE
$ sfdx org:delete:snapshot -v <value> -s <value> [--json] [--api-version <value>]
FLAGS
-s, --snapshot=<value> (required) Name or ID of snapshot to delete.
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete a scratch org snapshot.
Dev Hub admins can delete any snapshot, while users can delete only their own unless a Dev Hub admin gives the user
Modify All permissions.
ALIASES
$ sfdx force:org:snapshot:delete
EXAMPLES
Delete a snapshot from the default Dev Hub using the snapshot ID:
$ sfdx org:delete:snapshot --snapshot 0Oo...
Delete a snapshot from the specified Dev Hub using the snapshot name:
$ sfdx org:delete:snapshot --snapshot BaseSnapshot --target-dev-hub SnapshotDevHub
FLAG DESCRIPTIONS
-s, --snapshot=<value> Name or ID of snapshot to delete.
The IDs of scratch org snapshots start with 0Oo.
See code: src/commands/org/delete/snapshot.ts
sfdx org:get:snapshot
Get details about a scratch org snapshot.
USAGE
$ sfdx org:get:snapshot -v <value> -s <value> [--json] [--api-version <value>]
FLAGS
-s, --snapshot=<value> (required) Name or ID of snapshot to retrieve.
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Get details about a scratch org snapshot.
Snapshot creation can take a while. Use this command with the snapshot name or ID to check its creation status. After
the status changes to Active, you can use the snapshot to create scratch orgs.
To create a snapshot, use the "sfdx org create snapshot" command. To retrieve a list of all snapshots, use "sfdx org
list snapshot".
ALIASES
$ sfdx force:org:snapshot:get
EXAMPLES
Get snapshot details using its ID and the default Dev Hub org:
$ sfdx org:get:snapshot --snapshot 0Oo...
Get snapshot details using its name from a Dev Hub org with alias SnapshotDevHub:
$ sfdx org:get:snapshot --snapshot Dependencies --target-dev-hub SnapshotDevHub
FLAG DESCRIPTIONS
-s, --snapshot=<value> Name or ID of snapshot to retrieve.
The IDs of scratch org snapshots start with 0Oo.
See code: src/commands/org/get/snapshot.ts
sfdx org:list:shape
List all org shapes you’ve created.
USAGE
$ sfdx org:list:shape [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List all org shapes you’ve created.
The output includes the alias, username, and ID of the source org, the status of the org shape creation, and more. Use
the org ID to update your scratch org configuration file so you can create a scratch org based on this org shape.
ALIASES
$ sfdx force:org:shape:list
EXAMPLES
List all org shapes you've created:
$ sfdx org:list:shape
List all org shapes in JSON format and write the output to a file:
$ sfdx org:list:shape --json > tmp/MyOrgShapeList.json
See code: src/commands/org/list/shape.ts
sfdx org:list:snapshot
List scratch org snapshots.
USAGE
$ sfdx org:list:snapshot -v <value> [--json] [--api-version <value>]
FLAGS
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List scratch org snapshots.
You can view all the snapshots in a Dev Hub that you have access to. If you’re an admin, you can see all snapshots
associated with the Dev Hub org. If you’re a user, you can see only your snapshots unless a Dev Hub admin gives you
View All permissions.
To create a snapshot, use the "sfdx org create snapshot" command. To get details about a snapshot request, use "sfdx
org get snapshot".
ALIASES
$ sfdx force:org:snapshot:list
EXAMPLES
List snapshots in the default Dev Hub:
$ sfdx org:list:snapshot
List snapshots in the Dev Hub with alias SnapshotDevHub:
$ sfdx org:list:snapshot --target-dev-hub SnapshotDevHub
See code: src/commands/org/list/snapshot.ts