WARP CLI

WARP CLI v0.1.2

A command-line tool for managing freight shipments through the WARP API. Get quotes, book shipments, track deliveries, view invoices and documents — all from your terminal.

Tip

If you prefer a REST API, check out the Freight API Documentation.

Installation

📦

npm

Requires Node.js 18 or later.

$ npm install -g @wearewarp.com/cli
🍺

Homebrew

Standalone binary — no Node.js required.

$ brew tap wearewarp/warp && brew install warp-cli

Verify the installation:

$ warp --version
@wearewarp.com/cli/0.1.2

Supported Platforms (Homebrew)

PlatformArchitecture
macOSApple Silicon (ARM64)
macOSIntel (x64)
Linuxx64

Quick Start

Get up and running in under a minute:

1. Authenticate with your API key

$ warp login --api-key YOUR_API_KEY

2. Get a shipping quote

$ warp quote \
    --pickup-date 2026-04-01 \
    --pickup-zip 90210 \
    --delivery-zip 10001 \
    --item-height 48 --item-length 48 --item-width 40 \
    --item-size-unit IN \
    --item-weight 500 --item-weight-unit lbs \
    --item-qty 1

3. Book the shipment

$ warp book --quote-id <QUOTE_ID> --from-file booking.json

4. Track your shipment

$ warp track <TRACKING_NUMBER>

5. View all shipments

$ warp shipments

Authentication

The CLI supports two authentication methods. An API key can be requested from the WARP Engineering team.

Method 1: API Key

Provide your API key directly. The CLI validates it before storing.

$ warp login --api-key YOUR_API_KEY
# ✓ Authenticated successfully

Method 2: Browser Login

Opens the WARP Customer Portal in your browser for a device-based login flow.

$ warp login --browser
# Opens browser → log in → CLI receives API key automatically

Interactive Login

Run warp login without flags to choose the method interactively.

Note

Your API key is stored securely at ~/.config/warp-cli/config.json with restricted permissions (0600). Commands that require authentication will fail with a clear error if you are not logged in.

Public Commands (no auth required)

login, logout, whoami, help, config get, config set, config reset

Commands Reference

All commands are invoked as warp <command> [options].

warp login — Authenticate with the WARP API

Authenticate using an API key or browser-based login. Supports three modes: interactive (default), API key flag, or browser flag.

FlagTypeDescription
--api-keystringoptionalAPI key to authenticate with
--browserbooleanoptionalLogin via browser (opens customer portal)

Direct API key:

$ warp login --api-key sk_live_abc123

Browser-based auth:

$ warp login --browser

Interactive (choose method):

$ warp login
warp logout — Remove stored credentials

Clears the stored API key from the config file. No flags required.

$ warp logout
# ✓ Logged out successfully
warp whoami — Show current auth status

Displays the current authentication status, masked API key, and configured endpoint.

$ warp whoami
Endpoint: https://gw.wearewarp.com/api/v1
API Key:  sk_li****c123
Status:   Authenticated
warp quote — Get a freight shipping quote

Request a shipping quote. Supports interactive prompts, full flags, or JSON file input.

Flags

FlagTypeDescription
--pickup-datestringrequiredPickup date (YYYY-MM-DD)
--pickup-zipstringrequiredPickup zipcode
--pickup-countrystringoptionalPickup country code (default: US)
--delivery-zipstringrequiredDelivery zipcode
--delivery-countrystringoptionalDelivery country code (default: US)
--item-heightnumberrequiredItem height
--item-lengthnumberrequiredItem length
--item-widthnumberrequiredItem width
--item-size-unitIN | FTrequiredSize unit (inches or feet)
--item-weightnumberrequiredItem total weight
--item-weight-unitlbs | kgsrequiredWeight unit
--item-qtynumberrequiredItem quantity
--item-namestringoptionalItem name
--shipment-typeFTL | LTLoptionalShipment type (auto-detected if omitted)
--vehicle-typestringoptionalVehicle type code (auto-detected if omitted)
--from-filepathoptionalPath to JSON request file
-o, --outputstringoptionalOutput format: table, json, csv

Vehicle Type Codes

CARGO_VAN SMALL_STRAIGHT LARGE_STRAIGHT FLATBED DRY_VAN_48 DRY_VAN_53 REEFER BOX_TRUCK

