You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(skills): config-first idiomatic usage in CLI skill examples (#355)
* docs(skills): refactor skill examples for config-first idiomatic usage
Update b2c CLI skills so command examples assume configured values
(tenantId, shortCode, slasClientId, clientId, server) resolve from
dw.json / SFCC_* env vars, with flags shown only as overrides. This
prevents coding agents from prompting users for values that are
already present in their configuration.
Affected skills: scapi-schemas, scapi-custom, slas, ecdn (+ references),
cip, users-roles.
* feat(setup:skills): prompt to overwrite existing skills
When running interactively, detect already-installed skills and prompt
the user to overwrite them rather than requiring the --update flag
up front. Non-interactive behavior (--force, --update, --json)
is preserved.
Widen isSkillInstalled options to include the optional directory
override so the target-path check matches the installer's resolution
when --directory is provided.
`b2c setup skills` now prompts to overwrite already-installed skills in interactive mode instead of silently skipping them with a "use --update to overwrite" message. The existing `--update` and `--force` flags still work non-interactively.
Refine b2c CLI skills (`scapi-schemas`, `scapi-custom`, `slas`, `ecdn`, `cip`, `users-roles`) to show config-first idiomatic usage. Examples now assume values like `tenantId`, `shortCode`, and `clientId` are resolved from `dw.json` / `SFCC_*` env vars, with flags shown only as overrides. This prevents coding agents from prompting users for values that are already configured.
Copy file name to clipboardExpand all lines: skills/b2c-cli/skills/b2c-cip/SKILL.md
+23-17Lines changed: 23 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,16 +29,22 @@ cip
29
29
└── top-referrers
30
30
```
31
31
32
-
## Requirements
32
+
## Configuration
33
33
34
-
- OAuth client credentials (resolved from CLI configuration, or override with `--client-id` / `--client-secret`)
35
-
- CIP tenant: `--tenant-id` (or `--tenant`)
36
-
- API client has `Salesforce Commerce API` role with tenant filter for your instance
34
+
Values like `tenantId`, `clientId`, and `clientSecret` resolve from `dw.json` / `SFCC_*` env vars / the active instance. Examples below show minimal usage; add flags only to override configured values. If a required value is missing, the CLI emits an actionable error pointing at the flag, env var, and config key. See the `b2c-config` skill for precedence details.
37
35
38
-
Optional:
36
+
Relevant overrides:
39
37
40
-
-`--cip-host` (or `SFCC_CIP_HOST`) to override the default host
41
-
-`--staging` (or `SFCC_CIP_STAGING`) to force staging analytics host
Copy file name to clipboardExpand all lines: skills/b2c-cli/skills/b2c-ecdn/SKILL.md
+27-18Lines changed: 27 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,72 +9,79 @@ Use the `b2c` CLI plugin to manage eCDN (embedded Content Delivery Network) zone
9
9
10
10
> **Tip:** If `b2c` is not installed globally, use `npx @salesforce/b2c-cli` instead (e.g., `npx @salesforce/b2c-cli ecdn zones list`).
11
11
12
+
## Configuration
13
+
14
+
Values like `tenantId` resolve from `dw.json` / `SFCC_*` env vars / the active instance. Examples below show minimal usage; add flags only to override configured values. If a required value is missing, the CLI emits an actionable error pointing at the flag, env var, and config key. See the `b2c-config` skill for precedence details.
15
+
12
16
## Prerequisites
13
17
14
18
- OAuth credentials with `sfcc.cdn-zones` scope (read operations)
15
19
- OAuth credentials with `sfcc.cdn-zones.rw` scope (write operations)
16
-
- Tenant ID for your B2C Commerce organization
20
+
- Tenant ID for your B2C Commerce organization (from config or `--tenant-id`)
17
21
18
22
## Examples
19
23
20
24
### List CDN Zones
21
25
22
26
```bash
23
-
# list all CDN zones for a tenant
24
-
b2c ecdn zones list --tenant-id zzxy_prd
27
+
# list all CDN zones for the configured tenant
28
+
b2c ecdn zones list
29
+
30
+
# JSON output
31
+
b2c ecdn zones list --json
25
32
26
-
#list with JSON output
27
-
b2c ecdn zones list --tenant-id zzxy_prd --json
33
+
#target a different tenant than the active config
34
+
b2c ecdn zones list --tenant-id zzxy_prd
28
35
```
29
36
30
37
### Create a Storefront Zone
31
38
32
39
```bash
33
40
# create a new storefront zone
34
-
b2c ecdn zones create --tenant-id zzxy_prd --domain-name example.com
0 commit comments