@merchbase/cli
v7.0.0
Published
MerchBase CLI for MerchBase Core APIs
Readme
@merchbase/cli
MerchBase CLI for MerchBase Core public APIs.
Install
npm install -g @merchbase/cliSetup
merchbase auth set
merchbase config set base-url https://app.merchbase.co
merchbase config set marketplace US # optional
merchbase healthmerchbase auth set stores the API key in macOS Keychain. For automation,
CI, and agent runtimes, MERCHBASE_API_KEY overrides the stored key:
export MERCHBASE_API_KEY=mb_live_xxxUsage
merchbase help
merchbase auth status
merchbase config show
merchbase health
merchbase products list
merchbase products search --status LIVE --status DRAFT --exclude-product-type RAGLAN
merchbase products get B000000001 --marketplace us
merchbase products metadata --marketplace us
merchbase events list --type product.sale.recorded --limit 50
merchbase events list --type product.sale.reversed --limit 50
merchbase events watch --cursor <watchCursor>
merchbase sales summary --range 30d
merchbase ingestion planner state
merchbase changelogProduct ASIN lookup accepts ASINs copied from sales records. Product marketplace filters are case-insensitive and match concrete seller marketplaces.
events list returns durable history in the standard JSON envelope. Pass its
data.watchCursor to events watch --cursor; watch output is JSON Lines and
resumes from the last received cursor after reconnect. The packaged CLI includes
its Node WebSocket implementation and does not require a global WebSocket.
Event names use product.* for seller product and commercial facts and
system.* for Core, account, sync, and operation history.
Amazon counter disappearances use product.sale.reversed,
product.sale.cancellation-reversed, and product.sale.return-reversed.
The CLI reads release notes from the packaged CHANGELOG.md, so installed users can inspect the current shipped notes with merchbase changelog.
