# Release Definition

Commands around managing release defintion

* [`sfp releasedefinition generate`](#sfp-releasedefinition-generate)

## `sfp releasedefinition generate`

Generates release definition based on the artifacts at the specified head of source branch/commit ref

```
USAGE
  $ sfp releasedefinition generate -c <value> -f <value> -n <value> [--json] [-b <value>] [-d <value>] [--nopush] [--forcepush ]
    [-m <value>] [--scope <value> --npm] [--npmrcpath <value> ] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -b, --branchname=<value>   Repository branch in which the release definition files are to be written
  -c, --gitref=<value>       (required) Utilize the tags on the source branch to generate release definiton
  -d, --directory=<value>    Relative path to directory to which the release definition file should be generated, if the
                             directory doesnt exist, it will be created
  -f, --configfile=<value>   (required) Path to the release config file which determines how the release definition
                             should be generated
  -m, --metadata=<value>     Additional metadata in json format that needs to be added to the release definition file
  -n, --releasename=<value>  (required) Set a release name on the release definition file created
      --forcepush            Force push changes to the repository branch
      --loglevel=<option>    [default: info] logging level for this command invocation
                             <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --nopush               Do not push the changelog to a repository to the provided branch
      --npm                  Validate that artifacts exist in NPM registry before including them in the release
                             definition
      --npmrcpath=<value>    Path to .npmrc file for NPM registry authentication. Defaults to user's .npmrc if not
                             provided
      --scope=<value>        NPM scope for artifacts (e.g., @myorg). Required when using --npm flag

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Generates release definition based on the artifacts at the specified head of source branch/commit ref

EXAMPLES
  $ sfp releasedefinition:generate -n <releaseName> -c <gitref> -f <configfile>
```

*See code:* [*src/commands/releasedefinition/generate.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/releasedefinition.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.
