sales
Magento CLI for CI
Use the Magento CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Manual OAuth token auth
Magento CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The Magento CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Magento CLI for CI
kosmokrator integrations:configure magento --set access_token="$MAGENTO_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call magento.magento_list_products '{"search_criteria":"example_search_criteria","page_size":1,"current_page":1}' --json Discovery Before Execution
Agents and scripts can inspect Magento docs and schemas before choosing a function.
kosmo integrations:docs magento --json
kosmo integrations:docs magento.magento_list_products --json
kosmo integrations:schema magento.magento_list_products --json
kosmo integrations:search "Magento" --json
kosmo integrations:list --json Useful Magento CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
magento.magento_list_products | Read | search_criteria, page_size, current_page | List products from the Magento catalog. Returns a list of products with support for search criteria filtering and pagination. |
magento.magento_get_product | Read | sku | Get details of a specific Magento product by its SKU. Returns the full product object including attributes, pricing, and stock information. |
magento.magento_create_product | Write | sku, name, price, attribute_set_id, type_id, weight, description, short_description, visibility, status | Create a new product in the Magento catalog. Requires SKU, name, price, and attribute set ID. Returns the created product object. |
magento.magento_list_orders | Read | search_criteria, page_size, current_page | List orders from the Magento store. Returns a list of orders with support for search criteria filtering and pagination. |
magento.magento_get_order | Read | order_id | Get details of a specific Magento order by its ID. Returns the full order object including items, addresses, payment, and totals. |
magento.magento_list_customers | Read | search_criteria, page_size, current_page | List customers from the Magento store. Returns a list of customers with support for search criteria filtering and pagination. |
magento.magento_get_current_user | Read | none | Verify Magento API connectivity and retrieve current user information. Useful as a health check to confirm the integration is properly configured. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.