package Commands

Use the package commands to develop second-generation packages, and to install and uninstall first- and second-generation packages.

package:create (Beta)

Creates a package.

This release contains a beta version of the package:create command, which means it’s a high-quality feature with known limitations. The the package:create command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:create command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:create
-n NAME
-t PACKAGETYPE
[-d DESCRIPTION]
[-e]
-r PATH
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-n | --name NAME
Required

Name of the package to create.

Type: string
-t | --packagetype PACKAGETYPE
Required

Package type for the package.

The options for package type are Managed and Unlocked (Managed=DeveloperManagedSubscriberManaged, Unlocked=DeveloperControlledSubscriberEditable).

These options determine upgrade and editability rules.

Type: string
Permissible values are: Managed, Unlocked
-d | --description DESCRIPTION
Optional

Description of the package.

Type: string
-e | --nonamespace
Optional

Creates the package with no namespace. Available only for unlocked packages. Useful when you’re migrating an existing org to packages. But, use a namespaced package for new metadata.

Type: flag
-r | --path PATH
Required

The path to the directory that contains the contents of the package.

Type: directory
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:create

NOTE: This command must be run from within a project.

First, use this command to create a package. Then create a package version.

If you don't have a namespace defined in your sfdx-project.json file, use --nonamespace.

Your --name value must be unique within your namespace.

Examples:

1$ sfdx force:package:create -n YourPackageName -t Unlocked -r force-app
1$ sfdx force:package:create -n YourPackageName -d "Your Package Descripton" -t Unlocked -r force-app

Run 'sfdx force:package:list' to list all packages in the Dev Hub org.

package:install

Installs a package in the target org.

Command Syntax

sfdx force:package:install
[-i ID]
[-w WAIT]
[-k INSTALLATIONKEY]
[-p PUBLISHWAIT]
[-r]
[--package PACKAGE]
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --id ID
The parameter --id has been deprecated and will be removed in v44.0 or later. Use --package instead.
Optional

The ID of the package version to install (starts with 04t).

Type: id
-w | --wait WAIT
Optional

Maximum number of minutes to wait for installation status. The default is 0.

Type: minutes
-k | --installationkey INSTALLATIONKEY
Optional

Installation key for installing a key-protected package. The default is null.

Type: string
-p | --publishwait PUBLISHWAIT
Optional

Maximum number of minutes to wait for the subscriber package version ID to become available in the target org before canceling the installation request. The default is 0.

WARNING: The short name "-p" has been deprecated and will be removed in v44.0 or later. Use "--publishwait" instead.

Type: minutes
-r | --noprompt
Optional

Allow Remote Site Settings and Content Security Policy websites to send or receive data without confirmation.

Type: flag
--package PACKAGE
Optional

The ID (starts with 04t) or alias of the package version to install.

Type: string
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:install

Supply the ID of the package version you want to install. The package installs in your default target org unless you supply the username for a different target org.

Examples:

1$ sfdx force:package:install --package 04t... -u me@example.com
1$ sfdx force:package:install --package awesome_package_alias
1$ sfdx force:package:install --package "Awesome Package Alias"

package:install:get (Deprecated)

The command package:install:get has been deprecated and will be removed in v44.0 or later. Use force:package:install:report instead. Retrieves the status of a package installation request.

Command Syntax

sfdx force:package:install:get
-i REQUESTID
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --requestid REQUESTID
Required

The ID of the package install request you want to check.

Type: id
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:install:get

WARNING: The command "install:get" has been deprecated and will be removed in v44.0 or later. Use "force:package:install:report" instead.

Examples:

1$ sfdx force:package:install:get -i 0Hf...
1$ sfdx force:package:install:get -i 0Hf... -u me@example.com

package:install:report (Beta)

Retrieves the status of a package installation request.

This release contains a beta version of the package:install:report command, which means it’s a high-quality feature with known limitations. The the package:install:report command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:install:report command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:install:report
-i REQUESTID
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --requestid REQUESTID
Required

The ID of the package install request you want to check.

Type: id
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:install:report

Examples:

1$ sfdx force:package:install:report -i 0Hf...
1$ sfdx force:package:install:report -i 0Hf... -u me@example.com

package:installed:list

Lists all packages installed in the target org.

Command Syntax

sfdx force:package:installed:list
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:installed:list

NOTE: This command must be run from within a project.

Examples:

1$ sfdx force:package:installed:list
1$ sfdx force:package:installed:list -u me@example.com

