# Package

Create and manage Salesforce packages

* [`sfp package install`](#sfp-package-install)
* [`sfp package list`](#sfp-package-list)
* [`sfp package list-from-devhub`](#sfp-package-list-from-devhub)

## `sfp package install`

Install unlocked packages to a target org using subscriber package version IDs

```
USAGE
  $ sfp package install -o <value> -p <value> [--json] [--repository <value>] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [--skipifinstalled] [--ignoredowngrade] [--dryrun] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -o, --targetorg=<value>           (required) Username or alias of the target org.
  -p, --packages=<value>            (required) Comma-separated list of packages to install. Format:
                                    "name:04tXXXXXXXXXXXXXXX" or "name:04tXXXXXXXXXXXXXXX:installationKey". Example:
                                    "core:04t123,advanced:04t456:MyKey"
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --dryrun                      Simulate the installation without actually installing packages
      --ignoredowngrade             Ignore errors if a higher version of the package is already installed (cannot
                                    downgrade)
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url
      --skipifinstalled             Skip installation if the package is already installed in the target org

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Install unlocked packages to a target org using subscriber package version IDs

EXAMPLES
  $ sfp package install -o myorg --packages "core-crm:04t1234567890ABCDE,advanced-features:04t1234567890FGHIJ"

  $ sfp package install -o myorg --packages "core-crm:04t1234567890ABCDE:MyInstallKey123"

  $ sfp package install -o myorg --packages "pkg1:04tXXX,pkg2:04tYYY" --skip-if-installed
```

*See code:* [*src/commands/package/install.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp package list`

List all packages in the workspace with type, domain, and metadata

```
USAGE
  $ sfp package list [--json] [-d <value>] [-t unlocked|source|data|diff] [-c <value>] [--versions] [-v <value>]
    [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -c, --configdir=<value>             [default: config] Directory containing release config YAML files for domain
                                      resolution
  -d, --domain=<value>                Filter packages by domain name
  -t, --type=<option>                 Filter packages by type (unlocked, source, data, diff)
                                      <options: unlocked|source|data|diff>
  -v, --targetdevhubusername=<value>  Username or alias of the Dev Hub org.
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --versions                      Show last published version from git tags and latest version in DevHub

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List all packages in the workspace with type, domain, and metadata

EXAMPLES
  $ sfp package list

  $ sfp package list --domain core

  $ sfp package list --type unlocked

  $ sfp package list -v mydevhub

  $ sfp package list --versions -v mydevhub

  $ sfp package list --json
```

*See code:* [*src/commands/package/list.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp package list-from-devhub`

List all unlocked packages created in the DevHub org

```
USAGE
  $ sfp package list-from-devhub -v <value> [--json] [-c <value>] [--versions] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -c, --configdir=<value>             [default: config] Directory containing release config YAML files for domain
                                      resolution
  -v, --targetdevhubusername=<value>  (required) Username or alias of the Dev Hub org.
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --versions                      Show latest released version for each package in DevHub and last published version
                                      from workspace git tags

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List all unlocked packages created in the DevHub org

EXAMPLES
  $ sfp package list-from-devhub -v mydevhub

  $ sfp package list-from-devhub -v mydevhub --json
```

*See code:* [*src/commands/package/list-from-devhub.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/sfp-community/cli-reference-v51-release-v3/advanced/package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
