@duabalabs/sellub-cli
v0.2.0
Published
Command-line interface for Sellub: configure servers, run smoke tests, list channels, and check subscription status from the terminal.
Readme
@duabalabs/sellub-cli
Command-line interface for Sellub. Configure servers, run smoke tests, list channels, and check subscription status from the terminal.
Install
npm install -g @duabalabs/sellub-cli
# or, one-shot:
npx @duabalabs/sellub-cli helpRequires Node 18+ (uses globalThis.fetch).
First-time setup
sellub login
# or non-interactive:
sellub login --yes \
--server-url https://api.example.com \
--admin-token $SELLUB_ADMIN_TOKEN \
--dps-server-url https://dps.example.com/parse \
--dps-app-id $DPS_APP_ID \
--dps-master-key $DPS_MASTER_KEYWrites ~/.sellub/config.json (mode 0600 on POSIX).
Commands
| Command | What it does |
|--------|--------------|
| sellub help | Show usage |
| sellub version | Print the installed version |
| sellub login | Configure server URL + tokens |
| sellub doctor | Environment + connectivity smoke test |
| sellub channels list | List Vendure channels (requires adminToken) |
| sellub subscriptions check <email> [--app <appId>] | Check subscription via DPS |
sellub doctor
Reports each check on its own line and exits non-zero if any required check fails. DPS is treated as informational when not configured.
Programmatic API
import { run, readConfig, writeConfig, adminGql, dpsCall } from "@duabalabs/sellub-cli";
const config = readConfig();
const channels = await adminGql({
serverUrl: config!.serverUrl,
adminToken: config!.adminToken!,
query: "query { channels { items { id token code } } }",
});Roadmap
catalog import <file.csv>— depends on thesellub-client.adminnamespace (work-stream A1).sellub orders list/sellub orders show <code>.sellub apps registerfor DPS app provisioning.
License
MIT © Duabalabs
