Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://cdn.jsdelivr.net/npm/@changesets/config@3.1.4/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# name: Release

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out until we are ready to publish it.


# on:
# push:
# branches: [main]

# permissions:
# contents: write # Required for Changesets to push branches
# id-token: write # Required for OIDC authentication
# pull-requests: write # Required for Changesets to create PRs

# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: false

# jobs:
# changesets:
# name: changeset release
# if: github.event_name == 'push'
# runs-on: ubuntu-22.04
# environment:
# name: npm-shop-cli
# url: https://www.npmjs.com/package/@shopify/shop-cli
# permissions:
# contents: write
# pull-requests: write
# id-token: write
# steps:
# - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
# with:
# fetch-depth: 0
# - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
# with:
# version: 10.28.0
# - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
# with:
# node-version: 24
# cache: pnpm
# - run: pnpm install --frozen-lockfile
# - uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
# with:
# version: pnpm version-packages
# publish: pnpm release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_CONFIG_PROVENANCE: "true"
# NPM_TOKEN: ""
# NODE_AUTH_TOKEN: ""
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
minimum-release-age=10080
package-manager-strict=true
auto-install-peers=true
strict-peer-dependencies=false
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2026-present, Shopify Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
92 changes: 92 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Shop CLI

Personal shopping CLI for Shop catalog search, checkout, and order workflows.

## Install

```bash
pnpm add --global @shopify/shop-cli
```

Or with npm:

```bash
npm install --global @shopify/shop-cli
```

## Usage

```bash
shop --help
shop search "trail running shoes" --limit 10
shop catalog lookup gid://shopify/ProductVariant/50362300006715
shop auth login
shop auth status
```

## Commands

### Search catalog

```bash
shop search "black crewneck sweater" --limit 10
shop search "boots" --ships-to US --country US
shop search --like-id gid://shopify/p/abc123
shop search --image ./photo.jpg
```

Useful flags:

```text
--country <ISO2> Buyer country/catalog context
--ships-to <ISO2> Filter to products that ship to the destination
--limit <number> Result limit, 1-50
--format md|json Output format for catalog results
```

### Catalog lookup

```bash
shop catalog lookup <product-or-variant-id...>
shop catalog get-product <product-or-variant-id>
```

### Auth

```bash
shop auth login
shop auth status
shop auth logout
```

### Checkout

```bash
printf '{"email":"buyer@example.com"}' | \
shop checkout create \
--shop-domain example.myshopify.com \
--variant-id 123 \
--quantity 1 \
--checkout-stdin
```

`shop checkout complete` requires `--confirm` and should only be used after confirming the item, variant, quantity, price, shipping, and total cost.

### Orders

```bash
shop orders search --type recent
shop orders search --type tracking --query "running shoes"
shop orders search --type returns --query "jacket"
shop orders search --type reorder --query "coffee"
```

## Personal-use limits

This CLI is for individual end-users only. Building commercial services, resale platforms, aggregators, or anything that provides third parties with programmatic access to Shopify's catalog, checkout, delegated payments, or aggregated user data is prohibited.

See https://help.shop.app/shop/shopping/personal-agents for accepted and prohibited use.

## License

MIT. See [LICENSE](./LICENSE).
10 changes: 3 additions & 7 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: shop
description: "Your personal shopping assistant — Search, Buy, Track, Return, and Re-order products through the best product catalog in the world."
metadata:
version: "0.3.0"
version: "0.1.0"
homepage: "https://shop.app"
---

Expand All @@ -19,10 +19,9 @@ If package installation is blocked, use the direct API instructions in the refer

## Installation

From this skill folder:
From the repository root:

```bash
cd package
pnpm install
pnpm build
pnpm link --global
Expand All @@ -32,18 +31,15 @@ shop --help
Uninstall:

```bash
cd package
pnpm unlink --global
```

If installed from a registry or tarball instead of `pnpm link --global`:

```bash
pnpm remove --global @shopify/shop
pnpm remove --global @shopify/shop-cli
```

## Package Contents

## Core Flow

1. Search using shop search before asking the user to authenticate.
Expand Down
65 changes: 65 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@shopify/shop-cli",
"version": "0.1.0",
"description": "Personal shopping CLI for Shop catalog search, checkout, and order workflows",
"type": "module",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/Shopify/shop-cli"
},
"bugs": {
"url": "https://github.com/Shopify/shop-cli/issues"
},
"homepage": "https://github.com/Shopify/shop-cli#readme",
"sideEffects": false,
"bin": {
"shop": "./dist/bin.js"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": [
"dist",
"README.md",
"LICENSE",
"src"
],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"scripts": {
"build": "rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/bin.js",
"shop": "node dist/bin.js",
"test": "rm -rf .test-build && tsc -p tsconfig.test.json && cp package.json .test-build/package.json && node --test .test-build/tests/*.test.js",
"typecheck": "tsc --noEmit",
"version-packages": "changeset version",
"changeset": "changeset",
"release": "pnpm build && pnpm test && changeset publish",
"pack:dry": "pnpm dlx npm@latest pack --dry-run"
},
"dependencies": {
"commander": "^12.1.0",
"keytar": "^7.9.0"
},
"devDependencies": {
"@changesets/cli": "^2.31.0",
"@types/node": "^22.15.3",
"typescript": "^5.8.3"
},
"engines": {
"node": ">=20"
},
"packageManager": "pnpm@10.28.0",
"pnpm": {
"onlyBuiltDependencies": [
"keytar"
]
}
}
34 changes: 0 additions & 34 deletions package/package.json

This file was deleted.

Loading