Example

$ warp quote \
    --pickup-date 2026-04-01 \
    --pickup-zip 90210 \
    --delivery-zip 10001 \
    --item-height 48 --item-length 48 --item-width 40 \
    --item-size-unit IN \
    --item-weight 500 --item-weight-unit lbs \
    --item-qty 1 \
    --shipment-type LTL \
    -o json

Response

{
  "quote_id": "59120da4-c844-4502-a468-cca8e4018bd5",
  "price": {
    "amount": 1000,
    "currency_code": "USD"
  },
  "charges": [
    {
      "code": "TOTAL",
      "description": "Total rate",
      "amount": 1000
    }
  ],
  "expiration_time_utc": 1529107809,
  "status": "ACCEPT",
  "shipmentType": "LTL"
}
warp book — Book a shipment from a quote

Book a shipment using a previous quote ID. Supports interactive prompts, full flags, or JSON file input. When a --quote-id is provided, the CLI fetches quote details to pre-fill item information.

Flags

FlagTypeDescription
--quote-idstringrequiredQuote ID from a previous quote
--from-filepathoptionalJSON file with booking details
--pickup-contactstringrequiredPickup contact name
--pickup-phonestringrequiredPickup contact phone
--pickup-emailstringoptionalPickup contact email
--pickup-streetstringrequiredPickup street address
--pickup-citystringrequiredPickup city
--pickup-statestringrequiredPickup state
--pickup-zipstringrequiredPickup zipcode
--pickup-window-fromstringrequiredPickup window start (ISO datetime)
--pickup-window-tostringrequiredPickup window end (ISO datetime)
--pickup-instructionsstringoptionalPickup special instructions
--delivery-contactstringrequiredDelivery contact name
--delivery-phonestringrequiredDelivery contact phone
--delivery-emailstringoptionalDelivery contact email
--delivery-streetstringrequiredDelivery street address
--delivery-citystringrequiredDelivery city
--delivery-statestringrequiredDelivery state
--delivery-zipstringrequiredDelivery zipcode
--delivery-window-fromstringrequiredDelivery window start (ISO datetime)
--delivery-window-tostringrequiredDelivery window end (ISO datetime)
--delivery-instructionsstringoptionalDelivery special instructions
--ref-numstringoptionalYour reference number
-o, --outputstringoptionalOutput format: table, json, csv
Tip

For bookings with many fields, use --from-file with a JSON file. See JSON File Input.

Example

$ warp book --quote-id 59120da4-c844-... --from-file booking.json

Response

{
  "message": "Shipment booked successfully",
  "trackingNumber": "WARP-1234567",
  "orderNumber": "ORD-001234",
  "orderId": "6612abc...",
  "shipmentId": "6612def...",
  "shipmentNumber": "SHP-001234"
}
warp track <trackingNumbers> — Track shipments

Track one or more shipments by their tracking numbers (comma-separated).

ArgumentTypeDescription
trackingNumbersstringrequiredComma-separated tracking numbers
-o, --outputstringoptionalOutput format: table, json, csv

Single shipment:

$ warp track WARP-1234567

Multiple shipments:

$ warp track WARP-1234567,WARP-7654321
warp shipments — List all shipments

Retrieve a list of all your freight shipments.

FlagTypeDescription
-o, --outputstringoptionalOutput format: table, json, csv
$ warp shipments
$ warp shipments -o json
warp events <shipmentId> — View shipment events

View the tracking event history for a specific shipment.

ArgumentTypeDescription
shipmentIdstringrequiredThe shipment ID
-o, --outputstringoptionalOutput format: table, json, csv
$ warp events 6612abc123def456
warp invoice <orderId> — View order invoice

Display invoice details for a specific order.

ArgumentTypeDescription
orderIdstringrequiredThe order ID
-o, --outputstringoptionalOutput format: table, json, csv
$ warp invoice 6612abc123def456
warp documents <orderId> — List order documents

Retrieve documents (BOL, POD, etc.) associated with an order.

ArgumentTypeDescription
orderIdstringrequiredThe order ID
-o, --outputstringoptionalOutput format: table, json, csv
$ warp documents 6612abc123def456
warp quote-history — View past quotes

Retrieve your quote history.

