Skip to content

sf veles CLI plugin ​

@beyondthecloud/sf-veles adds one command to the Salesforce CLI: sf veles setup. It sets up Veles on an existing scratch org or sandbox and connects it to your Hub.

bash
sf plugins install @beyondthecloud/sf-veles
sf veles setup --target-org <alias> [--target-dev-hub <hub>] [--group <name>]... [--installation-key <key>]

Prerequisites ​

  • The target org exists and is authorised in the CLI. The command does not create orgs.
  • Veles 0.110.0 or later on the Hub. The command checks both versions before changing anything.
  • Your Hub user holds Veles Developer (included in Veles Admin).
  • Scratch org: a group marked Scratch Org Group exists on the Hub, or you pass --group.
  • Sandbox: its environment row already exists on the Hub (New Environment > From Sandbox). --group is refused for a sandbox; it takes its groups from that row.

Flags ​

FlagShortMeaning
--target-org-oThe scratch org or sandbox to set up. Required.
--target-dev-hub-vThe Hub. Defaults to the CLI's default Dev Hub.
--group-gEnvironment group on the Hub. Repeatable, first wins. Scratch orgs only.
--installation-key-kInstallation key for the package, if it has one.
--integration-permsetName of the unmanaged clone of Veles Hub Integration to create and assign. Default VelesIntegration.
--integration-userUsername in the target org to set up as the integration user. Default: the CLI user.
--verboseSub-steps, warnings and a summary.
--jsonMachine-readable result; exit code reflects success.

What it does ​

  1. Resolving org & Hub: registers the org on the Hub (environment row and connection token).
  2. Installing Veles package: installs the Hub's version if Veles is missing.
  3. Deploying connection metadata: the Remote Site Setting for the Hub.
  4. Configuring Hub connection: Hub URL, Hub integration username, the org's own environment row.
  5. Pre-authorizing integration user: clones the permission set, assigns it, grants a seat if needed, pre-authorises it on the ECA. Problems here are warnings, not failures.
  6. Connecting to Hub.
  7. Setting up environment (RSS): waits up to 3 minutes for the Hub's Remote Site Setting and for the Hub to sign in to the org.

Success ends with Veles setup complete. A failed step prints ✖, the reason as Error (1): ... with a Try this: hint, and exits 1.

Errors you may see ​

ErrorMeaning
VelesDev permission set not assigned.Assign Veles Developer or Veles Admin to your user on the Hub.
No Environment Group is marked as a Scratch Org Group.Create one on the Hub, or pass --group.
Sandbox not found on this HubAdd the sandbox on the Hub first.
The Hub <url> refused to connect this org: ...Usually the connected-orgs limit of your plan. The text says so.
The Hub cannot sign in to this org as <user>: ...The integration user is not pre-authorised in the target org. Finish Step 1 of its Setup tab.
Connecting to Hub did not finish within 3 minutesRun the command again; it skips what is done.