package Commands

Use the package commands to install managed and unmanaged packages.

package:install

Installs a package in the target org.

Command Syntax

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

Parameters

-i | --id ID
Required




ID of the package 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
-u | --targetusername TARGETUSERNAME
Optional




Username 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 you want to install. Installs to the default username org unless you supply the username for a different target org.

Examples:

1$ sfdx force:package:install -i 04t6A0000004eytQAA
1$ sfdx force:package:install -i 04t6A0000004eytQAA -u me@my.org

package:install:get

Retrieves the status of a package install request.

Command Syntax

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

Parameters

-i | --requestid REQUESTID
Required




The ID of the PackageInstallRequest.

Type: id
-u | --targetusername TARGETUSERNAME
Optional




Username 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

Displays the status of a package install request.