KosmoKrator

sales

WooCommerce CLI for AI Agents

Use the WooCommerce CLI from KosmoKrator to call WooCommerce tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Bearer token auth

WooCommerce CLI Setup

WooCommerce can be configured headlessly with `kosmokrator integrations:configure woocommerce`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure woocommerce --set access_token="$WOOCOMMERCE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor woocommerce --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token WOOCOMMERCE_ACCESS_TOKEN Secret secret yes Access Token
base_url WOOCOMMERCE_BASE_URL URL url no Base URL

Call WooCommerce Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call woocommerce.woocommerce_list_products '{
  "per_page": 1,
  "page": 1,
  "search": "example_search",
  "status": "example_status",
  "category": "example_category",
  "sku": "example_sku",
  "orderby": "example_orderby",
  "order": "example_order"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:woocommerce woocommerce_list_products '{
  "per_page": 1,
  "page": 1,
  "search": "example_search",
  "status": "example_status",
  "category": "example_category",
  "sku": "example_sku",
  "orderby": "example_orderby",
  "order": "example_order"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs woocommerce --json
kosmo integrations:docs woocommerce.woocommerce_list_products --json
kosmo integrations:schema woocommerce.woocommerce_list_products --json
kosmo integrations:search "WooCommerce" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to WooCommerce.

woocommerce.woocommerce_list_products

Read read

List products from the WooCommerce catalog. Supports pagination, filtering by name or SKU, and including variants/images.

Parameters
per_page, page, search, status, category, sku, orderby, order

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_list_products '{"per_page":1,"page":1,"search":"example_search","status":"example_status","category":"example_category","sku":"example_sku","orderby":"example_orderby","order":"example_order"}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_list_products '{"per_page":1,"page":1,"search":"example_search","status":"example_status","category":"example_category","sku":"example_sku","orderby":"example_orderby","order":"example_order"}' --json

woocommerce.woocommerce_get_product

Read read

Get a single product from the WooCommerce catalog by its ID. Returns full product details.

Parameters
id

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_get_product '{"id":1}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_get_product '{"id":1}' --json

woocommerce.woocommerce_create_product

Write write

Create a new product in the WooCommerce catalog. Requires name and regular_price. Supports type (simple, grouped, external, variable), SKU, description, and more.

Parameters
name, regular_price, type, sku, description, short_description, weight, categories, manage_stock, stock_quantity, status, images

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_create_product '{"name":"example_name","regular_price":"example_regular_price","type":"example_type","sku":"example_sku","description":"example_description","short_description":"example_short_description","weight":"example_weight","categories":"example_categories"}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_create_product '{"name":"example_name","regular_price":"example_regular_price","type":"example_type","sku":"example_sku","description":"example_description","short_description":"example_short_description","weight":"example_weight","categories":"example_categories"}' --json

woocommerce.woocommerce_list_orders

Read read

List orders from the WooCommerce store. Supports filtering by status, customer, and pagination.

Parameters
per_page, page, status, customer, after, before, orderby, order

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_list_orders '{"per_page":1,"page":1,"status":"example_status","customer":1,"after":"example_after","before":"example_before","orderby":"example_orderby","order":"example_order"}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_list_orders '{"per_page":1,"page":1,"status":"example_status","customer":1,"after":"example_after","before":"example_before","orderby":"example_orderby","order":"example_order"}' --json

woocommerce.woocommerce_get_order

Read read

Get a single order from the WooCommerce store by its ID. Returns full order details including line items and totals.

Parameters
id

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_get_order '{"id":1}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_get_order '{"id":1}' --json

woocommerce.woocommerce_list_customers

Read read

List customers from the WooCommerce store. Supports filtering by name or email and pagination.

Parameters
per_page, page, search, orderby, order

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_list_customers '{"per_page":1,"page":1,"search":"example_search","orderby":"example_orderby","order":"example_order"}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_list_customers '{"per_page":1,"page":1,"search":"example_search","orderby":"example_orderby","order":"example_order"}' --json

woocommerce.woocommerce_get_current_user

