# Project

Extract layout assignments from an object package into a YAML file in a UI package

* [`sfp project layout-assignments extract`](#sfp-project-layout-assignments-extract)
* [`sfp project preflight`](#sfp-project-preflight)

## `sfp project layout-assignments extract`

Extract layout assignments from an object package into a YAML file in a UI package

```
USAGE
  $ sfp project layout-assignments extract -s <value> -t <value> [--json] [--strip] [--force] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -s, --source-package=<value>  (required) Path of the package whose object-meta.xml files are the starting point (the
                                dependency magnet)
  -t, --target-package=<value>  (required) Path of the package that will own the generated layout-assignments.yml
                                (typically the UI package)
      --force                   Overwrite the target `mutators/layout-assignments.yml` if it already exists. Without
                                this flag, the command fails when the target file is present so hand-curated entries
                                aren't silently lost on re-run.
      --loglevel=<option>       [default: info] logging level for this command invocation
                                <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --strip                   Also remove the extracted entries from the source package's object-meta.xml files. Use
                                this as a one-shot migration; routine stripping should happen at build time via the
                                `ignoreLayoutAssignments` descriptor flag.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Extract layout assignments from an object package into a YAML file in a UI package

  Scan the object-meta.xml files in a source package and write every strippable actionOverride (Flexipage, Visualforce,
  LightningComponent) and every recordType compactLayoutAssignment into postDeploy/layout-assignments.yml under the
  target package. The target package becomes the source of truth; pair this with the `ignoreLayoutAssignments`
  descriptor flag on the source package and `applyLayoutAssignments` on the target package to decouple the dependency
  between the two.

EXAMPLES
  $ sfp project layout-assignments extract --source-package src/core-crm --target-package src/ui-crm

  $ sfp project layout-assignments extract --source-package src/core-crm --target-package src/ui-crm --strip

  $ sfp project layout-assignments extract --source-package src/core-crm --target-package src/ui-crm --force
```

*See code:* [*src/commands/project/layout-assignments/extract.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp project preflight`

Prepare a Salesforce project for sfp

```
USAGE
  $ sfp project preflight [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [--type
    diff|source] [-c <value>] [--validate] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -c, --configdir=<value>          [default: config] Directory containing release configs
  -e, --email=<value>              Email address for authenticated user. Ignored if --application-token is provided. Can
                                   be set via SFP_SERVER_USER env var.
  -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).
      --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
      --type=<option>              [default: diff] Package type for new packages (diff or source)
                                   <options: diff|source>
      --validate                   Check-only mode: verify project configuration without making changes

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Prepare a Salesforce project for sfp

  Analyze and configure a vanilla SFDX project for use with sfp. Adds package names, version numbers, and release
  configs to unconfigured package directories. Use --validate to check configuration without making changes.

EXAMPLES
  $ sfp project preflight

  $ sfp project preflight --type source

  $ sfp project preflight --validate
```

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