# Command line (Beta)

The API as commands you can type: developers try endpoints, scripts pipe `--json`, AI coding agents use it without any MCP setup. It only translates commands into gateway calls — **auth, authorization and rate limits stay in the gateway**.

> The CLI is in beta: Commands follow the capability catalog and may still change; tell your contact if something breaks.

## Install

macOS / Linux:

```bash
curl -fsSL https://connect.everugg.net.au/cli/install.sh | sh
```

Windows (PowerShell):

```powershell
irm https://connect.everugg.net.au/cli/install.ps1 | iex
```

A single binary, no Node or Python needed. Then run `ever --help`. The gateway URL is written to the local config; change it with `ever config base <url>`.

## Three steps

Start with the public sandbox (demo data, real stock is never touched):

```bash
ever login --sandbox
ever whoami
ever stock changes AU --since 0
```

Then your own channel (the secret is only sent to exchange for a token; it is kept in a 0600 config file, `--no-save-secret` to skip):

```bash
ever login --channel 100780
ever stock sku AU OB0021611
ever order create --file order.json --confirm
ever stock changes AU --since 51204 --json | jq '.data | length'
```

Writes (orders etc.) are previewed by default; add `--confirm` to send, and they are **always drafts** until someone confirms them in the ERP. `--json` prints the raw envelope for `jq` and scripts.

## For AI coding agents

Claude Code, Cursor and friends already live in a terminal: with `ever` installed they can look up stock and read the docs on their own. `ever tools --json` lists what you may call (trimmed to your permissions, same names as MCP); `ever docs <tool>` prints that endpoint as Markdown.

```bash
ever tools --json
ever docs stock_changes
ever call stock_changes --warehouse_code AU --since 0 --json
```

## Commands

Commands come from the gateway **capability catalog** (`/tools.json`), fetched at start and cached locally for an hour — when the catalog changes the CLI needs no re-release. `ever call <tool> --param value`; the common ones have shortcuts: `ever stock changes AU --since 0`, `ever stock sku AU OB0021611`, `ever order get <order_id>`.

- `ever call warehouse_list` — Warehouse list: code, name, country, owning company, aggregate view or physical, ships or not, currency
- `ever call stock_list` — Stock in one warehouse (wholesale / retail price, available qty)
- `ever call stock_changes` — Incremental stock changes for a warehouse: pass since=the version you got last time and only rows changed after it come back; has_more=true → call again with the new version; needs_full_sync=true → since is too old, do one full pull
- `ever call product_list` — Products in one warehouse (deduplicated by style code, with prices)
- `ever call product_get` — Product detail by style code: images / description / materials / prices plus every variant (skus)
- `ever call sku_get` — Single variant detail by SKU (one object)
- `ever call dropship_product_list` — Products on sale in the drop-ship system (paged)
- `ever call price_list` — Your channel's product prices (paged)
- `ever call shipping_method_list` — Shipping methods available to your account (pickup / delivered by Ever / courier…)
- `ever call carrier_list` — Carriers your account can choose from; carrier_id is optional on a wholesale order
- `ever call address_list` — Your delivery address book as kept in OMS
- `ever call order_create` (write) — Create a wholesale order
- `ever call feed_products` — Build a product feed (Google Merchant spec, doubles as bulk export)
- `ever call feed_status` — Check where the product feed build stands: building / done / failed, with the reason and the latest artifact stats
- `ever call order_list` — Your channel's wholesale orders within a date range
- `ever call order_get` — Wholesale order detail by order id (own channel only)
- `ever call order_cancel` (write) — Void a wholesale order and release the stock it was holding
- `ever call dropship_order_cancel` (write) — Void a drop-ship line and release the stock it was holding
- `ever call order_allocation_preview` (write) — Wholesale allocation preview: line by line, how much can be allocated, how much is short (quantity_owed), when pre-sale batches arrive, plus the amount payable and whether your balance covers it
- `ever call order_submit` (write) — Submit a wholesale order (lines can no longer be changed)
- `ever call dropship_order_allocation_preview` (write) — Drop-ship pre-allocation: send a batch of serial numbers and get, line by line, whether it can be filled, how much is short and what it costs
- `ever call dropship_order_submit` (write) — Submit drop-ship lines (no changes afterwards)
- `ever call dropship_order_allocation_cancel` (write) — Release the stock this drop-ship line is holding after a pre-allocation you decided not to submit
- `ever call dropship_order_create` (write) — Create a drop-ship order (one SKU per order)
- `ever call dropship_order_list` — Your channel's drop-ship orders: by warehouse + date range, or find one by client_order_number / serial_number
- `ever call dropship_order_summary` — Drop-ship order summary list (paged)
- `ever call dropship_order_get` — Drop-ship order detail by id (own channel only)
- `ever call shipment_list` — Your channel's shipments
- `ever call shipment_get` — Shipment detail by id (own channel only)
- `ever call shipment_tracking` — Tracking events (Auexpress)
- `ever call reservation_list` — Your channel's stock reservations (locked stock)
- `ever call reservation_get` — Reservation detail by id (own channel only)
- `ever call balance_list` — Your account balances (Australia / China / New Zealand — whichever you have)
- `ever call transaction_list` — Transactions (top-up / payment / refund), each with the account balance after it; amount_total is the total for this page
- `ever call bill_list` — Monthly bills by warehouse and month, including whether they are paid
- `ever call refund_list` — Refund notes (wholesale / drop-ship) with review status and reason
- `ever call freight_bill_list` — Freight notes (carrier, tracking number, cartons, amount)
- `ever call cart_get` — One account's cart
- `ever call cart_put_items` (write) — Add / update cart items (idempotent)
- `ever call cart_delete_item` (write) — Remove one SKU from the cart
- `ever call cart_delete_product` (write) — Remove every SKU of one style from the cart

Any endpoint can be called raw with `ever api <METHOD> <path> --query k=v --body <json>`; `ever whoami` shows identity and permissions; `ever login --sandbox` switches back to demo data.

## Manual download

- https://connect.everugg.net.au/cli/dl/ever-linux-x64
- https://connect.everugg.net.au/cli/dl/ever-darwin-arm64
- https://connect.everugg.net.au/cli/dl/ever-linux-arm64
- https://connect.everugg.net.au/cli/dl/ever-windows-x64.exe
- https://connect.everugg.net.au/cli/dl/ever-darwin-x64

---
Markdown source: https://connect.everugg.net.au/cli.md?lang=en · Web page: https://connect.everugg.net.au/cli?lang=en