package:list (Beta)

Lists all packages in the Dev Hub org.

This release contains a beta version of the package:list command, which means it’s a high-quality feature with known limitations. The the package:list command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:list command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:list
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]
[--verbose]

Parameters

-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error
--verbose
Optional

Displays extended package details.

Type: flag

Help for package:list

You can view the namespace, IDs, and other details for each package.

Examples:

1$ sfdx force:package:list -v devhub@example.com
1$ sfdx force:package:list -v devhub@example.com --verbose

package:uninstall

Uninstalls a second-generation package from the target org. To uninstall a first-generation package, use the Salesforce user interface.

Command Syntax

sfdx force:package:uninstall
[-i ID]
[-w WAIT]
[-p PACKAGE]
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --id ID
The parameter --id has been deprecated and will be removed in v44.0 or later. Use --package instead.
Optional

The ID of the second-generation package to uninstall (starts with 04t).

Type: id
-w | --wait WAIT
Optional

Maximum number of minutes to wait for uninstall status. The default is 0.

Type: minutes
-p | --package PACKAGE
Optional

The ID (starts with 04t) or alias of the package version to uninstall.

Type: string
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:uninstall

Specify the package ID for a second-generation package.

Examples:

1$ sfdx force:package:uninstall -p 04t... -u me@example.com
1$ sfdx force:package:uninstall -p undesirable_package_alias
1$ sfdx force:package:uninstall -p "Undesirable Package Alias"

To list the org’s installed packages, run "sfdx force:package:installed:list".

To uninstall a first-generation package, from Setup, enter Installed Packages in the Quick Find box, then select Installed Packages.

package:uninstall:get (Deprecated)

The command package:uninstall:get has been deprecated and will be removed in v44.0 or later. Use force:package:uninstall:report instead. Retrieves the status of a package uninstall request.

Command Syntax

sfdx force:package:uninstall:get
-i REQUESTID
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --requestid REQUESTID
Required

The ID of the package uninstall request you want to check.

Type: id
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:uninstall:get

WARNING: The command "uninstall:get" has been deprecated and will be removed in v44.0 or later. Use "force:package:uninstall:report" instead.

Examples:

1$ sfdx force:package:uninstall:get -i 06y...
1$ sfdx force:package:uninstall:get -i 06y... -u me@example.com

package:uninstall:report (Beta)

Retrieves the status of a package uninstall request.

This release contains a beta version of the package:uninstall:report command, which means it’s a high-quality feature with known limitations. The the package:uninstall:report command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:uninstall:report command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:uninstall:report
-i REQUESTID
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --requestid REQUESTID
Required

The ID of the package uninstall request you want to check.

Type: id
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:uninstall:report

Examples:

1$ sfdx force:package:uninstall:report -i 06y...
1$ sfdx force:package:uninstall:report -i 06y... -u me@example.com

package:update (Beta)

Updates details about a package. Does not create a package version.

This release contains a beta version of the package:update command, which means it’s a high-quality feature with known limitations. The the package:update command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:update command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:update
-p PACKAGE
[-n NAME]
[-d DESCRIPTION]
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-p | --package PACKAGE
Required

The D (starts with 0Ho) or alias of the package to update.

Type: string
-n | --name NAME
Optional

New name of the package.

Type: string
-d | --description DESCRIPTION
Optional

New description of the package.

Type: string
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:update

NOTE: This command must be run from within a project.

Specify a new value for each option you want to update.

Examples:

1$ sfdx force:package:update -p "Your Package Alias" -n "New Package Name"
1$ sfdx force:package:update -p 0Ho... -d "New Package Description"

Run "sfdx force:package:list" to list all packages in the Dev Hub org.

package:version:create (Beta)

Creates a package version in the Dev Hub org.

This release contains a beta version of the package:version:create command, which means it’s a high-quality feature with known limitations. The the package:version:create command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:create command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:create
[-p PACKAGE]
[-d PATH]
[-f DEFINITIONFILE]
[-b BRANCH]
[-t TAG]
[-k INSTALLATIONKEY]
[-x]
[-w WAIT]
[-a VERSIONNAME]
[-n VERSIONNUMBER]
[-e VERSIONDESCRIPTION]
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-p | --package PACKAGE
Optional

The ID (starts with 0Ho) or alias of the package to create a version of.

Type: string
-d | --path PATH
Optional

The path to the directory that contains the contents of the package.

Type: directory
-f | --definitionfile DEFINITIONFILE
Optional

