PXB CLI

Every endpoint, one command away

Orders, customers, invoices, support cases, payroll — the whole Pixelbase API, as a command you can pipe. No SDK to install, no token exchange to write, no scoping ids to thread through every call. Authenticate once and get on with it.

Node 18.17+. One executable, no dependencies, no package manager.

Setting up an AI agent rather than yourself? Start here.

Authenticate once. Then stop repeating yourself.

Most endpoints want a locationId, and threading one through every call is the tax you normally pay for a REST API. Pin the company and location once and it is filled in for you — in query strings and request bodies alike. Anything you pass explicitly still wins.

Each company is its own profile, with its own credentials and its own pinned location, so switching between them never carries the wrong context across.

~/acme
$ pxb company use acme
Now using Acme Corp (profile "acme")
$ pxb location use headquarters
Now using location Headquarters
$ pxb order list -q status=PAYMENT_PENDING
using locationId=Headquarters { "content": { "orders": [ … ] } }
$ pxb support-case message case_123 "On it."
200 POST support-cases/case_123/messages
~/acme
$ pxb customer list --json | jq -r '.content.customers[].fullname'
Ada Lovelace Grace Hopper Alan Turing
$ pxb order get ord_404 || echo "bailed with $?"
404 GET orders/ord_404
bailed with 1

Built to be piped.

The response body goes to stdout and the status line to stderr, so | jq works without a flag — and --json drops the status line entirely for when you are capturing both.

Exit codes are meaningful: zero on success, non-zero on any error including a 4xx. So && and || are enough for control flow, and a failed step stops a chain instead of corrupting the next one. It behaves like a Unix tool because it is one.

Least privilege, without the ceremony.

A client holds the scopes you grant it and nothing else, so the deploy script that reads orders and replies to support cases cannot reprice your catalogue — whatever it is asked to do. Give each script and CI job its own client and you can revoke one without disturbing the rest.

Secrets live in the OS keychain and are handed to it over stdin, never as a command line argument where ps or your shell history would keep a copy. Access tokens are short-lived and refreshed for you; you never manage one yourself.

How authentication works
least privilege
$ pxb whoami --json | jq -r '.content.token.scopes[]'
orders:read support:cases:read support:cases:write
$ pxb product list
403 GET products
Access token is missing required scope(s): products:read

Install it in one line.

Authenticate, pin a company, and your first call is about thirty seconds away.