@solverhood/headless
v1.0.4
Published
The complete CLI toolkit for headless Shopify storefronts
Readme
@solverhood/headless
Solverhood Headless CLI toolkit for building headless Shopify storefronts with Next.js. Scaffold UI components and Shopify integration directly into your project.
Quick Start
# Create a new project
pnpm dlx @solverhood/headless init --name my-store
# Or initialize in existing Next.js project
pnpm dlx @solverhood/headless initCommands
init
Initialize a new project or setup an existing one. Sets up both UI components and Shopify integration.
pnpm dlx @solverhood/headless init # Setup existing project
pnpm dlx @solverhood/headless init --name store # Create new Next.js projectlist
List all available components and templates.
pnpm dlx @solverhood/headless listdoctor
Check project health and diagnose issues.
pnpm dlx @solverhood/headless doctorui add
Add UI components to your project. Dependencies are resolved automatically.
pnpm dlx @solverhood/headless ui add button badge input
pnpm dlx @solverhood/headless ui add header # Auto-resolves dependencies
pnpm dlx @solverhood/headless ui add --all # Add all componentsui list
List available UI components.
pnpm dlx @solverhood/headless ui listshopify add
Add Shopify templates to your project.
pnpm dlx @solverhood/headless shopify add query:product query:collection
pnpm dlx @solverhood/headless shopify add mutation:cart-create
pnpm dlx @solverhood/headless shopify add hook:use-cart
pnpm dlx @solverhood/headless shopify add utility:moneyshopify list
List available Shopify templates.
pnpm dlx @solverhood/headless shopify listWhat's Included
UI Components (68 total)
- Primitives (31): Button, Input, Dialog, Drawer, Select, Tabs, Toast, Accordion, Badge, etc.
- Commerce (37): Header, Footer, Hero, ProductCard, CartLineItem, VariantSelector, ProductGallery, etc.
Shopify Templates (47 total)
- Queries: product, collection, collections, cart, customer, menu, search, article, page
- Mutations: cart-create, cart-lines-add, cart-lines-update, cart-lines-remove, customer-create, etc.
- Hooks: use-cart, use-customer, use-search
- Utilities: money, variant, connection, pagination, image, validation, cart, gid, etc.
- Fragments: product-card, product-details, collection, cart, customer, image, menu, etc.
Options
| Flag | Description |
|------|-------------|
| -y, --yes | Skip confirmation prompts |
| -f, --force | Overwrite existing files |
| -o, --overwrite | Overwrite existing files (ui add) |
| -c, --cwd <path> | Working directory |
| -n, --name <name> | Project name (init) |
| --json | Output as JSON (list commands) |
| -a, --all | Add all components (ui add) |
| -d, --dry-run | Preview without writing (ui add) |
Config File
After initialization, a solverhood.json config file is created with paths and aliases for both UI components and Shopify templates.
License
MIT
