# Artifacts

Manage artifacts for a project

* [`sfp artifacts fetch`](#sfp-artifacts-fetch)
* [`sfp artifacts promote`](#sfp-artifacts-promote)
* [`sfp artifacts query`](#sfp-artifacts-query)

## `sfp artifacts fetch`

Fetch artifacts from a registry based on a release definition

```
USAGE
  $ sfp artifacts fetch -d <value> [--json] [-a <value> | -p <value>] [--scope <value> [--npm | -f <value>]]
    [--npmrcpath <value> ] [--continue-on-error] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -a, --artifacts=<value>          Comma-separated list of artifacts to fetch (format: name:version). Use LATEST_TAG for
                                   latest version
  -d, --artifactdir=<value>        (required) [default: artifacts] Directory to download artifacts into
  -f, --scriptpath=<value>         (Optional: no-NPM) Path to script that authenticates and downloads artifacts from the
                                   registry
  -p, --releasedefinition=<value>  Path to release definition file
      --continue-on-error          Continue processing other artifacts even if some fail to fetch
      --loglevel=<option>          [default: info] logging level for this command invocation
                                   <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --npm                        Download artifacts from a pre-authenticated private npm registry
      --npmrcpath=<value>          Path to .npmrc file used for authentication to registry. If left blank, defaults to
                                   home directory
      --scope=<value>              (required for NPM) User or Organisation scope of the NPM package

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Fetch artifacts from a registry based on a release definition

EXAMPLES
  $ sfp artifacts:fetch -p myreleasedefinition.yaml -f myscript.sh

  $ sfp artifacts:fetch -p myreleasedefinition.yaml --npm --scope myscope --npmrcpath path/to/.npmrc

  $ sfp artifacts:fetch --artifacts package1:1.0.0,package2:LATEST_TAG --npm --scope myscope
```

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

## `sfp artifacts promote`

Promotes artifacts predominantly for unlocked packages with code coverage greater than 75%

```
USAGE
  $ sfp artifacts promote -v <value> -d <value> [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --artifactdir=<value>           (required) [default: artifacts] The directory where artifacts are located
  -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>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Promotes artifacts predominantly for unlocked packages with code coverage greater than 75%

EXAMPLES
  $ sfp artifacts promote -d path/to/artifacts -v <org>
```

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

## `sfp artifacts query`

Fetch details about artifacts installed in a target org

```
USAGE
  $ sfp artifacts query -o <value> [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -o, --targetusername=<value>  (required) Username or alias of the target org.
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Fetch details about artifacts installed in a target org

EXAMPLES
  $ sfp artifacts:query -o <target_org>
```

*See code:* [*src/commands/artifacts/query.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-v50-and-below/advanced/artifacts.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.
