amazon-catalog-cli 1.0.0__tar.gz
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.
- amazon_catalog_cli-1.0.0/LICENSE +21 -0
- amazon_catalog_cli-1.0.0/PKG-INFO +301 -0
- amazon_catalog_cli-1.0.0/README.md +270 -0
- amazon_catalog_cli-1.0.0/amazon_catalog_cli.egg-info/PKG-INFO +301 -0
- amazon_catalog_cli-1.0.0/amazon_catalog_cli.egg-info/SOURCES.txt +22 -0
- amazon_catalog_cli-1.0.0/amazon_catalog_cli.egg-info/dependency_links.txt +1 -0
- amazon_catalog_cli-1.0.0/amazon_catalog_cli.egg-info/entry_points.txt +2 -0
- amazon_catalog_cli-1.0.0/amazon_catalog_cli.egg-info/requires.txt +3 -0
- amazon_catalog_cli-1.0.0/amazon_catalog_cli.egg-info/top_level.txt +1 -0
- amazon_catalog_cli-1.0.0/catalog/__init__.py +2 -0
- amazon_catalog_cli-1.0.0/catalog/cli.py +167 -0
- amazon_catalog_cli-1.0.0/catalog/output.py +136 -0
- amazon_catalog_cli-1.0.0/catalog/parser.py +235 -0
- amazon_catalog_cli-1.0.0/catalog/queries/__init__.py +20 -0
- amazon_catalog_cli-1.0.0/catalog/queries/char_validation.py +46 -0
- amazon_catalog_cli-1.0.0/catalog/queries/missing_attributes.py +63 -0
- amazon_catalog_cli-1.0.0/catalog/queries/new_attributes.py +51 -0
- amazon_catalog_cli-1.0.0/catalog/queries/product_type_check.py +42 -0
- amazon_catalog_cli-1.0.0/catalog/queries/rufus_bullets.py +158 -0
- amazon_catalog_cli-1.0.0/catalog/queries/title_checks.py +62 -0
- amazon_catalog_cli-1.0.0/catalog/queries/variation_check.py +65 -0
- amazon_catalog_cli-1.0.0/catalog/query_engine.py +132 -0
- amazon_catalog_cli-1.0.0/setup.cfg +4 -0
- amazon_catalog_cli-1.0.0/setup.py +37 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brett Wilson
|
|
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.
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: amazon-catalog-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Agent-native CLI for querying Amazon Category Listing Reports
|
|
5
|
+
Home-page: https://github.com/BWB03/amazon-catalog-cli
|
|
6
|
+
Author: Brett Wilson
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Requires-Python: >=3.7
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: openpyxl>=3.0.0
|
|
20
|
+
Requires-Dist: click>=8.0.0
|
|
21
|
+
Requires-Dist: rich>=13.0.0
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: requires-dist
|
|
29
|
+
Dynamic: requires-python
|
|
30
|
+
Dynamic: summary
|
|
31
|
+
|
|
32
|
+
# Amazon Catalog CLI
|
|
33
|
+
|
|
34
|
+
**Agent-native CLI for querying Amazon Category Listing Reports**
|
|
35
|
+
|
|
36
|
+
The first AI-agent-friendly Amazon catalog analysis tool. Query your CLRs with natural language, automate catalog audits, and integrate with AI workflows.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- 🤖 **Agent-Native** - CLI/JSON output designed for AI agent integration
|
|
41
|
+
- âš¡ **Fast** - Query 1000+ SKU catalogs in seconds
|
|
42
|
+
- 🔌 **Extensible** - Plugin system for custom queries
|
|
43
|
+
- 📊 **Comprehensive** - 9 built-in catalog health checks
|
|
44
|
+
- 🎯 **RUFUS Optimized** - Amazon AI shopping assistant bullet scoring
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install amazon-catalog-cli
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or install from source:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
git clone https://github.com/BWB03/amazon-catalog-cli.git
|
|
56
|
+
cd amazon-catalog-cli
|
|
57
|
+
pip install -e .
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Run all catalog checks
|
|
64
|
+
catalog scan my-catalog.xlsx
|
|
65
|
+
|
|
66
|
+
# Run specific check
|
|
67
|
+
catalog check missing-attributes my-catalog.xlsx
|
|
68
|
+
|
|
69
|
+
# Export results as JSON (for agents)
|
|
70
|
+
catalog scan my-catalog.xlsx --format json --output results.json
|
|
71
|
+
|
|
72
|
+
# List available queries
|
|
73
|
+
catalog list-queries my-catalog.xlsx
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Available Queries
|
|
77
|
+
|
|
78
|
+
### Attribute Audits
|
|
79
|
+
- **missing-attributes** - Find mandatory attributes missing from listings
|
|
80
|
+
- **missing-any-attributes** - Find all missing attributes (required + conditional)
|
|
81
|
+
- **new-attributes** - Find unused template fields that might add value
|
|
82
|
+
|
|
83
|
+
### Content Quality
|
|
84
|
+
- **rufus-bullets** - Score bullet points against Amazon's RUFUS AI framework
|
|
85
|
+
- **long-titles** - Find titles exceeding 200 characters
|
|
86
|
+
- **title-prohibited-chars** - Find titles with prohibited characters
|
|
87
|
+
- **prohibited-chars** - Find prohibited characters in any field
|
|
88
|
+
|
|
89
|
+
### Catalog Structure
|
|
90
|
+
- **product-type-mismatch** - Find mismatched product types and item keywords
|
|
91
|
+
- **missing-variations** - Find products that should be variations but aren't
|
|
92
|
+
|
|
93
|
+
## Usage Examples
|
|
94
|
+
|
|
95
|
+
### For Humans
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Quick scan with summary
|
|
99
|
+
catalog scan my-catalog.xlsx
|
|
100
|
+
|
|
101
|
+
# Detailed results
|
|
102
|
+
catalog scan my-catalog.xlsx --show-details
|
|
103
|
+
|
|
104
|
+
# Check specific issue
|
|
105
|
+
catalog check rufus-bullets my-catalog.xlsx
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### For AI Agents
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# JSON output for agent parsing
|
|
112
|
+
catalog scan my-catalog.xlsx --format json
|
|
113
|
+
|
|
114
|
+
# CSV export for spreadsheet analysis
|
|
115
|
+
catalog scan my-catalog.xlsx --format csv --output audit.csv
|
|
116
|
+
|
|
117
|
+
# Single query with structured output
|
|
118
|
+
catalog check missing-attributes my-catalog.xlsx --format json
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Example JSON Output
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"timestamp": "2026-02-21T10:30:00Z",
|
|
126
|
+
"total_queries": 9,
|
|
127
|
+
"total_issues": 47,
|
|
128
|
+
"total_affected_skus": 23,
|
|
129
|
+
"queries": [
|
|
130
|
+
{
|
|
131
|
+
"query_name": "missing-attributes",
|
|
132
|
+
"description": "Find mandatory attributes missing from listings",
|
|
133
|
+
"total_issues": 12,
|
|
134
|
+
"affected_skus": 8,
|
|
135
|
+
"issues": [
|
|
136
|
+
{
|
|
137
|
+
"row": 7,
|
|
138
|
+
"sku": "ABC-123",
|
|
139
|
+
"field": "brand",
|
|
140
|
+
"severity": "required",
|
|
141
|
+
"details": "Missing required field: brand",
|
|
142
|
+
"product_type": "HAIR_STYLING_AGENT"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## CLI Commands
|
|
151
|
+
|
|
152
|
+
### `catalog scan`
|
|
153
|
+
Run all queries on a CLR file.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
catalog scan <clr-file> [OPTIONS]
|
|
157
|
+
|
|
158
|
+
Options:
|
|
159
|
+
--format [terminal|json|csv] Output format (default: terminal)
|
|
160
|
+
--output PATH Output file path
|
|
161
|
+
--show-details / --no-details Show detailed results
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### `catalog check`
|
|
165
|
+
Run a specific query.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
catalog check <query-name> <clr-file> [OPTIONS]
|
|
169
|
+
|
|
170
|
+
Options:
|
|
171
|
+
--format [terminal|json|csv] Output format (default: terminal)
|
|
172
|
+
--output PATH Output file path
|
|
173
|
+
--show-details / --no-details Show detailed results
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### `catalog list-queries`
|
|
177
|
+
List available queries.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
catalog list-queries <clr-file>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Agent Integration
|
|
184
|
+
|
|
185
|
+
This tool is designed for AI agent workflows:
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
import subprocess
|
|
189
|
+
import json
|
|
190
|
+
|
|
191
|
+
# Run scan and parse results
|
|
192
|
+
result = subprocess.run(
|
|
193
|
+
['catalog', 'scan', 'my-catalog.xlsx', '--format', 'json'],
|
|
194
|
+
capture_output=True,
|
|
195
|
+
text=True
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
data = json.loads(result.stdout)
|
|
199
|
+
|
|
200
|
+
# Agent can now process catalog issues
|
|
201
|
+
for query in data['queries']:
|
|
202
|
+
if query['total_issues'] > 0:
|
|
203
|
+
print(f"Found {query['total_issues']} issues in {query['query_name']}")
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## RUFUS Bullet Optimization
|
|
207
|
+
|
|
208
|
+
The `rufus-bullets` query evaluates bullet points against Amazon's RUFUS AI framework:
|
|
209
|
+
|
|
210
|
+
- **Bullet 1**: Should lead with Hero Benefit (why buy this?)
|
|
211
|
+
- **Bullet 2**: Should state who it's for (target audience)
|
|
212
|
+
- **Bullet 3**: Should differentiate (why this vs. competitors?)
|
|
213
|
+
- **All bullets**: Checked for specifics, length, vague marketing, ALL CAPS
|
|
214
|
+
|
|
215
|
+
Scores 1-5 with actionable suggestions.
|
|
216
|
+
|
|
217
|
+
## Extending with Custom Queries
|
|
218
|
+
|
|
219
|
+
Create a new query plugin:
|
|
220
|
+
|
|
221
|
+
```python
|
|
222
|
+
from catalog.query_engine import QueryPlugin
|
|
223
|
+
|
|
224
|
+
class MyCustomQuery(QueryPlugin):
|
|
225
|
+
name = "my-custom-check"
|
|
226
|
+
description = "My custom catalog check"
|
|
227
|
+
|
|
228
|
+
def execute(self, listings, clr_parser):
|
|
229
|
+
issues = []
|
|
230
|
+
|
|
231
|
+
for listing in listings:
|
|
232
|
+
# Your logic here
|
|
233
|
+
if some_condition:
|
|
234
|
+
issues.append({
|
|
235
|
+
'row': listing.row_number,
|
|
236
|
+
'sku': listing.sku,
|
|
237
|
+
'field': 'FieldName',
|
|
238
|
+
'severity': 'warning',
|
|
239
|
+
'details': 'Issue description',
|
|
240
|
+
'product_type': listing.product_type
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
return issues
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Register in `cli.py` and it's instantly available.
|
|
247
|
+
|
|
248
|
+
## Requirements
|
|
249
|
+
|
|
250
|
+
- Python 3.7+
|
|
251
|
+
- openpyxl
|
|
252
|
+
- click
|
|
253
|
+
- rich
|
|
254
|
+
|
|
255
|
+
## How to Get Your CLR
|
|
256
|
+
|
|
257
|
+
1. Go to **Amazon Seller Central** → **Catalog** → **Category Listing Report**
|
|
258
|
+
2. Click **Generate Report**
|
|
259
|
+
3. Download the `.xlsm` or `.xlsx` file
|
|
260
|
+
4. Run catalog CLI on it
|
|
261
|
+
|
|
262
|
+
## Contributing
|
|
263
|
+
|
|
264
|
+
This is an open-source project. Contributions welcome!
|
|
265
|
+
|
|
266
|
+
- Add new query plugins
|
|
267
|
+
- Improve parsing logic
|
|
268
|
+
- Enhance output formats
|
|
269
|
+
- Build integrations
|
|
270
|
+
|
|
271
|
+
## Roadmap
|
|
272
|
+
|
|
273
|
+
### v1.1
|
|
274
|
+
- Excel export (formatted like CLR Auditor)
|
|
275
|
+
- Natural language query parsing
|
|
276
|
+
- Query result caching
|
|
277
|
+
|
|
278
|
+
### v2.0
|
|
279
|
+
- Query composition ("missing attributes AND rufus score <3")
|
|
280
|
+
- Saved query templates
|
|
281
|
+
- Diff mode (compare two CLRs)
|
|
282
|
+
- Watch mode (monitor CLR file for changes)
|
|
283
|
+
|
|
284
|
+
## License
|
|
285
|
+
|
|
286
|
+
MIT License - Free to use, modify, and distribute.
|
|
287
|
+
|
|
288
|
+
## Author
|
|
289
|
+
|
|
290
|
+
Built by Brett Wilson ([@BWB03](https://github.com/BWB03))
|
|
291
|
+
|
|
292
|
+
Amazon consulting veteran, AI automation enthusiast, open-source believer.
|
|
293
|
+
|
|
294
|
+
## Related Projects
|
|
295
|
+
|
|
296
|
+
- [clr-auditor](https://github.com/BWB03/clr-auditor) - Original CLR auditing tool
|
|
297
|
+
- [amazon-tool](https://github.com/BWB03/amazon-tool) - Amazon variation creator
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
**First AI-agent-friendly Amazon catalog tool.** Built for the future of catalog management.
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Amazon Catalog CLI
|
|
2
|
+
|
|
3
|
+
**Agent-native CLI for querying Amazon Category Listing Reports**
|
|
4
|
+
|
|
5
|
+
The first AI-agent-friendly Amazon catalog analysis tool. Query your CLRs with natural language, automate catalog audits, and integrate with AI workflows.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- 🤖 **Agent-Native** - CLI/JSON output designed for AI agent integration
|
|
10
|
+
- âš¡ **Fast** - Query 1000+ SKU catalogs in seconds
|
|
11
|
+
- 🔌 **Extensible** - Plugin system for custom queries
|
|
12
|
+
- 📊 **Comprehensive** - 9 built-in catalog health checks
|
|
13
|
+
- 🎯 **RUFUS Optimized** - Amazon AI shopping assistant bullet scoring
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install amazon-catalog-cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or install from source:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/BWB03/amazon-catalog-cli.git
|
|
25
|
+
cd amazon-catalog-cli
|
|
26
|
+
pip install -e .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Run all catalog checks
|
|
33
|
+
catalog scan my-catalog.xlsx
|
|
34
|
+
|
|
35
|
+
# Run specific check
|
|
36
|
+
catalog check missing-attributes my-catalog.xlsx
|
|
37
|
+
|
|
38
|
+
# Export results as JSON (for agents)
|
|
39
|
+
catalog scan my-catalog.xlsx --format json --output results.json
|
|
40
|
+
|
|
41
|
+
# List available queries
|
|
42
|
+
catalog list-queries my-catalog.xlsx
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Available Queries
|
|
46
|
+
|
|
47
|
+
### Attribute Audits
|
|
48
|
+
- **missing-attributes** - Find mandatory attributes missing from listings
|
|
49
|
+
- **missing-any-attributes** - Find all missing attributes (required + conditional)
|
|
50
|
+
- **new-attributes** - Find unused template fields that might add value
|
|
51
|
+
|
|
52
|
+
### Content Quality
|
|
53
|
+
- **rufus-bullets** - Score bullet points against Amazon's RUFUS AI framework
|
|
54
|
+
- **long-titles** - Find titles exceeding 200 characters
|
|
55
|
+
- **title-prohibited-chars** - Find titles with prohibited characters
|
|
56
|
+
- **prohibited-chars** - Find prohibited characters in any field
|
|
57
|
+
|
|
58
|
+
### Catalog Structure
|
|
59
|
+
- **product-type-mismatch** - Find mismatched product types and item keywords
|
|
60
|
+
- **missing-variations** - Find products that should be variations but aren't
|
|
61
|
+
|
|
62
|
+
## Usage Examples
|
|
63
|
+
|
|
64
|
+
### For Humans
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Quick scan with summary
|
|
68
|
+
catalog scan my-catalog.xlsx
|
|
69
|
+
|
|
70
|
+
# Detailed results
|
|
71
|
+
catalog scan my-catalog.xlsx --show-details
|
|
72
|
+
|
|
73
|
+
# Check specific issue
|
|
74
|
+
catalog check rufus-bullets my-catalog.xlsx
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### For AI Agents
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# JSON output for agent parsing
|
|
81
|
+
catalog scan my-catalog.xlsx --format json
|
|
82
|
+
|
|
83
|
+
# CSV export for spreadsheet analysis
|
|
84
|
+
catalog scan my-catalog.xlsx --format csv --output audit.csv
|
|
85
|
+
|
|
86
|
+
# Single query with structured output
|
|
87
|
+
catalog check missing-attributes my-catalog.xlsx --format json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Example JSON Output
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"timestamp": "2026-02-21T10:30:00Z",
|
|
95
|
+
"total_queries": 9,
|
|
96
|
+
"total_issues": 47,
|
|
97
|
+
"total_affected_skus": 23,
|
|
98
|
+
"queries": [
|
|
99
|
+
{
|
|
100
|
+
"query_name": "missing-attributes",
|
|
101
|
+
"description": "Find mandatory attributes missing from listings",
|
|
102
|
+
"total_issues": 12,
|
|
103
|
+
"affected_skus": 8,
|
|
104
|
+
"issues": [
|
|
105
|
+
{
|
|
106
|
+
"row": 7,
|
|
107
|
+
"sku": "ABC-123",
|
|
108
|
+
"field": "brand",
|
|
109
|
+
"severity": "required",
|
|
110
|
+
"details": "Missing required field: brand",
|
|
111
|
+
"product_type": "HAIR_STYLING_AGENT"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## CLI Commands
|
|
120
|
+
|
|
121
|
+
### `catalog scan`
|
|
122
|
+
Run all queries on a CLR file.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
catalog scan <clr-file> [OPTIONS]
|
|
126
|
+
|
|
127
|
+
Options:
|
|
128
|
+
--format [terminal|json|csv] Output format (default: terminal)
|
|
129
|
+
--output PATH Output file path
|
|
130
|
+
--show-details / --no-details Show detailed results
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### `catalog check`
|
|
134
|
+
Run a specific query.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
catalog check <query-name> <clr-file> [OPTIONS]
|
|
138
|
+
|
|
139
|
+
Options:
|
|
140
|
+
--format [terminal|json|csv] Output format (default: terminal)
|
|
141
|
+
--output PATH Output file path
|
|
142
|
+
--show-details / --no-details Show detailed results
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### `catalog list-queries`
|
|
146
|
+
List available queries.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
catalog list-queries <clr-file>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Agent Integration
|
|
153
|
+
|
|
154
|
+
This tool is designed for AI agent workflows:
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
import subprocess
|
|
158
|
+
import json
|
|
159
|
+
|
|
160
|
+
# Run scan and parse results
|
|
161
|
+
result = subprocess.run(
|
|
162
|
+
['catalog', 'scan', 'my-catalog.xlsx', '--format', 'json'],
|
|
163
|
+
capture_output=True,
|
|
164
|
+
text=True
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
data = json.loads(result.stdout)
|
|
168
|
+
|
|
169
|
+
# Agent can now process catalog issues
|
|
170
|
+
for query in data['queries']:
|
|
171
|
+
if query['total_issues'] > 0:
|
|
172
|
+
print(f"Found {query['total_issues']} issues in {query['query_name']}")
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## RUFUS Bullet Optimization
|
|
176
|
+
|
|
177
|
+
The `rufus-bullets` query evaluates bullet points against Amazon's RUFUS AI framework:
|
|
178
|
+
|
|
179
|
+
- **Bullet 1**: Should lead with Hero Benefit (why buy this?)
|
|
180
|
+
- **Bullet 2**: Should state who it's for (target audience)
|
|
181
|
+
- **Bullet 3**: Should differentiate (why this vs. competitors?)
|
|
182
|
+
- **All bullets**: Checked for specifics, length, vague marketing, ALL CAPS
|
|
183
|
+
|
|
184
|
+
Scores 1-5 with actionable suggestions.
|
|
185
|
+
|
|
186
|
+
## Extending with Custom Queries
|
|
187
|
+
|
|
188
|
+
Create a new query plugin:
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
from catalog.query_engine import QueryPlugin
|
|
192
|
+
|
|
193
|
+
class MyCustomQuery(QueryPlugin):
|
|
194
|
+
name = "my-custom-check"
|
|
195
|
+
description = "My custom catalog check"
|
|
196
|
+
|
|
197
|
+
def execute(self, listings, clr_parser):
|
|
198
|
+
issues = []
|
|
199
|
+
|
|
200
|
+
for listing in listings:
|
|
201
|
+
# Your logic here
|
|
202
|
+
if some_condition:
|
|
203
|
+
issues.append({
|
|
204
|
+
'row': listing.row_number,
|
|
205
|
+
'sku': listing.sku,
|
|
206
|
+
'field': 'FieldName',
|
|
207
|
+
'severity': 'warning',
|
|
208
|
+
'details': 'Issue description',
|
|
209
|
+
'product_type': listing.product_type
|
|
210
|
+
})
|
|
211
|
+
|
|
212
|
+
return issues
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Register in `cli.py` and it's instantly available.
|
|
216
|
+
|
|
217
|
+
## Requirements
|
|
218
|
+
|
|
219
|
+
- Python 3.7+
|
|
220
|
+
- openpyxl
|
|
221
|
+
- click
|
|
222
|
+
- rich
|
|
223
|
+
|
|
224
|
+
## How to Get Your CLR
|
|
225
|
+
|
|
226
|
+
1. Go to **Amazon Seller Central** → **Catalog** → **Category Listing Report**
|
|
227
|
+
2. Click **Generate Report**
|
|
228
|
+
3. Download the `.xlsm` or `.xlsx` file
|
|
229
|
+
4. Run catalog CLI on it
|
|
230
|
+
|
|
231
|
+
## Contributing
|
|
232
|
+
|
|
233
|
+
This is an open-source project. Contributions welcome!
|
|
234
|
+
|
|
235
|
+
- Add new query plugins
|
|
236
|
+
- Improve parsing logic
|
|
237
|
+
- Enhance output formats
|
|
238
|
+
- Build integrations
|
|
239
|
+
|
|
240
|
+
## Roadmap
|
|
241
|
+
|
|
242
|
+
### v1.1
|
|
243
|
+
- Excel export (formatted like CLR Auditor)
|
|
244
|
+
- Natural language query parsing
|
|
245
|
+
- Query result caching
|
|
246
|
+
|
|
247
|
+
### v2.0
|
|
248
|
+
- Query composition ("missing attributes AND rufus score <3")
|
|
249
|
+
- Saved query templates
|
|
250
|
+
- Diff mode (compare two CLRs)
|
|
251
|
+
- Watch mode (monitor CLR file for changes)
|
|
252
|
+
|
|
253
|
+
## License
|
|
254
|
+
|
|
255
|
+
MIT License - Free to use, modify, and distribute.
|
|
256
|
+
|
|
257
|
+
## Author
|
|
258
|
+
|
|
259
|
+
Built by Brett Wilson ([@BWB03](https://github.com/BWB03))
|
|
260
|
+
|
|
261
|
+
Amazon consulting veteran, AI automation enthusiast, open-source believer.
|
|
262
|
+
|
|
263
|
+
## Related Projects
|
|
264
|
+
|
|
265
|
+
- [clr-auditor](https://github.com/BWB03/clr-auditor) - Original CLR auditing tool
|
|
266
|
+
- [amazon-tool](https://github.com/BWB03/amazon-tool) - Amazon variation creator
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
**First AI-agent-friendly Amazon catalog tool.** Built for the future of catalog management.
|