The path to a definition file (similar to a scratch org definition file) that contains the list of features and org preferences that the metadata in the package version depends on.

Type: filepath
-b | --branch BRANCH
Optional

The package version’s branch.

Type: string
-t | --tag TAG
Optional

The package version’s tag.

Type: string
-k | --installationkey INSTALLATIONKEY
Optional

Installation key for creating the key-protected package. Either an --installationkey value or the --installationkeybypass flag is required.

Type: string
-x | --installationkeybypass
Optional

Bypasses the installation key requirement. If you bypass this requirement, anyone can install your package. Either an --installationkey value or the --installationkeybypass flag is required.

Type: string
-w | --wait WAIT
Optional

The number of minutes to wait for the package version to be created.

Type: minutes
Default value: 0
-a | --versionname VERSIONNAME
Optional

The name of the package version to be created. Overrides the sfdx-project.json value.

Type: string
-n | --versionnumber VERSIONNUMBER
Optional

The version number of the package version to be created. Overrides the sfdx-project.json value.

Type: string
-e | --versiondescription VERSIONDESCRIPTION
Optional

The description of the package version to be created. Overrides the sfdx-project.json value.

Type: string
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:version:create

NOTE: This command must be run from within a project.

The package version is based on the package contents in the specified directory.

To retrieve details about a package version create request, including status and package version ID (04t), run "sfdx force:package:version:create:report -i 08c...".

We recommend specifying the --installationkey to protect the contents of your package and to prevent unauthorized installation of your package.

To list package version creation requests in the org, run "sfdx force:package:version:create:list".

Examples:

1$ sfdx force:package:version:create -d common -k password123
1$ sfdx force:package:version:create -p "Your Package Alias" -k password123
1$ sfdx force:package:version:create -p 0Ho... -k password123

package:version:create:list (Beta)

Lists all requests to create second-generation package versions in the Dev Hub org.

This release contains a beta version of the package:version:create:list command, which means it’s a high-quality feature with known limitations. The the package:version:create:list command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:create:list command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:create:list
[-c CREATEDLASTDAYS]
[-s STATUS]
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-c | --createdlastdays CREATEDLASTDAYS
Optional

Filters the list based on the specified maximum number of days since the request was created (starting at 00:00:00 of first day to now; 0 for today).

Type: number
-s | --status STATUS
Optional

Filters the list based on the status of version creation requests.

Type: string
Permissible values are: Queued, InProgress, Success, Error
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:version:create:list

Shows the details of each request to create a package version that has run in the Dev Hub org.

All filter parameters are applied using the AND logical operator (not OR).

To get information about a specific request, run "sfdx force:package:version:create:report" and supply the request ID.

Examples:

1$ sfdx force:package:version:create:list
1$ sfdx force:package:version:create:list --createdlastdays 3
1$ sfdx force:package:version:create:list --status Error
1$ sfdx force:package:version:create:list -s InProgress
1$ sfdx force:package:version:create:list -c 3 -s Success

package:version:create:report (Beta)

Retrieves details about a package version creation request in the Dev Hub org.

This release contains a beta version of the package:version:create:report command, which means it’s a high-quality feature with known limitations. The the package:version:create:report command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:create:report command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:create:report
-i PACKAGECREATEREQUESTID
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-i | --packagecreaterequestid PACKAGECREATEREQUESTID
Required

The ID (starts with 08c) of the package version creation request you want to display.

Type: id
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:version:create:report

Specify the request ID for which you want to view details. If applicable, the command displays errors related to the request.

Examples:

1$ sfdx force:package:version:create:report -i 08c...
1$ sfdx force:package:version:create:report -i 08c... -v devhub@example.com

To show all requests in the org, run "sfdx force:package:version:create:list".

package:version:list (Beta)

Lists all package versions in the Dev Hub org.

This release contains a beta version of the package:version:list command, which means it’s a high-quality feature with known limitations. The the package:version:list command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:list command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:list
[-c CREATEDLASTDAYS]
[-m MODIFIEDLASTDAYS]
[-p PACKAGES]
[-r]
[-o ORDERBY]
[-v TARGETDEVHUBUSERNAME]
[--concise]
[--json]
[--loglevel LOGLEVEL]
[--verbose]

Parameters

-c | --createdlastdays CREATEDLASTDAYS
Optional

Filters the list based on the specified maximum number of days since the request was created (starting at 00:00:00 of first day to now; 0 for today).

