codevsfp CLIsfp serverlibraries

Scratch

Create, delete, and login to scratch orgs

sfp scratch delete

Deletes a particular scratch org in the pool, This command is to be used in a pipeline with correct permissions to delete any active scratch org record or to be used by an adminsitrator

USAGE
  $ sfp scratch delete -o <value> -v <value> [--json] [--apiversion <value>] [--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.
  -v, --targetdevhubusername=<value>  (required) Username or alias of the Dev Hub org.
      --apiversion=<value>            Override the api version used for api requests made by this command
      --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
  Deletes a particular scratch org in the pool, This command is to be used in a pipeline with correct permissions to
  delete any active scratch org record or to be used by an adminsitrator

EXAMPLES
  $ sfp scratch delete -o test-xasdasd@example.com -v devhub

See code: src/commands/scratch/delete.ts

sfp scratch login

This command performs a scratch org login using the username.

USAGE
  $ sfp scratch login -u <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-d <value>] [-s] [-a <value>] [-v <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -a, --alias=<value>                 Alias for the org.
  -d, --devhub-username=<value>       Username of the DevHub org (for server-based auth)
  -e, --email=<value>                 Email address for authenticated user. Ignored if --application-token is provided.
                                      Can be set via SFP_SERVER_USER env var.
  -s, --set-default                   Set the authenticated org as the default that all org-related commands run
                                      against.
  -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).
  -u, --username=<value>              (required) Set the authenticated org as the default Dev Hub.
  -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>
      --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

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  This command performs a scratch org login using the username.

EXAMPLES
  $ sfp scratch login --username myScratch -v myDevHub

  $ sfp scratch login --username myScratch --devhub-username admin@devhub.com

  $ sfp scratch login -u myScratch -a myscratch  # Auto-detects DevHub via server

See code: src/commands/scratch/login.ts

On this page