CLI

growrk is the command-line interface for the GroWrk v4 API. It's a thin HTTP client over the same tool core that powers the REST API and the MCP server, so the CLI, curl, and an AI agent all reach the identical operations.

growrk CLI ──HTTP──▶ https://ai.growrk.com/v4/{resource} ──▶ GroWrk

Install

npm install -g @growrk/cli
growrk --version

The CLI requires Node.js ≥ 24.

Authenticate

Log in once with a grk_sk_ key (see Authentication & API keys for how to mint one):

# Interactive: prompts for the API key and an account name
growrk auth login

# Non-interactive
growrk auth login --api-key grk_sk_your_key_here --environment prod --name production

# Show the resolved identity + access for the active key
growrk auth status

# Remove a stored account
growrk auth logout --name production

Credentials resolve in this order: the --api-key flag → the GROWRK_API_KEY environment variable → the active account in ~/.growrk/config.yml (multiple named accounts are supported).

Commands

Commands are grouped by resource: growrk <resource> <action> [id] [flags]. Flags are generated from the shared tool schema, so they always match the API. Run growrk <resource> <action> --help to see the exact flags for any action.

orders

growrk orders list --status shipped --limit 10       # GET  /v4/orders
growrk orders get <orderId>                           # GET  /v4/orders/:id
growrk orders create \                                # POST /v4/orders
  --order-type Deployment --employee-id emp_123 --product-ids prod_456
growrk orders history <orderId>                       # GET  /v4/orders/:id/history
growrk orders tracking <orderId>                      # GET  /v4/orders/:id/tracking
growrk orders sla <orderId>                           # GET  /v4/orders/:id/sla
growrk orders validate \                              # POST /v4/orders/validate
  --order-type Deployment --employee-id emp_123 --product-ids prod_456

# add-accessory takes the DEVICE that needs a charger (--product-id or
# --serial-number), not a charger SKU.
growrk orders add-accessory <orderId> --product-id prod_456            # POST /v4/orders/:id/accessories
growrk orders add-accessory <orderId> --serial-number C02XY1234ABC

# Catalog purchase. `items` is an array of objects, so it has no flag. Pass
# the whole body with --json (see "Structured input" below).
growrk orders purchase --json '{                       # POST /v4/orders/purchase
  "orderType": "Purchase for Employee",
  "employeeId": "emp_123",
  "items": [{ "itemId": "item_789", "quantity": 1, "country": "US" }]
}'

employees

growrk employees list                                 # GET   /v4/employees
growrk employees get <employeeId>                     # GET   /v4/employees/:id
growrk employees create \                             # POST  /v4/employees
  --display-name "Jane Doe" --email jane@example.com --country US
growrk employees update <employeeId> --job-title "Staff Engineer"  # PATCH /v4/employees/:id
growrk employees devices <employeeId>                 # GET   /v4/employees/:id/devices
growrk employees countries                            # GET   /v4/employees/countries

teams

growrk teams list                                     # GET   /v4/teams
growrk teams get <teamId>                             # GET   /v4/teams/:id
growrk teams create --name "Platform Engineering"     # POST  /v4/teams
growrk teams update <teamId> --name "Core Platform"   # PATCH /v4/teams/:id

Team names must be unique within the company. A duplicate exits non-zero with 409 Conflict.

inventory & devices

growrk inventory search --query macbook --in-stock    # GET /v4/inventory
growrk devices options --product-type Laptop          # GET /v4/devices/options
growrk devices suggestions --country DE               # GET /v4/devices/suggestions

products

growrk products get <productId>                       # GET  /v4/products/:id
growrk products add-pin --product-id prod_456 --pin-code 482913     # POST /v4/products/pin-code
growrk products add-pin --serial-number C02XY1234ABC --pin-code 482913

PINs are only accepted for device types that support one: Desktops, Laptops, Mobile, Tablet.

company

growrk company addresses                              # GET  /v4/company/addresses
growrk company add-address \                          # POST /v4/company/addresses
  --alias "Madrid office" --address "Calle de Alcalá 45" \
  --city Madrid --zip-code 28014 --country ES \
  --contact-name "Ana García" --contact-email ana@example.com --phone +34600000000

me

growrk me                                             # GET /v4/me: your identity + access

Structured input

Flags are derived from the shared tool schema, so a field's name tells you its flag: camelCase becomes kebab-case (serialNumber--serial-number, zipCode--zip-code). Scalars, enums, and arrays of strings or numbers all map to flags directly.

Fields that are objects, or arrays of objects, have no flag equivalent. Pass those with --json, which takes the whole request body:

growrk orders purchase --json '{"orderType":"Purchase for Inventory","items":[{"itemId":"item_789","quantity":5,"country":"US"}]}'

In practice this affects the purchase items list and the richer orders create fields (dispositions, legalHold, pickupWindow). Everything else is flaggable.

Global options

FlagDescription
--api-key <key>Override the stored API key
--api-url <url>Override the API base URL
--environment <env>Target environment (prod, next, danielgdev, local, io)
--format <fmt>Output format: json, table, text (default: table)
--allow-localhostAllow http://127.0.0.1 for local development
--helpShow help
--versionShow the CLI version

Environments

NameURLNotes
prodhttps://ai.growrk.comDefault
iohttps://io.growrk.comAlias of prod (pre-cutover)
nexthttps://growrk-next-io.web.appStaging
danielgdevhttps://growrk-danielgdev-io.web.appDev
localhttp://127.0.0.1:3001Requires --allow-localhost
growrk orders list --environment next

Output formats

FormatDescription
tableAligned columns for the terminal (default)
jsonFull JSON envelope with ok, data, and meta
textPlain text, suitable for piping

The json format is handy for scripting. Pipe it into jq:

growrk orders list --format json | jq '.data.orders[0].id'

The same API, three ways

The CLI is one of three surfaces over the same tool core:

# REST
curl https://ai.growrk.com/v4/orders -H "X-API-KEY: grk_sk_your_key_here"

# CLI
growrk orders list

# MCP (Streamable HTTP): OAuth 2.1, or X-API-KEY
#   POST https://ai.growrk.com/mcp