open-index/open-npm huggingface dataset:
npm package: @merchbase/cli
Description: MerchBase CLI for MerchBase Core APIs
Latest version: 1.0.2

# @merchbase/cli

MerchBase CLI for MerchBase Core public APIs.

## Install

```bash
npm install -g @merchbase/cli
```

## Setup

```bash
export MERCHBASE_API_KEY=mb_live_xxx
merchbase config set base-url https://app.merchbase.co
merchbase config set account <accountId> us
```

## Usage

```bash
merchbase help
merchbase products list
merchbase sales summary --range 30d
merchbase changelog
```

The CLI reads release notes from the packaged `CHANGELOG.md`, so installed users can inspect the current shipped notes with `merchbase changelog`.
npm package: @merchbase/http-client
Description: Typed tRPC client for MerchBase Core
Latest version: 1.0.2

# @merchbase/http-client

Typed tRPC client for MerchBase Core.

## Usage

```ts
import { createMerchbaseClient } from '@merchbase/http-client';

const client = createMerchbaseClient({
  baseUrl: 'http://localhost:8080',
  apiKey: 'mb_live_xxx',
});

const products = await client['products/search'].query({
  query: 'cat shirt',
  limit: 25,
  offset: 0,
});
```

Check the shared readiness gate before calling endpoints that depend on synced setup data:

```ts
import {
  getPublicApiReadiness,
  getPublicApiReadinessGate,
} from '@merchbase/http-client';

const setup = await client.setup.status.query();
const gate = getPublicApiReadinessGate('api.public.merchAccount.get');

if (gate) {
  const readiness = getPublicApiReadiness({
    path: 'api.public.merchAccount.get',
    setupStatus: setup,
  });
}
```