-
Notifications
You must be signed in to change notification settings - Fork 4
Initial setup add changesets, versioning commented out github action #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bcd565d
Initial setup add changesets, versioning commented out github action
PawanP1808 fe29140
Add licence and readme
PawanP1808 08ad946
Restructure repo to align with ucp/cli
PawanP1808 dba7760
Disable releaase.yaml for now
PawanP1808 13a2917
Update skill.md references to be accurate
PawanP1808 64ff42a
Add only https handling for image urls reject file:// or data://
PawanP1808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # name: Release | ||
|
|
||
| # 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: "" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| ] | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.