← all projects

Shopify AI Descriptions

A CLI that turns a CSV of products into SEO-aware Shopify descriptions and pushes them via the Admin API.

2026livepythonllmshopifyautomation

Problem

Shopify catalogue work has a long tail of products with terse or missing descriptions. Writing each one by hand is expensive; relying on raw LLM output is risky (off-brand voice, no SEO grounding, no review step before it lands on the storefront). The realistic workflow is somewhere in between: generate good drafts in bulk, then push only what's been reviewed.

Approach

A Python CLI with two clear modes.

  • Generate. Reads a CSV of products with title and tag keywords, calls a configurable LLM via OpenRouter (default openai/gpt-4o-mini), and writes a new CSV with an enriched description column. Prompts are tuned to weave the tag keywords naturally rather than stuffing them. --dry-run runs the full pipeline without spending API credits; --model swaps providers without touching code.
  • Push. Updates product descriptions in Shopify via the Admin REST API. --preview shows a diff per product before writing; --batch-size and --batch-sleep keep the request rate inside store limits. Missing SHOPIFY_TOKEN puts the command into mock mode so nothing leaves the machine.

A Rich-powered progress bar reports per-row state so a bulk run reads as a single coherent operation rather than a wall of log lines.

Outcome

A one-command path from a spreadsheet to live storefront descriptions, with the safety rails (dry-run, preview diff, batch throttling, mock mode) that make it usable on a real store without writing a wrapper around it first.