KosmoKrator

sales

Shopify CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Shopify CLI Setup

Shopify can be configured headlessly with `kosmokrator integrations:configure shopify`.

# 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 shopify --set access_token="$SHOPIFY_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor shopify --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 SHOPIFY_ACCESS_TOKEN Secret secret yes Access Token
base_url SHOPIFY_BASE_URL URL url no Base URL

Call Shopify Headlessly

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

kosmo integrations:call shopify.shopify_list_products '{
  "limit": 1,
  "status": "example_status",
  "product_type": "example_product_type",
  "vendor": "example_vendor",
  "collection_id": "example_collection_id",
  "page_info": "example_page_info"
}' --json

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

kosmo integrations:shopify shopify_list_products '{
  "limit": 1,
  "status": "example_status",
  "product_type": "example_product_type",
  "vendor": "example_vendor",
  "collection_id": "example_collection_id",
  "page_info": "example_page_info"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs shopify --json
kosmo integrations:docs shopify.shopify_list_products --json
kosmo integrations:schema shopify.shopify_list_products --json
kosmo integrations:search "Shopify" --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 Shopify.

shopify.shopify_list_products

Read read

List products from the Shopify store. Supports filtering by status, product type, vendor, and pagination.

Parameters
limit, status, product_type, vendor, collection_id, page_info

Generic CLI call

kosmo integrations:call shopify.shopify_list_products '{"limit":1,"status":"example_status","product_type":"example_product_type","vendor":"example_vendor","collection_id":"example_collection_id","page_info":"example_page_info"}' --json

Provider shortcut

kosmo integrations:shopify shopify_list_products '{"limit":1,"status":"example_status","product_type":"example_product_type","vendor":"example_vendor","collection_id":"example_collection_id","page_info":"example_page_info"}' --json

shopify.shopify_get_product

Read read

Get a single product from the Shopify store by its ID. Returns full product details.

Parameters
id

Generic CLI call

kosmo integrations:call shopify.shopify_get_product '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:shopify shopify_get_product '{"id":"example_id"}' --json

shopify.shopify_create_product

Write write

Create a new product in the Shopify store. Requires a title. Supports description, vendor, product type, tags, and status.

Parameters
title, body_html, vendor, product_type, status, tags, published

Generic CLI call

kosmo integrations:call shopify.shopify_create_product '{"title":"example_title","body_html":"example_body_html","vendor":"example_vendor","product_type":"example_product_type","status":"example_status","tags":"example_tags","published":true}' --json

Provider shortcut

kosmo integrations:shopify shopify_create_product '{"title":"example_title","body_html":"example_body_html","vendor":"example_vendor","product_type":"example_product_type","status":"example_status","tags":"example_tags","published":true}' --json

shopify.shopify_list_orders

Read read

List orders from the Shopify store. Supports filtering by status, financial status, fulfillment status, and pagination.

Parameters
limit, status, financial_status, fulfillment_status, page_info

Generic CLI call

kosmo integrations:call shopify.shopify_list_orders '{"limit":1,"status":"example_status","financial_status":"example_financial_status","fulfillment_status":"example_fulfillment_status","page_info":"example_page_info"}' --json

Provider shortcut

kosmo integrations:shopify shopify_list_orders '{"limit":1,"status":"example_status","financial_status":"example_financial_status","fulfillment_status":"example_fulfillment_status","page_info":"example_page_info"}' --json

shopify.shopify_get_order

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call shopify.shopify_get_order '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:shopify shopify_get_order '{"id":"example_id"}' --json

shopify.shopify_list_customers

Read read

List customers from the Shopify store. Supports filtering by email or tag and pagination.

Parameters
limit, email, tag, page_info

Generic CLI call

kosmo integrations:call shopify.shopify_list_customers '{"limit":1,"email":"example_email","tag":"example_tag","page_info":"example_page_info"}' --json

Provider shortcut

kosmo integrations:shopify shopify_list_customers '{"limit":1,"email":"example_email","tag":"example_tag","page_info":"example_page_info"}' --json

shopify.shopify_get_current_user

Read read

Get the current shop info from Shopify. Use this to verify the API connection is working.

Parameters
none

Generic CLI call

kosmo integrations:call shopify.shopify_get_current_user '{}' --json

Provider shortcut

kosmo integrations:shopify shopify_get_current_user '{}' --json

Function Schemas

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

shopify.shopify_list_products

List products from the Shopify store. Supports filtering by status, product type, vendor, and pagination.

Operation
Read read
Schema command
kosmo integrations:schema shopify.shopify_list_products --json
ParameterTypeRequiredDescription
limit integer no Number of products to return per page (default: 50, max: 250).
status string no Filter by status: "active", "draft", or "archived".
product_type string no Filter by product type.
vendor string no Filter by vendor name.
collection_id string no Filter by collection ID.
page_info string no Cursor for pagination (from a previous response).

shopify.shopify_get_product

Get a single product from the Shopify store by its ID. Returns full product details.

Operation
Read read
Schema command
kosmo integrations:schema shopify.shopify_get_product --json
ParameterTypeRequiredDescription
id string yes The product ID.

shopify.shopify_create_product

Create a new product in the Shopify store. Requires a title. Supports description, vendor, product type, tags, and status.

Operation
Write write
Schema command
kosmo integrations:schema shopify.shopify_create_product --json
ParameterTypeRequiredDescription
title string yes Product title.
body_html string no Product description (HTML allowed).
vendor string no Product vendor.
product_type string no Product type (e.g., "Shirts", "Electronics").
status string no Product status: "active", "draft", or "archived".
tags string no Comma-separated tags (e.g., "cotton, summer").
published boolean no Whether the product is published (default: true).

shopify.shopify_list_orders

List orders from the Shopify store. Supports filtering by status, financial status, fulfillment status, and pagination.

Operation
Read read
Schema command
kosmo integrations:schema shopify.shopify_list_orders --json
ParameterTypeRequiredDescription
limit integer no Number of orders per page (default: 50, max: 250).
status string no Filter by order status: "open", "closed", "cancelled", or "any".
financial_status string no Filter by financial status: "pending", "paid", "partially_paid", "refunded", "voided".
fulfillment_status string no Filter by fulfillment status: "shipped", "partial", "unshipped", "any".
page_info string no Cursor for pagination (from a previous response).

shopify.shopify_get_order

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

Operation
Read read
Schema command
kosmo integrations:schema shopify.shopify_get_order --json
ParameterTypeRequiredDescription
id string yes The order ID.

shopify.shopify_list_customers

List customers from the Shopify store. Supports filtering by email or tag and pagination.

Operation
Read read
Schema command
kosmo integrations:schema shopify.shopify_list_customers --json
ParameterTypeRequiredDescription
limit integer no Number of customers per page (default: 50, max: 250).
email string no Filter by customer email address.
tag string no Filter by customer tag.
page_info string no Cursor for pagination (from a previous response).

shopify.shopify_get_current_user

Get the current shop info from Shopify. Use this to verify the API connection is working.

Operation
Read read
Schema command
kosmo integrations:schema shopify.shopify_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.