Type: number
-m | --modifiedlastdays MODIFIEDLASTDAYS
Optional

Lists the items modified in the specified last number of days, starting at 00:00:00 of first day to now. Use 0 for today.

Type: number
-p | --packages PACKAGES
Optional

Filters results on the specified comma-delimited packages (aliases or 0Ho IDs).

Type: string
-r | --released
Optional

Displays released versions only (IsReleased=true).

Type: flag
-o | --orderby ORDERBY
Optional

Orders the list by the specified package version fields.

Type: string
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--concise
Optional

Displays limited package version details.

Type: flag
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error
--verbose
Optional

Displays extended package version details.

Type: flag

Help for package:version:list

Displays details of each package version in the org.

Use --concise or --verbose to display limited or additional details, respectively.

All filter parameters are applied using the AND logical operator (not OR).

Examples:

1$ sfdx force:package:version:list --verbose --createdlastdays 3 --released --orderby PatchVersion
1$ sfdx force:package:version:list --packages 0Ho000000000000,0Ho000000000001 --released --modifiedlastdays 0
1$ sfdx force:package:version:list --released
1$ sfdx force:package:version:list --concise --modifiedlastdays 0
1$ sfdx force:package:version:list --concise -c 3 -r
1$ sfdx force:package:version:list --packages exp-mgr,exp-mgr-util --released --modifiedlastdays 0

package:version:promote (Beta)

Promotes a package version to released status.

This release contains a beta version of the package:version:promote command, which means it’s a high-quality feature with known limitations. The the package:version:promote command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:promote command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:promote
-p PACKAGE
[-n]
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-p | --package PACKAGE
Required

The ID (starts with 04t) or alias of the package version to promote.

Type: string
-n | --noprompt
Optional

Do not prompt to confirm setting the package version as released.

Type: flag;
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:version:promote

NOTE: This command must be run from within a project.

Supply the ID or alias of the package version you want to promote. Promotes the package version to released status.

Examples:

1$ sfdx force:package:version:promote -p 04t...
1$ sfdx force:package:version:promote -p awesome_package_alias
1$ sfdx force:package:version:promote -p "Awesome Package Alias"

package:version:report (Beta)

Retrieves details about a package version in the Dev Hub org.

This release contains a beta version of the package:version:report command, which means it’s a high-quality feature with known limitations. The the package:version:report command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:report command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:report
-p PACKAGE
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]
[--verbose]

Parameters

-p | --package PACKAGE
Required

The ID (starts with 04t) or alias of the package to retrieve details for.

Type: string
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error
--verbose
Optional

Displays extended package version details.

Type: flag

Help for package:version:report

NOTE: This command must be run from within a project.

Examples:

1$ sfdx force:package:version:report -p 04t...
1$ sfdx force:package:version:report -p "Your Package Alias"

To update package version values, run "sfdx force:package:version:update".

package:version:update (Beta)

Updates a second-generation package version in the Dev Hub org.

This release contains a beta version of the package:version:update command, which means it’s a high-quality feature with known limitations. The the package:version:update command isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the package:version:update command in the Packaging 2 Beta group in the Trailblazer Community.

Note

Command Syntax

sfdx force:package:version:update
-p PACKAGE
[-a VERSIONNAME]
[-e VERSIONDESCRIPTION]
[-b BRANCH]
[-t TAG]
[-k INSTALLATIONKEY]
[-v TARGETDEVHUBUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-p | --package PACKAGE
Required

The ID (starts with 04t) or alias of the package to update a version of.

Type: string
-a | --versionname VERSIONNAME
Optional

The new package version name.

Type: string
-e | --versiondescription VERSIONDESCRIPTION
Optional

The new package version description.

Type: string
-b | --branch BRANCH
Optional

The new package version branch.

Type: string
-t | --tag TAG
Optional

The new package version tag.

Type: string
-k | --installationkey INSTALLATIONKEY
Optional

The new installation key for the key-protected package. The default is null.

Type: string
-v | --targetdevhubusername TARGETDEVHUBUSERNAME
Optional

A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.

Type: string
--json
Optional

Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for package:version:update

NOTE: This command must be run from within a project.

Specify a new value for each option you want to update.

Examples:

1$ sfdx force:package:version:update -p "Your Package Alias" -k password123
1$ sfdx force:package:version:update -p 04t... -b master -t 'Release 1.0.7'
1$ sfdx force:package:version:update -p 04t... -e "New Package Version Description"

To display details about a package version, run "sfdx force:package:version:report".