codevsfp CLIsfp serverlibraries

Review Environments

Acquire a review environment for use, marking it as in-use for a specified duration

sfp review-envs acquire

Acquire a review environment for use, marking it as in-use for a specified duration

USAGE
  $ sfp review-envs acquire -r <value> -t pr|issue|user|custom -i <value> -d <value> --used-by <value> [--json] [-e
    <value>] [-t <value>] [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-w] [--poll-interval <value>] [--max-wait-time
    <value>] [--domain <value>]

FLAGS
  -d, --duration=<value>            (required) Duration in minutes for which the environment is needed (1-480)
  -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.
  -i, --id=<value>                  (required) Assignment identifier (e.g., PR number, issue number, username, or custom
                                    ID)
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
  -t, --type=<option>               (required) Type of assignment (pr, issue, user, or custom)
                                    <options: pr|issue|user|custom>
  -w, --wait                        Wait for the environment to become available if currently in use
      --domain=<value>              Specific domain to acquire (for multi-domain assignments)
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --max-wait-time=<value>       [default: 480] Maximum time to wait in minutes when --wait is used (default: 480
                                    minutes/8 hours)
      --poll-interval=<value>       [default: 30] Polling interval in seconds when waiting (10-300, default: 30)
      --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
      --used-by=<value>             (required) Identifier of the process or user acquiring the environment

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Acquire a review environment for use, marking it as in-use for a specified duration

EXAMPLES
  $ sfp review-envs acquire --type pr --id 123 --repository myorg/myrepo --duration 30 --used-by "ci-pipeline-123"

  $ sfp review-envs acquire --type user --id john.doe --repository myorg/myrepo --duration 60 --used-by "local-dev"

  $ sfp review-envs acquire --type custom --id demo-session --repository myorg/myrepo --duration 120 --used-by "demo-process"

  $ sfp review-envs acquire --type pr --id 123 --repository myorg/myrepo --duration 30 --used-by "ci-pipeline-123" --wait

  $ sfp review-envs acquire --type pr --id 123 --repository myorg/myrepo --duration 30 --used-by "ci-pipeline-123" --wait --poll-interval 60

  $ sfp review-envs acquire --type pr --id 123 --repository myorg/myrepo --duration 30 --used-by "ci-pipeline-123" --wait --max-wait-time 120

See code: src/commands/review-envs/acquire.ts

sfp review-envs assign

Assign a review environment from a pool

USAGE
  $ sfp review-envs assign -r <value> -t pr|issue|user|custom -i <value> [--json] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--pool-tag <value>] [-b <value>] [-d
    <value>...] [--expiration <value>] [--immortal] [--override] [-m <value>]

FLAGS
  -b, --branch=<value>              Git branch name for automatic pool resolution
  -d, --domain=<value>...           SFP domain for automatic pool resolution
  -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.
  -i, --id=<value>                  (required) Assignment identifier (e.g., PR number, issue ID, username)
  -m, --metadata=<value>            Additional metadata as JSON string
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
  -t, --type=<option>               (required) Type of assignment (pr, issue, user, custom)
                                    <options: pr|issue|user|custom>
      --expiration=<value>          Number of hours before environment expires
      --immortal                    Make the environment never expire
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --override                    Force reassignment if environment already assigned
      --pool-tag=<value>            Pool tag to fetch environment from (optional if branch/domain provided)
      --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
  Assign a review environment from a pool

EXAMPLES
  $ sfp review-envs assign --type pr --id 123 --repository myorg/myrepo --pool-tag feature_dev

  $ sfp review-envs assign --type pr --id 123 --repository myorg/myrepo --branch feature/ABC-123 --domain sales

  $ sfp review-envs assign --type pr --id 123 --repository myorg/myrepo --branch feature/multi --domain sales --domain service

  $ sfp review-envs assign --type user --id john.doe --repository myorg/myrepo --pool-tag dev --expiration 72

  $ sfp review-envs assign --type pr --id 123 --repository myorg/myrepo --branch main --domain "sales,service,core"

  $ sfp review-envs assign --type pr --id 123 --repository myorg/myrepo --pool-tag dev --override

See code: src/commands/review-envs/assign.ts

sfp review-envs extend

Extend a review environment assignment

USAGE
  $ sfp review-envs extend -r <value> -t pr|issue|user|custom -i <value> [--json] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-h <value>] [--immortal] [-d <value>]

FLAGS
  -d, --domain=<value>              Specific domain to extend (for multi-domain PRs)
  -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.
  -h, --hours=<value>               Number of hours to extend the assignment
  -i, --id=<value>                  (required) Assignment identifier
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
  -t, --type=<option>               (required) Type of assignment (pr, issue, user, custom)
                                    <options: pr|issue|user|custom>
      --[no-]immortal               Make the environment never expire
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --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
  Extend a review environment assignment

EXAMPLES
  $ sfp review-envs extend --type pr --id 123 --repository myorg/myrepo --hours 24

  $ sfp review-envs extend --type pr --id 123 --repository myorg/myrepo --hours 24 --domain sales

  $ sfp review-envs extend --type user --id john.doe --repository myorg/myrepo --immortal