FlagTypeDescription
-o, --outputstringoptionalOutput format: table, json, csv
$ warp quote-history
$ warp quote-history -o csv
warp config — Manage CLI configuration

View and manage CLI settings.

config get

Display the current configuration (endpoint, output format, auth status, config file path).

$ warp config get

config set <key> <value>

Set a configuration value.

KeyValid ValuesDescription
endpointAny URL or defaultAPI base URL
outputtable, json, csvDefault output format
$ warp config set endpoint https://stg.wearewarp.com/api/v1
$ warp config set output json

config reset

Reset endpoint and output format to defaults. Your API key is preserved.

$ warp config reset

Output Formats

All freight commands support the -o / --output flag with three formats:

FormatDescription
tableHuman-readable colored table (default)
jsonRaw JSON — ideal for scripting and piping
csvComma-separated values for spreadsheets
$ warp shipments -o json
$ warp shipments -o csv > shipments.csv
$ warp quote-history -o json | jq '.[] | .quote_id'

JSON File Input

For complex requests (especially bookings), use --from-file to provide a JSON request body instead of individual flags.

Quote Request Example

Create a file quote-request.json:

{
  "pickupDate": "2026-04-01",
  "pickupInfo": { "zipcode": "90210" },
  "deliveryInfo": { "zipcode": "10001" },
  "listItems": [
    {
      "name": "Palletized Goods",
      "height": 48,
      "length": 48,
      "width": 40,
      "sizeUnit": "IN",
      "totalWeight": 500,
      "weightUnit": "lbs",
      "quantity": 2,
      "stackable": false
    }
  ],
  "shipmentType": "LTL"
}
$ warp quote --from-file quote-request.json

Booking Request Example

Create a file booking.json:

{
  "pickupInfo": {
    "contactName": "John Smith",
    "contactPhone": "555-0100",
    "contactEmail": "john@example.com",
    "address": {
      "street": "123 Warehouse Ave",
      "city": "Los Angeles",
      "state": "CA",
      "zipcode": "90210"
    },
    "windowTime": {
      "from": "2026-04-01T08:00:00Z",
      "to": "2026-04-01T17:00:00Z"
    },
    "instructions": "Dock 3, call on arrival"
  },
  "deliveryInfo": {
    "contactName": "Jane Doe",
    "contactPhone": "555-0200",
    "address": {
      "street": "456 Distribution Blvd",
      "city": "New York",
      "state": "NY",
      "zipcode": "10001"
    },
    "windowTime": {
      "from": "2026-04-05T08:00:00Z",
      "to": "2026-04-05T17:00:00Z"
    }
  },
  "refNum": "PO-2026-001"
}
$ warp book --quote-id 59120da4-c844-... --from-file booking.json

Configuration

Configuration is stored at ~/.config/warp-cli/config.json with restricted file permissions (0600).

Config Schema

{
  "apiKey": "sk_live_...",
  "endpoint": "https://gw.wearewarp.com/api/v1",
  "outputFormat": "table"
}
KeyDefaultDescription
apiKeyYour WARP API key (set via warp login)
endpointhttps://gw.wearewarp.com/api/v1API base URL
outputFormattableDefault output format for all commands

Environments

Production
https://gw.wearewarp.com/api/v1
Staging
https://stg.wearewarp.com/api/v1

Switch environments using config set:

Switch to staging:

$ warp config set endpoint https://stg.wearewarp.com/api/v1

Switch back to production:

$ warp config set endpoint default
Warning

Staging and production use separate API keys. After switching environments, you may need to re-authenticate with warp login.

Error Handling

The CLI provides clear error messages for common failures:

HTTP StatusCodeDescription
400required_field_missingRequired fields are missing from the request
400invalid_field_dataInvalid field data provided
403request_unauthorizedAuthenticated but lacks authorization for this resource
429rate_limit_exceededToo many requests — retry after cooldown
500internal_server_errorServer-side error

Automatic Retry

The CLI automatically retries requests on 429 (rate limit) and 5xx (server errors) with exponential backoff, up to 3 retries. The Retry-After header is respected when present.

Request Timeout

All requests have a 30-second timeout. If the server does not respond within this window, the request is aborted.

Need Help?

Contact api-support@wearewarp.com for API key requests and technical support.

Full REST API documentation is available at /docs/freight.

© 2026 WARP — wearewarp.com