# Org

Register and manage Salesforce orgs

* [`sfp server org delete`](#sfp-server-org-delete)
* [`sfp server org get-default-devhub`](#sfp-server-org-get-default-devhub)
* [`sfp server org monitor-limits`](#sfp-server-org-monitor-limits)
* [`sfp server org register`](#sfp-server-org-register)
* [`sfp server org register-sandbox`](#sfp-server-org-register-sandbox)
* [`sfp server org update`](#sfp-server-org-update)

## `sfp server org delete`

This command allows a sfp server administrator to delete a registered salesforce org in the sfp server

```
USAGE
  $ sfp server org delete -u <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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.
  -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) The username of the org that is locally authenticated
      --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 allows a sfp server administrator to delete a registered salesforce org  in the sfp server

EXAMPLES
  $ sfp server org delete --username test@example.com --email admin@example.com
```

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

## `sfp server org get-default-devhub`

Get the default DevHub from the server with authentication details

```
USAGE
  $ sfp server org get-default-devhub [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g
    <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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.
  -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

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Get the default DevHub from the server with authentication details

EXAMPLES
  $ sfp server org get-default-devhub --email admin@example.com

  $ sfp server org get-default-devhub --email admin@example.com --json
```

*See code:* [*src/commands/server/org/get-default-devhub.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server org monitor-limits`

Monitor Salesforce org limits - fetch current limits, compute usage percentages, and ingest metrics to VictoriaMetrics. This command is typically run by Hatchet scheduled jobs or manually for testing.

```
USAGE
  $ sfp server org monitor-limits --environment <value> --target-org <value> [--json] [--repository <value>] [-e <value>] [-t
    <value>] [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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.
  -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).
      --environment=<value>         (required) Environment name as registered in the server
      --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
      --target-org=<value>          (required) Salesforce target org username or alias to monitor

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Monitor Salesforce org limits - fetch current limits, compute usage percentages, and ingest metrics to
  VictoriaMetrics. This command is typically run by Hatchet scheduled jobs or manually for testing.

EXAMPLES
  $ sfp server org monitor-limits --repository myorg/myrepo --environment prod --target-org admin@example.com

  $ sfp server org monitor-limits --repository myorg/myrepo --environment prod --target-org admin@example.com --json
```

*See code:* [*src/commands/server/org/monitor-limits.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server org register`

This command allows a sfp server administrator to register a locally authenticated (web login) salesforce to the sfp server

```
USAGE
  $ sfp server org register -u <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [--devhub] [--default] [--metadata <value>...] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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.
  -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, --targetusername=<value>      (required) The username of the org that is locally authenticated
      --default                     Mark this as the default DevHub (only one org can have this set)
      --devhub                      Mark this org as a DevHub
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --metadata=<value>...         Additional metadata as key=value pairs (comma separated) or JSON
      --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 allows a sfp server administrator to register a locally authenticated (web login) salesforce to the sfp
  server

EXAMPLES
  $ sfp server org register --targetusername myorg@example.com --email admin@example.com
```

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

## `sfp server org register-sandbox`

Register a Salesforce sandbox with the sfp server using credentials from an already registered production org

```
USAGE
  $ sfp server org register-sandbox -s <value> -p <value> [--json] [--repository <value>] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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.
  -p, --productionusername=<value>  (required) The username of the production org (must be already registered with the
                                    server)
  -s, --sandboxname=<value>         (required) The name of the sandbox to register
  -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

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Register a Salesforce sandbox with the sfp server using credentials from an already registered production org

EXAMPLES
  $ sfp server org register-sandbox --sandboxname dev1 --productionusername prod@example.com --email admin@example.com
```

*See code:* [*src/commands/server/org/register-sandbox.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server org update`

Update a Salesforce org registration with DevHub status, default flag, or metadata

```
USAGE
  $ sfp server org update -u <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [--devhub] [--default] [--metadata <value>...] [--replace-metadata] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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.
  -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, --targetusername=<value>      (required) Username of the Salesforce org to update
      --[no-]default                Mark this as the default DevHub
      --[no-]devhub                 Mark this org as a DevHub
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --metadata=<value>...         Metadata to update as key=value pairs or JSON (merged by default)
      --replace-metadata            Replace metadata instead of merging
      --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
  Update a Salesforce org registration with DevHub status, default flag, or metadata

EXAMPLES
  $ sfp server org update --targetusername myorg@example.com --devhub --default

  $ sfp server org update --targetusername myorg@example.com --metadata environment=staging --metadata region=eu

  $ sfp server org update --targetusername myorg@example.com --metadata '{"team":"platform","tier":"premium"}' --replace-metadata
```

*See code:* [*src/commands/server/org/update.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/cli-reference-v51-release-v3/server/org.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.
