ecomblade
v0.1.5
Published
First-party CLI for Ecomblade connector authentication and session management.
Downloads
68
Maintainers
Readme
Ecomblade CLI
First-party CLI for authenticating against Ecomblade connector APIs.
Use with npx
npx ecomblade --helpCommands
Local API testing
The published CLI targets https://api.ecomblade.com by default. For local backend testing, set ECOMBLADE_API_BASE_URL for the command you are running:
ECOMBLADE_API_BASE_URL=http://localhost:8000 node ./bin/ecomblade.js loginPlain HTTP is accepted only for localhost, 127.0.0.1, and [::1]; all other API targets must use HTTPS.
Login
npx ecomblade loginStarts OAuth authorization with PKCE, opens the Ecomblade approval page in the browser, listens on a temporary localhost callback, exchanges the authorization code, and saves the connector session.
For Claude Web or another sandbox that can call npx ecomblade and reach api.ecomblade.com but cannot receive localhost callbacks, use web polling login:
npx ecomblade login --webThis prints the Ecomblade approval URL, polls the API after approval, exchanges the authorization code with PKCE, and saves the connector session.
The browser approval page is opened automatically. To print the URL without opening the browser:
npx ecomblade login --no-openSession inspection
npx ecomblade whoami --jsonConnector features
Product search:
npx ecomblade search-product --platform amazon --query "running shoes" --page 1 --json
npx ecomblade search-product --platform lazada --keyword "perfume" --page 1 --region lazada.sg --sort popularity --jsonCategory product search:
npx ecomblade category-product --platform amazon --category-id 172282 --page 1 --json
npx ecomblade category-product --platform temu --category-path "home-kitchen/lighting" --page 1 --sort sales --jsonSearch product platform params:
alibaba:--keyword <text> [--page <n>] [--page-size <n>]amazon:--query <text> --page <n> [--sort <value>]lazada:--keyword <text> --page <n> --region <domain> [--sort <value>]temu:--keyword <text> --page <n> --sort <value>tiktok:--keyword <text> --page <n> --sort <value> --region <code>
Category product platform params:
alibaba:--category-ids <ids> --page <n> [--tab <value>] [--delivery-id <id>] [--page-deduplicate-id <id>]amazon:--category-id <id> --page <n>lazada:--category-path <path> --page <n> --region <domain> [--sort <value>]temu:--category-path <path> --page <n> --sort <value>tiktok:--category <value> --page <n> --region <code>
Logout
Local logout only:
npx ecomblade logoutRemote revoke plus local logout:
npx ecomblade logout --revokeLocal config
The CLI stores its session in:
~/.ecomblade/config.json
Saved fields:
access_tokenrefresh_tokenaccess_expires_atsession_idtoken_typeuser_display_name
JSON output
Prefer --json for machine-readable workflows:
npx ecomblade whoami --jsonConnector auth errors preserve backend codes such as:
access_deniedinvalid_tokenexpired_tokenunauthorized
Feature calls use the authenticated public connector routes:
/public/connectors/features/search-product?platform=<platform>&.../public/connectors/features/category-product?platform=<platform>&...