Read read

Get the system status from WooCommerce. Use this to verify the API connection is working and retrieve store information.

Parameters
none

Generic CLI call

kosmo integrations:call woocommerce.woocommerce_get_current_user '{}' --json

Provider shortcut

kosmo integrations:woocommerce woocommerce_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

woocommerce.woocommerce_list_products

List products from the WooCommerce catalog. Supports pagination, filtering by name or SKU, and including variants/images.

Operation
Read read
Schema command
kosmo integrations:schema woocommerce.woocommerce_list_products --json
ParameterTypeRequiredDescription
per_page integer no Number of products to return per page (default: 10, max: 100).
page integer no Page number for pagination (default: 1).
search string no Search products by name or description.
status string no Filter by product status: "publish", "draft", "pending", "private", or "trash".
category string no Filter by category ID.
sku string no Filter by SKU.
orderby string no Sort collection by field (e.g., "date", "id", "title", "slug", "price").
order string no Sort direction: "asc" or "desc".

woocommerce.woocommerce_get_product

Get a single product from the WooCommerce catalog by its ID. Returns full product details.

Operation
Read read
Schema command
kosmo integrations:schema woocommerce.woocommerce_get_product --json
ParameterTypeRequiredDescription
id integer yes The product ID.

woocommerce.woocommerce_create_product

Create a new product in the WooCommerce catalog. Requires name and regular_price. Supports type (simple, grouped, external, variable), SKU, description, and more.

Operation
Write write
Schema command
kosmo integrations:schema woocommerce.woocommerce_create_product --json
ParameterTypeRequiredDescription
name string yes Product name.
regular_price string yes Base price (e.g., "29.99").
type string no Product type: "simple", "grouped", "external", or "variable" (default: "simple").
sku string no Unique SKU for the product.
description string no Product description (HTML allowed).
short_description string no Short product description.
weight string no Weight of the product.
categories array no Array of category objects with "id" keys.
manage_stock boolean no Whether to enable stock management (default: false).
stock_quantity integer no Stock level (when manage_stock is true).
status string no Product status: "publish", "draft", "pending", or "private" (default: "publish").
images array no Array of image objects with "src" key.

woocommerce.woocommerce_list_orders

List orders from the WooCommerce store. Supports filtering by status, customer, and pagination.

Operation
Read read
Schema command
kosmo integrations:schema woocommerce.woocommerce_list_orders --json
ParameterTypeRequiredDescription
per_page integer no Number of orders per page (default: 10, max: 100).
page integer no Page number for pagination (default: 1).
status string no Filter by order status: "pending", "processing", "on-hold", "completed", "cancelled", "refunded", or "failed".
customer integer no Filter by customer ID.
after string no Limit response to orders created after this date (ISO 8601, e.g., "2025-01-01T00:00:00").
before string no Limit response to orders created before this date (ISO 8601).
orderby string no Sort collection by field (e.g., "date", "id", "total").
order string no Sort direction: "asc" or "desc".

woocommerce.woocommerce_get_order

Get a single order from the WooCommerce store by its ID. Returns full order details including line items and totals.

Operation
Read read
Schema command
kosmo integrations:schema woocommerce.woocommerce_get_order --json
ParameterTypeRequiredDescription
id integer yes The order ID.

woocommerce.woocommerce_list_customers

List customers from the WooCommerce store. Supports filtering by name or email and pagination.

Operation
Read read
Schema command
kosmo integrations:schema woocommerce.woocommerce_list_customers --json
ParameterTypeRequiredDescription
per_page integer no Number of customers per page (default: 10, max: 100).
page integer no Page number for pagination (default: 1).
search string no Search by customer name or email.
orderby string no Sort collection by field (e.g., "id", "name", "registered_date").
order string no Sort direction: "asc" or "desc".

woocommerce.woocommerce_get_current_user

Get the system status from WooCommerce. Use this to verify the API connection is working and retrieve store information.

Operation
Read read
Schema command
kosmo integrations:schema woocommerce.woocommerce_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.