shopq 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 c-99-e
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,157 @@
1
+ # shopq
2
+
3
+ [![CI](https://github.com/c-99-e/shopq/actions/workflows/ci.yml/badge.svg)](https://github.com/c-99-e/shopq/actions/workflows/ci.yml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
+ [![Bun](https://img.shields.io/badge/Bun-%3E%3D1.3-black?logo=bun)](https://bun.sh)
6
+
7
+ A zero-dependency Shopify Admin CLI built on [Bun](https://bun.sh). Manage products, pages, collections, menus, files, themes, and more from your terminal.
8
+
9
+ Built with AI agents as the primary user — structured JSON output, predictable exit codes, and no interactive prompts.
10
+
11
+ ## Prerequisites
12
+
13
+ - [Bun](https://bun.sh) v1.3+
14
+ - A Shopify store with a [Dev Dashboard app](https://shopify.dev/docs/apps/build/authentication-authorization/client-credentials) configured for Client Credentials
15
+
16
+ ## Setup
17
+
18
+ 1. Clone the repo and install dependencies:
19
+
20
+ ```bash
21
+ git clone https://github.com/c-99-e/shopq.git
22
+ cd shopq
23
+ bun install
24
+ ```
25
+
26
+ 2. Copy the example env file and fill in your credentials:
27
+
28
+ ```bash
29
+ cp .env.example .env
30
+ ```
31
+
32
+ ```
33
+ SHOPIFY_STORE=your-store.myshopify.com
34
+ SHOPIFY_CLIENT_ID=your-client-id
35
+ SHOPIFY_CLIENT_SECRET=your-client-secret
36
+ ```
37
+
38
+ Bun loads `.env` automatically — no extra setup needed.
39
+
40
+ 3. Link the CLI globally (optional):
41
+
42
+ ```bash
43
+ bun link
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ```
49
+ shopq <resource> <verb> [args] [flags]
50
+ ```
51
+
52
+ ### Global flags
53
+
54
+ | Flag | Description |
55
+ |------|-------------|
56
+ | `--json, -j` | Output as JSON |
57
+ | `--help, -h` | Show help |
58
+ | `--version, -v` | Print version |
59
+ | `--store <url>` | Store override |
60
+ | `--no-color` | Disable colored output (also respects `NO_COLOR` env) |
61
+
62
+ ## Raw GraphQL
63
+
64
+ Every resource command is built on Shopify's Admin GraphQL API. When you need something the resource commands don't cover, `gql` gives you direct access:
65
+
66
+ ```bash
67
+ # Inline query
68
+ shopq gql "{ shop { name email } }"
69
+
70
+ # From a file
71
+ shopq gql - < my-query.graphql
72
+
73
+ # With variables
74
+ shopq gql "mutation($id: ID!) { productDelete(input: {id: \$id}) { deletedProductId } }" --variables '{"id": "gid://shopify/Product/123"}'
75
+ ```
76
+
77
+ This is the escape hatch — anything the Shopify Admin API supports, `gql` can do.
78
+
79
+ ## Commands
80
+
81
+ ### Store
82
+
83
+ | Command | Description |
84
+ |---------|-------------|
85
+ | `shop get` | Show store metadata |
86
+ | `config show` | Show current configuration |
87
+
88
+ ### Products
89
+
90
+ | Command | Description |
91
+ |---------|-------------|
92
+ | `product list` | List products with filtering and pagination |
93
+ | `product get` | Get a single product by ID or title |
94
+ | `product create` | Create a product with optional variant support |
95
+ | `product update` | Update a product by ID or title |
96
+ | `product delete` | Delete a product by ID or title |
97
+
98
+ ### Content
99
+
100
+ | Command | Description |
101
+ |---------|-------------|
102
+ | `page list` | List static store pages |
103
+ | `page get` | Get a single page by handle |
104
+ | `page create` | Create a static store page |
105
+ | `page update` | Update a static store page |
106
+ | `page delete` | Delete a static store page |
107
+
108
+ ### Storefront
109
+
110
+ | Command | Description |
111
+ |---------|-------------|
112
+ | `collection list` | List collections with pagination |
113
+ | `collection get` | Get a single collection by ID or handle |
114
+ | `menu list` | List all navigation menus |
115
+ | `menu get` | Get a single menu by ID or handle |
116
+
117
+ ### Assets
118
+
119
+ | Command | Description |
120
+ |---------|-------------|
121
+ | `file list` | List store files with filtering and pagination |
122
+ | `theme list` | List all themes |
123
+
124
+ ## Examples
125
+
126
+ ```bash
127
+ # List products
128
+ shopq product list --limit 10
129
+
130
+ # Get a product as JSON
131
+ shopq product get "T-Shirt" --json
132
+
133
+ # Create a product with variants
134
+ shopq product create --title "T-Shirt" --variants variants.json
135
+
136
+ # Get a page by handle
137
+ shopq page get --handle "about-us"
138
+
139
+ # List collections
140
+ shopq collection list --json
141
+ ```
142
+
143
+ ## Testing
144
+
145
+ ```bash
146
+ bun test
147
+ ```
148
+
149
+ ## Contributing
150
+
151
+ Contributions are welcome! Please open an issue first to discuss what you'd like to change.
152
+
153
+ This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md) code of conduct.
154
+
155
+ ## License
156
+
157
+ [MIT](LICENSE)