explaingit

shopify/ucp-cli

19TypeScriptAudience · developerComplexity · 3/5ActiveSetup · easy

TLDR

Shopify CLI that lets an AI agent search merchant catalogs, build carts, and complete checkouts using the open Universal Commerce Protocol with live schema discovery per merchant.

Mindmap

mindmap
  root((ucp-cli))
    Inputs
      Shopper profile
      Search query
      Merchant URL
    Outputs
      Catalog results
      Cart object
      Completed checkout
    Use Cases
      Agent product search
      Programmatic cart
      Agent checkout flow
    Tech Stack
      TypeScript
      Node.js
      UCP protocol
      npm

Things people build with this

USE CASE 1

Give a coding agent the ability to search a unified catalog of millions of merchants

USE CASE 2

Build a cart at a specific Shopify merchant and hand a continue URL to the buyer

USE CASE 3

Complete a checkout end to end with an agent and a user escalation hook for confirmation steps

USE CASE 4

Discover which UCP operations a merchant supports without depending on stale docs

Tech stack

TypeScriptNode.jsnpmUCP

Getting it running

Difficulty · easy Time to first run · 5min

Single npm install plus profile creation; live schema calls require network access to each merchant.

In plain English

This is a command-line tool from Shopify that gives an AI agent the ability to shop. It is built on top of something called the Universal Commerce Protocol, an open specification that any online merchant can implement so that AI agents can talk to their store in a consistent way. The CLI itself, called ucp, is installed once with npm and then exposes a set of subcommands that the agent can run. The README walks through a sixty-second tour. After install, you add the bundled skill to your agent and create a shopper profile. Then the agent can run ucp catalog search to look for a product, for example a particular keyboard, across what the README calls a unified global catalog of millions of merchants. Results come back as structured JSON, which the CLI can also render as a Markdown table. Each row includes a title, a price, a variant identifier, and a direct buy link. Once the agent picks a product, ucp cart create adds it to a cart at a specific merchant, identified by URL. The merchant returns the confirmed cart with pricing and a continue URL that can be opened in a real browser. There is then a checkout step, where the cart turns into a checkout object, the agent fills in fulfillment details, and finally calls ucp checkout complete. When the merchant requires the buyer to do something the agent cannot, the CLI calls a user-defined escalation hook, typically a command that opens the continue URL in the browser, then waits for the buyer to confirm. A recurring design point in the README is that the agent never relies on stale documentation. Every command has an --input-schema flag that makes a live network call to the merchant and returns the exact shape that operation accepts right now. There is also a discover command that asks the merchant which operations it supports. This way merchants can extend or deprecate their schemas without coordinated releases against the CLI. The README also explains the two scopes a command can have. Without the --business flag, queries hit a global catalog. With it, the call is scoped to a single merchant. Every response also carries a cta field with structured suggestions for the next command, so the agent does not have to memorize the flow.

Copy-paste prompts

Prompt 1
Install ucp-cli, add the bundled skill to my agent, and create a shopper profile for me
Prompt 2
Run ucp catalog search for a 60-percent mechanical keyboard under 150 dollars and render the results as a Markdown table
Prompt 3
Use ucp cart create at this merchant URL with the variant from row 2 of the last search
Prompt 4
Walk a full checkout for the current cart, including filling fulfillment details and calling the escalation hook to open the browser
Prompt 5
Run ucp discover on a merchant and show me which operations they support along with the live input schema for catalog search
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.