See code: src/commands/review-envs/extend.ts

sfp review-envs list

List review environment assignments

USAGE
  $ sfp review-envs list [--json] [-r <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g <value>...]
    [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-t pr|issue|user|custom] [-s
    active|expired|released] [--assigned-by <value>] [--pool-tag <value>] [--include-expired]

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.
  -r, --repository=<value>          Repository identifier in format owner/repo (GitHub/GitLab) or org/project/repo
                                    (Azure DevOps)
  -s, --status=<option>             Filter by assignment status
                                    <options: active|expired|released>
  -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).
  -t, --type=<option>               Filter by assignment type
                                    <options: pr|issue|user|custom>
      --assigned-by=<value>         Filter by who assigned the environment
      --include-expired             Include expired assignments in the results (by default expired assignments are
                                    excluded)
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --pool-tag=<value>            Filter by pool tag
      --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
  List review environment assignments

EXAMPLES
  $ sfp review-envs list --repository myorg/myrepo

  $ sfp review-envs list --repository myorg/myrepo --status active

  $ sfp review-envs list --repository myorg/myrepo --type pr

  $ sfp review-envs list --repository myorg/myrepo --pool-tag dev

See code: src/commands/review-envs/list.ts

sfp review-envs release

Release a review environment from use, marking it as idle for subsequent use within the same assignment

USAGE
  $ sfp review-envs release -r <value> -t pr|issue|user|custom -i <value> [--json] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--domain <value>]

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.
  -i, --id=<value>                  (required) Assignment identifier (e.g., PR number, issue number, username, or custom
                                    ID)
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
  -t, --type=<option>               (required) Type of assignment (pr, issue, user, or custom)
                                    <options: pr|issue|user|custom>
      --domain=<value>              Specific domain to release (for multi-domain assignments)
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --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
  Release a review environment from use, marking it as idle for subsequent use within  the same assignment

EXAMPLES
  $ sfp review-envs release --type pr --id 123 --repository myorg/myrepo

  $ sfp review-envs release --type user --id john.doe --repository myorg/myrepo

  $ sfp review-envs release --type custom --id demo-session --repository myorg/myrepo

See code: src/commands/review-envs/release.ts

sfp review-envs rules list

List pool assignment rules

USAGE
  $ sfp review-envs rules list [--json] [-r <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g <value>...]
    [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--pool-tag <value>] [--active]
    [--branch-search <value>] [--domain-search <value>]

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.
  -r, --repository=<value>          Filter by repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
      --active                      Show only active rules
      --branch-search=<value>       Search for rules with branch patterns containing this text
      --domain-search=<value>       Search for rules with domain patterns containing this text
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --pool-tag=<value>            Filter by pool tag
      --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
  List pool assignment rules

EXAMPLES
  $ sfp review-envs rules list --repository myorg/myrepo

  $ sfp review-envs rules list --repository myorg/myrepo --active

  $ sfp review-envs rules list --repository myorg/myrepo --pool-tag dev

  $ sfp review-envs rules list --repository myorg/myrepo --branch-search "feature"

See code: src/commands/review-envs/rules/list.ts

sfp review-envs rules match

Test which pool would be assigned for given branch and domain

USAGE
  $ sfp review-envs rules match -r <value> -b <value> [--json] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g
    <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-d <value>...]

FLAGS
  -b, --branch=<value>              (required) Git branch name to test
  -d, --domain=<value>...           SFP domain name to test (optional - if not provided, will test branch-only matching)
  -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.
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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>
      --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
  Test which pool would be assigned for given branch and domain

EXAMPLES
  $ sfp review-envs rules match --repository myorg/myrepo --branch feature/ABC-123 --domain sales

  $ sfp review-envs rules match --repository myorg/myrepo --branch main --domain core --domain service

  $ sfp review-envs rules match --repository myorg/myrepo --branch hotfix/critical

  $ sfp review-envs rules match --repository myorg/myrepo --branch release/v2.0 --domain "sales,reporting"

  $ sfp review-envs rules match --repository myorg/myrepo --branch feature/multi --domain sales --domain service --domain core

See code: src/commands/review-envs/rules/match.ts

sfp review-envs unassign

Unassign a review environment

USAGE
  $ sfp review-envs unassign -r <value> -t pr|issue|user|custom -i <value> [--json] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--return-to-pool] [-d <value>]

FLAGS
  -d, --domain=<value>              Specific domain to unassign (for multi-domain PRs)
  -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.
  -i, --id=<value>                  (required) Assignment identifier
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
  -t, --type=<option>               (required) Type of assignment (pr, issue, user, custom)
                                    <options: pr|issue|user|custom>
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --[no-]return-to-pool         Return the environment to the pool for reuse (only applies to sandbox pools, ignored
                                    for scratch orgs)
      --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
  Unassign a review environment

EXAMPLES
  $ sfp review-envs unassign --type pr --id 123 --repository myorg/myrepo

  $ sfp review-envs unassign --type pr --id 123 --repository myorg/myrepo --domain sales

  $ sfp review-envs unassign --type user --id john.doe --repository myorg/myrepo --no-return-to-pool

See code: src/commands/review-envs/unassign.ts

On this page