b2c-sandbox by salesforcecommercecloud/b2c-developer-tooling
npx skills add https://github.com/salesforcecommercecloud/b2c-developer-tooling --skill b2c-sandbox仅在明确请求时创建或删除沙盒。始终确认破坏性操作。
使用 b2c CLI 插件来管理 Salesforce B2C Commerce 按需沙盒 (ODS)。仅在明确要求时创建或删除沙盒,因为这可能是计费或破坏性操作。
提示: 如果
b2c未全局安装,请使用npx @salesforce/b2c-cli代替(例如,npx @salesforce/b2c-cli sandbox list)。
别名:
ods前缀仍作为向后兼容的别名被支持(例如,b2c ods list与b2c sandbox list效果相同)。
对特定沙盒进行操作的命令接受两种 ID 格式:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
abc12345-1234-1234-1234-abc123456789)zzzv-123 或 zzzv_123)领域-实例格式使用 4 字符的领域代码,后跟短横线或下划线以及实例号。当使用领域-实例格式时,CLI 将自动查找对应的 UUID。
b2c sandbox list
# 针对领域 zzpq 使用 JSON 输出
b2c sandbox list --realm zzpq --json
# 按状态和特定创建者筛选,仅打印 id、state、hostname 列
b2c sandbox list --filter-params 'state=started,creating&createdBy=clavery@salesforce.com' --realm zzpq --columns id,state,hostname
仅在明确要求时创建沙盒,因为这可能是计费操作。
# 在领域 zzpq 中创建,TTL 为 4 小时(0 = 无限);使用 JSON 输出并等待完成(这可能需要 5-10 分钟;超时时间为 10 分钟)
b2c sandbox create --realm zzpq --ttl 4 --json --wait
# 在领域 zzpq 中创建大型配置文件(默认为中型)
b2c sandbox create --realm zzpq --profile large
# 创建时不自动设置 OCAPI/WebDAV 权限
b2c sandbox create --realm zzpq --no-set-permissions
# 为默认权限使用不同的客户端 ID
b2c sandbox create --realm zzpq --permissions-client-id my-other-client
# 自定义 OCAPI 设置(替换默认值)
b2c sandbox create --realm zzpq --ocapi-settings '[{"client_id":"my-client","resources":[{"resource_id":"/code_versions","methods":["get"]}]}]'
# 使用启动/停止调度器
b2c sandbox create --realm zzpq --start-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"08:00:00Z"}' --stop-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"19:00:00Z"}'
# 获取完整的日志跟踪输出以进行调试
b2c sandbox create --realm zzpq --log-level trace
对特定沙盒进行操作的命令同时支持 UUID 和领域-实例格式:
# 使用 UUID
b2c sandbox get abc12345-1234-1234-1234-abc123456789
b2c sandbox start abc12345-1234-1234-1234-abc123456789
b2c sandbox stop abc12345-1234-1234-1234-abc123456789
# 使用领域-实例格式
b2c sandbox get zzzv-123
b2c sandbox start zzzv_123
b2c sandbox stop zzzv-123
b2c sandbox restart zzzv-123
b2c sandbox delete zzzv-123 --force
查看 b2c sandbox --help 以获取 sandbox 主题下可用命令和选项的完整列表。
每周安装次数
68
代码仓库
GitHub 星标数
33
首次出现
2026年2月17日
安全审计
安装于
github-copilot62
codex58
cursor58
opencode57
gemini-cli56
amp56
Only create or delete sandboxes when explicitly requested. Always confirm destructive actions.
Use the b2c CLI plugin to manage Salesforce B2C Commerce On-demand sandboxes (ODS). Only create or delete a sandbox if explicitly asked as this may be a billable or destructible action.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli sandbox list).
Alias: The
odsprefix is still supported as a backward-compatible alias (e.g.,b2c ods listworks the same asb2c sandbox list).
Commands that operate on a specific sandbox accept two ID formats:
abc12345-1234-1234-1234-abc123456789)zzzv-123 or zzzv_123)The realm-instance format uses the 4-character realm code followed by a dash or underscore and the instance number. When using a realm-instance format, the CLI will automatically look up the corresponding UUID.
b2c sandbox list
# for realm zzpq with JSON output
b2c sandbox list --realm zzpq --json
# filter by status and those created by a specific user, only print the columns id,state,hostname
b2c sandbox list --filter-params 'state=started,creating&createdBy=clavery@salesforce.com' --realm zzpq --columns id,state,hostname
Only create a sandbox if explicitly asked as this may be a billable action.
# create in realm zzpq with 4 hour TTL (0 = infinite); json output and wait for completion (this may take 5-10 minutes; timeout is 10 minutes)
b2c sandbox create --realm zzpq --ttl 4 --json --wait
# create in realm zzpq with large profile (medium is default)
b2c sandbox create --realm zzpq --profile large
# create without automatic OCAPI/WebDAV permissions
b2c sandbox create --realm zzpq --no-set-permissions
# use a different client ID for default permissions
b2c sandbox create --realm zzpq --permissions-client-id my-other-client
# custom OCAPI settings (replaces defaults)
b2c sandbox create --realm zzpq --ocapi-settings '[{"client_id":"my-client","resources":[{"resource_id":"/code_versions","methods":["get"]}]}]'
# with start/stop scheduler
b2c sandbox create --realm zzpq --start-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"08:00:00Z"}' --stop-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"19:00:00Z"}'
# get full log trace output to debug
b2c sandbox create --realm zzpq --log-level trace
Commands that operate on a specific sandbox support both UUID and realm-instance formats:
# Using UUID
b2c sandbox get abc12345-1234-1234-1234-abc123456789
b2c sandbox start abc12345-1234-1234-1234-abc123456789
b2c sandbox stop abc12345-1234-1234-1234-abc123456789
# Using realm-instance format
b2c sandbox get zzzv-123
b2c sandbox start zzzv_123
b2c sandbox stop zzzv-123
b2c sandbox restart zzzv-123
b2c sandbox delete zzzv-123 --force
See b2c sandbox --help for a full list of available commands and options in the sandbox topic.
Weekly Installs
68
Repository
GitHub Stars
33
First Seen
Feb 17, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
github-copilot62
codex58
cursor58
opencode57
gemini-cli56
amp56
Supabase Postgres 最佳实践指南 - 8大类别性能优化规则与SQL示例
78,800 周安装