PageStaxHelp
Browse all articles

Developers and agencies

The psx CLI quick start

Sign in, read your store, build a page, check it, and push it live from the terminal.

psx is PageStax's command-line tool. Every command writes exactly what the visual editor would, so a page built with psx opens and edits normally in the editor. It is made for developers, agencies and AI agents; run it from a checkout of the PageStax repository (./bin/psx).

Every command accepts --json and prints a structured result — { ok, data, summary }, plus an error with a code when it fails. psx help lists every command and psx help <command> prints its flags. You can write psx pages list or psx pages.list.

1. Sign in#

Create an agent token first (Agent tokens), then:

pbpaste | psx login --shop your-store.myshopify.com --url https://app.pagestax.com
psx login --check     # is the token accepted?
psx whoami            # which store, which kind of token — never the value

2. Read before you write#

psx pages list --json                          # every page and its publish status
psx pages show --page "Trail Jacket" --content --json  # sections in order, with keys and text
psx templates list                             # templates for new pages
psx sections list --category faq               # the section library
psx product list --query "tag:winter"          # Shopify product search
psx live pending                               # saved, but not live yet

Pages, sections and products accept a name as well as an id. An ambiguous name is refused with the candidates listed, never guessed.

3. Build a page#

psx compose --product 12345 --brief "Cover the benefits, the reviews and an FAQ."
psx compose --kind home --brief "…"            # a home page
psx pages create --name "Spring drop" --template <id>

4. Many edits in one go#

Put several edits to one page in a file and apply them together with batch — one write, all or nothing:

psx batch --page "Trail Jacket" --ops edits.json --opId jacket-copy-1

Each op is set, add, move or remove. If any op is invalid, nothing is written and every failing op is listed.

5. Look at it#

psx pages render --page "Trail Jacket" --out ./render/jacket

This renders the draft the way a shopper would see it, at 1440 px and 390 px, saving screenshots and flagging problems such as a buy box with no visible Add to Cart. It needs Google Chrome on your computer.

6. Make it live#

psx pages publish --page "Trail Jacket" --confirm
psx live pending
psx live push --ids offer-abc,journey-def --confirm

Six commands change what shoppers see — pages publish, pages unpublish, offer go-live, journey turn-on, test start and live push — and each requires --confirm. live push also needs --ids (or --all, on purpose).

Retries and safety#

Every write carries an idempotency key; pass --opId <key> to reuse one, and a retried command replays its first answer instead of writing twice. If the editor is open on the same page, psx merges with it rather than overwriting.

See the psx command reference for every command.

Still stuck? Contact support — include your store address and what you were doing.