package1 Commands

Use the package1 commands to create and view first-generation package versions in your Dev Hub org.

force:package1:version:create

Creates a first-generation package version in the release org.

Help for force:package1:version:create

The package version is based on the contents of the specified metadata package. Omit -m if you want to create an unmanaged package version.

Command Syntax

sfdx force:package1:version:create
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
-i PACKAGEID
-n NAME
[-d DESCRIPTION]
[-v VERSION]
[-m]
[-r RELEASENOTESURL]
[-p POSTINSTALLURL]
[-k INSTALLATIONKEY]
[-w WAIT]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

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

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-u | --targetusername TARGETUSERNAME
Optional

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

Type: string
--apiversion APIVERSION
Optional

Override the API version used for API requests made by this command.

Type: string
-i | --packageid PACKAGEID
Required

ID of the metadata package (starts with 033) of which you’re creating a new version.

Type: id
-n | --name NAME
Required

Package version name.

Type: string
-d | --description DESCRIPTION
Optional

Package version description.

Type: string
-v | --version VERSION
Optional

Package version in major.minor format, for example, 3.2.

Type: string
-m | --managedreleased
Optional

Creates a managed package version. To create a beta version, don’t include this parameter.

Type: boolean
-r | --releasenotesurl RELEASENOTESURL
Optional

The release notes URL. This link is displayed in the package installation UI to provide release notes for this package version to subscribers.

Type: url
-p | --postinstallurl POSTINSTALLURL
Optional

The post-install instructions URL. The contents of the post-installation instructions URL are displayed in the UI after installation of the package version.

Type: url
-k | --installationkey INSTALLATIONKEY
Optional

Installation key for creating the key-protected package. The default is null.

Type: string
-w | --wait WAIT
Optional

Minutes to wait for the package version to be created. The default is 2 minutes.

Type: number

force:package1:version:create:get

Retrieves the status of a package version creation request.

Help for force:package1:version:create:get

Examples:

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

Command Syntax

sfdx force:package1:version:create:get
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
-i REQUESTID

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

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

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-u | --targetusername TARGETUSERNAME
Optional

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

Type: string
--apiversion APIVERSION
Optional

Override the API version used for API requests made by this command.

Type: string
-i | --requestid REQUESTID
Required

The ID of the PackageUploadRequest.

Type: id

force:package1:version:display

Displays detailed information about an individual first-generation package version.

Help for force:package1:version:display

Display detailed information about an individual package version, including metadata package ID, name, the release state, and build number.

Command Syntax

sfdx force:package1:version:display
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
-i PACKAGEVERSIONID

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

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

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-u | --targetusername TARGETUSERNAME
Optional

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

Type: string
--apiversion APIVERSION
Optional

Override the API version used for API requests made by this command.

Type: string
-i | --packageversionid PACKAGEVERSIONID
Required

ID (starts with 04t) of the metadata package version whose details you want to display.

Type: id

force:package1:version:list

Lists the versions for the specified package or all first-generation packages in the org.

Help for force:package1:version:list

If a metadata package ID is specified, lists all versions of the specified package. Otherwise, lists all package versions for the org. For each package version, the list includes the package version ID, metadata package ID, name, version number, and release state.

Command Syntax

sfdx force:package1:version:list
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-i PACKAGEID]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

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

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-u | --targetusername TARGETUSERNAME
Optional

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

Type: string
--apiversion APIVERSION
Optional

Override the API version used for API requests made by this command.

Type: string
-i | --packageid PACKAGEID
Optional

Metadata package ID (starts with 033) whose package versions you want to list. If not specified, shows all versions for all packages (managed and unmanaged) in the org.

Type: id