clishop 0.2.0 → 0.2.1
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 +216 -0
- package/README.md +447 -195
- package/SECURITY.md +25 -0
- package/dist/chunk-EGTXN73P.js +188 -0
- package/dist/chunk-ZF3JIQRK.js +108 -0
- package/dist/config-63FY6NWX.js +24 -0
- package/dist/index.js +760 -719
- package/dist/mcp.d.ts +19 -0
- package/dist/mcp.js +14430 -0
- package/package.json +13 -4
- package/server.json +29 -0
- package/.cursor/rules/commit-workflow.mdc +0 -42
- package/src/api.ts +0 -89
- package/src/auth.ts +0 -117
- package/src/commands/address.ts +0 -213
- package/src/commands/advertise.ts +0 -702
- package/src/commands/agent.ts +0 -177
- package/src/commands/auth.ts +0 -122
- package/src/commands/config.ts +0 -56
- package/src/commands/order.ts +0 -334
- package/src/commands/payment.ts +0 -108
- package/src/commands/review.ts +0 -412
- package/src/commands/search.ts +0 -1319
- package/src/commands/setup.ts +0 -644
- package/src/commands/status.ts +0 -131
- package/src/commands/store.ts +0 -302
- package/src/commands/support.ts +0 -264
- package/src/config.ts +0 -127
- package/src/index.ts +0 -80
- package/tsconfig.json +0 -22
package/README.md
CHANGED
|
@@ -1,333 +1,585 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">CLISHOP</h1>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>An open-source CLI for AI agents (and humans) to search, compare, and buy products — all from the terminal.</strong>
|
|
5
|
+
</p>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="#quick-start">Quick Start</a> •
|
|
8
|
+
<a href="#for-ai-agents">For AI Agents</a> •
|
|
9
|
+
<a href="#command-reference">Commands</a> •
|
|
10
|
+
<a href="#concepts">Concepts</a>
|
|
11
|
+
</p>
|
|
12
|
+
</p>
|
|
2
13
|
|
|
3
|
-
|
|
14
|
+
---
|
|
4
15
|
|
|
5
|
-
|
|
6
|
-
- **Binary**: `clishop`
|
|
7
|
-
- **Runtime**: Node.js ≥ 18
|
|
8
|
-
- **Backend**: `https://clishop-backend.vercel.app/api`
|
|
16
|
+
## Works with
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
<p>
|
|
19
|
+
<img alt="Claude" src="https://img.shields.io/badge/Claude-Supported-7C3AED?style=for-the-badge&logo=anthropic&logoColor=white" />
|
|
20
|
+
<img alt="GPT" src="https://img.shields.io/badge/GPT-Supported-10A37F?style=for-the-badge&logo=openai&logoColor=white" />
|
|
21
|
+
<img alt="Gemini" src="https://img.shields.io/badge/Gemini-Supported-4285F4?style=for-the-badge&logo=googlegemini&logoColor=white" />
|
|
22
|
+
</p>
|
|
23
|
+
<p>
|
|
24
|
+
<img alt="AutoGPT" src="https://img.shields.io/badge/AutoGPT-Open--source%20agent-111827?style=for-the-badge&logo=github&logoColor=white" />
|
|
25
|
+
<img alt="CrewAI" src="https://img.shields.io/badge/CrewAI-Open--source%20agent-0EA5E9?style=for-the-badge&logo=crewai&logoColor=white" />
|
|
26
|
+
<img alt="LangGraph" src="https://img.shields.io/badge/LangGraph-Open--source%20agent-16A34A?style=for-the-badge&logo=langchain&logoColor=white" />
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
CLISHOP lets AI agents and scripts autonomously search for products across multiple stores, compare prices, and place orders — entirely through a command-line interface. No browser. No GUI. Just `stdin`/`stdout`.
|
|
30
|
+
|
|
31
|
+
Built for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) era, where AI agents need tool-use interfaces to interact with the real world.
|
|
32
|
+
|
|
33
|
+
## MCP Server
|
|
34
|
+
|
|
35
|
+
CLISHOP ships as a native MCP server. Every Claude Desktop, Cursor, Windsurf, or other MCP-compatible client gets access to 19 shopping tools out of the box.
|
|
36
|
+
|
|
37
|
+
### Claude Desktop
|
|
38
|
+
|
|
39
|
+
Add to `claude_desktop_config.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"clishop": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["-y", "clishop", "--mcp"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or if installed globally:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"clishop": {
|
|
58
|
+
"command": "clishop-mcp"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Cursor
|
|
11
65
|
|
|
12
|
-
|
|
66
|
+
Add to `.cursor/mcp.json`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"clishop": {
|
|
72
|
+
"command": "npx",
|
|
73
|
+
"args": ["-y", "clishop", "--mcp"]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Windsurf
|
|
80
|
+
|
|
81
|
+
Add to `~/.windsurf/mcp.json`:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"clishop": {
|
|
87
|
+
"command": "npx",
|
|
88
|
+
"args": ["-y", "clishop", "--mcp"]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Available MCP Tools
|
|
95
|
+
|
|
96
|
+
| Tool | Description |
|
|
97
|
+
|------|-------------|
|
|
98
|
+
| `search_products` | Search products across all stores with filters |
|
|
99
|
+
| `get_product` | Get detailed product info |
|
|
100
|
+
| `buy_product` | Place an order with safety checks |
|
|
101
|
+
| `list_orders` | List orders by status |
|
|
102
|
+
| `get_order` | Get order details + tracking |
|
|
103
|
+
| `cancel_order` | Cancel a pending order |
|
|
104
|
+
| `list_addresses` | List shipping addresses |
|
|
105
|
+
| `add_address` | Add a shipping address |
|
|
106
|
+
| `remove_address` | Remove a shipping address |
|
|
107
|
+
| `list_payment_methods` | List payment methods |
|
|
108
|
+
| `list_stores` | Browse available stores |
|
|
109
|
+
| `get_store` | Get store details |
|
|
110
|
+
| `store_catalog` | Browse a store's catalog |
|
|
111
|
+
| `account_status` | Full account overview |
|
|
112
|
+
| `list_agents` | List safety agents |
|
|
113
|
+
| `create_advertise_request` | Post a request for vendors to bid on |
|
|
114
|
+
| `create_support_ticket` | Open a support ticket |
|
|
115
|
+
| `list_support_tickets` | List support tickets |
|
|
116
|
+
| `submit_feedback` | Report bugs or suggest improvements |
|
|
117
|
+
|
|
118
|
+
> **Prerequisite:** Log in once with `clishop login` before using MCP tools. The MCP server uses the same auth tokens stored in your OS keychain.
|
|
119
|
+
|
|
120
|
+
## Highlights
|
|
121
|
+
|
|
122
|
+
- **Multi-store search** — Query products across many vendors in one command
|
|
123
|
+
- **Extended search** — Real-time queries to vendor stores when local catalog doesn't have what you need
|
|
124
|
+
- **Agent profiles** — Safety guardrails: spending caps, category restrictions, confirmation prompts
|
|
125
|
+
- **Non-interactive mode** — Every command works without prompts (flags + `--json` output)
|
|
126
|
+
- **Advertise requests** — Can't find it? Publish what you need and let vendors bid
|
|
127
|
+
- **Secure payments** — Card details never touch the CLI; payment setup uses secure browser links
|
|
128
|
+
- **OS keychain auth** — Tokens stored in the system keychain, not config files
|
|
129
|
+
|
|
130
|
+
## Quick Start
|
|
131
|
+
|
|
132
|
+
### Install from npm
|
|
13
133
|
|
|
14
134
|
```bash
|
|
15
|
-
npm install -g
|
|
135
|
+
npm install -g clishop
|
|
16
136
|
```
|
|
17
137
|
|
|
18
|
-
Or from source
|
|
138
|
+
### Or build from source
|
|
19
139
|
|
|
20
140
|
```bash
|
|
21
141
|
git clone https://github.com/DavooxBv2/CLISHOP.git
|
|
22
142
|
cd CLISHOP
|
|
23
143
|
npm install
|
|
24
144
|
npm run build
|
|
25
|
-
npm link
|
|
145
|
+
npm link
|
|
26
146
|
```
|
|
27
147
|
|
|
28
|
-
|
|
148
|
+
### First run
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
clishop
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Running `clishop` with no arguments triggers a guided setup wizard:
|
|
155
|
+
|
|
156
|
+
1. Create an account or log in
|
|
157
|
+
2. Configure an agent (a `default` agent is created automatically)
|
|
158
|
+
3. Add a shipping address
|
|
159
|
+
4. Link a payment method (opens a secure browser link)
|
|
160
|
+
5. Run your first search
|
|
161
|
+
|
|
162
|
+
Re-run setup anytime with `clishop setup`.
|
|
163
|
+
|
|
164
|
+
**Requirements:** Node.js ≥ 18
|
|
29
165
|
|
|
30
|
-
|
|
166
|
+
## For AI Agents
|
|
31
167
|
|
|
32
|
-
|
|
33
|
-
2. Agent configuration (optional — a default agent is created automatically)
|
|
34
|
-
3. Shipping address
|
|
35
|
-
4. Payment method (opens a secure browser link)
|
|
36
|
-
5. First product search
|
|
168
|
+
CLISHOP is designed to be called by AI agents, scripts, and automation pipelines. Every command supports non-interactive flags and machine-readable JSON output.
|
|
37
169
|
|
|
38
|
-
|
|
170
|
+
### Authenticate
|
|
39
171
|
|
|
40
172
|
```bash
|
|
41
|
-
clishop
|
|
173
|
+
echo "<password>" | clishop login --email <email> --password-stdin
|
|
42
174
|
```
|
|
43
175
|
|
|
44
|
-
|
|
176
|
+
### Search → Buy flow
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Search for products (JSON output for parsing)
|
|
180
|
+
clishop search "wireless headphones" --json
|
|
181
|
+
|
|
182
|
+
# View product details
|
|
183
|
+
clishop product prod_a8k3m2x9p4w1 --json
|
|
184
|
+
|
|
185
|
+
# Buy it (skip confirmation prompt)
|
|
186
|
+
clishop buy prod_a8k3m2x9p4w1 -y
|
|
45
187
|
|
|
46
|
-
|
|
188
|
+
# Check order status
|
|
189
|
+
clishop order list --json
|
|
190
|
+
```
|
|
47
191
|
|
|
48
|
-
|
|
192
|
+
### Use agent safety profiles
|
|
49
193
|
|
|
50
|
-
|
|
194
|
+
Agents act as guardrails. Create a `shopping-bot` agent with a $50 spending cap:
|
|
51
195
|
|
|
52
196
|
```bash
|
|
53
|
-
clishop
|
|
54
|
-
clishop login # interactive: email, password
|
|
55
|
-
clishop login -e user@example.com -p pass # non-interactive
|
|
56
|
-
clishop logout # clears local tokens
|
|
57
|
-
clishop whoami # prints current user name, email, id
|
|
197
|
+
clishop agent create shopping-bot --max-amount 50 --no-confirm
|
|
58
198
|
```
|
|
59
199
|
|
|
60
|
-
|
|
200
|
+
Then use it:
|
|
61
201
|
|
|
62
202
|
```bash
|
|
63
|
-
clishop
|
|
203
|
+
clishop search "USB-C cable" --agent shopping-bot --json
|
|
204
|
+
clishop buy prod_xxx --agent shopping-bot -y
|
|
64
205
|
```
|
|
65
206
|
|
|
66
|
-
|
|
207
|
+
### JSON output everywhere
|
|
67
208
|
|
|
68
|
-
|
|
209
|
+
Append `--json` to any read command for structured output:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
clishop search "laptop stand" --json
|
|
213
|
+
clishop order list --json
|
|
214
|
+
clishop order show ordr_xxx --json
|
|
215
|
+
clishop product prod_xxx --json
|
|
216
|
+
clishop review list --json
|
|
217
|
+
clishop store list --json
|
|
218
|
+
clishop status --json
|
|
219
|
+
clishop advertise list --json
|
|
220
|
+
clishop support list --json
|
|
221
|
+
clishop feedback list --json
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Exit codes
|
|
225
|
+
|
|
226
|
+
| Code | Meaning |
|
|
227
|
+
|------|---------|
|
|
228
|
+
| `0` | Success |
|
|
229
|
+
| `1` | Error (auth failure, not found, validation, API error) |
|
|
230
|
+
|
|
231
|
+
Errors are printed to `stderr`. Successful JSON output goes to `stdout`.
|
|
69
232
|
|
|
70
233
|
## Concepts
|
|
71
234
|
|
|
72
235
|
### Agents
|
|
73
236
|
|
|
74
|
-
Agents are **safety profiles** that control
|
|
237
|
+
Agents are **safety profiles** that control how the CLI behaves when placing orders. Every account has a `default` agent.
|
|
238
|
+
|
|
239
|
+
| Setting | Description |
|
|
240
|
+
|---------|-------------|
|
|
241
|
+
| `maxOrderAmount` | Spending cap per order (in dollars) |
|
|
242
|
+
| `requireConfirmation` | Prompt before placing an order |
|
|
243
|
+
| `allowedCategories` | Whitelist of product categories |
|
|
244
|
+
| `blockedCategories` | Blacklist of product categories |
|
|
245
|
+
| `defaultAddressId` | Default shipping address |
|
|
246
|
+
| `defaultPaymentMethodId` | Default payment method |
|
|
75
247
|
|
|
76
|
-
|
|
77
|
-
- `maxOrderAmount` — spending cap per order (in dollars)
|
|
78
|
-
- `requireConfirmation` — whether to prompt before placing an order
|
|
79
|
-
- `allowedCategories` / `blockedCategories` — category restrictions
|
|
80
|
-
- `defaultAddressId` — default shipping address
|
|
81
|
-
- `defaultPaymentMethodId` — default payment method
|
|
248
|
+
Use `--agent <name>` on any command to override the active agent for that invocation.
|
|
82
249
|
|
|
83
|
-
|
|
250
|
+
### Stores & Extended Search
|
|
251
|
+
|
|
252
|
+
Products live in stores (vendors). When a regular search doesn't find what you need, CLISHOP can automatically query vendor stores in real-time via **extended search**. This happens automatically when no local results are found, or can be forced with `--extended-search`.
|
|
253
|
+
|
|
254
|
+
After an extended search, use `clishop info <id>` to request detailed product information directly from the vendor's store.
|
|
255
|
+
|
|
256
|
+
### Advertised Requests
|
|
257
|
+
|
|
258
|
+
Can't find what you're looking for? Publish a request describing what you need, and vendors can submit bids:
|
|
84
259
|
|
|
85
260
|
```bash
|
|
86
|
-
|
|
87
|
-
clishop
|
|
261
|
+
# Interactive
|
|
262
|
+
clishop advertise create
|
|
263
|
+
|
|
264
|
+
# Non-interactive (for agents)
|
|
265
|
+
clishop advertise quick "Custom engraved laptop stand" \
|
|
266
|
+
--brand "StandCo" \
|
|
267
|
+
--bid-price 89.99 \
|
|
268
|
+
--quantity 1 \
|
|
269
|
+
--speed 5 \
|
|
270
|
+
--free-returns
|
|
88
271
|
```
|
|
89
272
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Products belong to stores (vendors). Stores are first-class entities with their own IDs (`stor_xxx`). The CLI displays the store name alongside products.
|
|
273
|
+
Vendors see your request and can submit bids with pricing, delivery estimates, and return policies. You (or your agent) can then accept or reject bids.
|
|
93
274
|
|
|
94
275
|
### IDs
|
|
95
276
|
|
|
96
277
|
All entities use short, prefixed IDs:
|
|
97
278
|
|
|
98
|
-
| Prefix | Entity
|
|
99
|
-
|
|
100
|
-
| `prod_` | Product
|
|
101
|
-
| `ordr_` | Order
|
|
102
|
-
| `addr_` | Address
|
|
279
|
+
| Prefix | Entity | Example |
|
|
280
|
+
|--------|--------|---------|
|
|
281
|
+
| `prod_` | Product | `prod_a8k3m2x9p4w1` |
|
|
282
|
+
| `ordr_` | Order | `ordr_b7n4q1y8t3v6` |
|
|
283
|
+
| `addr_` | Address | `addr_c9j2w5r8m1k4` |
|
|
103
284
|
| `pymt_` | Payment method | `pymt_d3f8k1n7p2q9` |
|
|
104
|
-
| `stor_` | Store
|
|
105
|
-
| `user_` | User
|
|
106
|
-
| `agnt_` | Agent
|
|
107
|
-
| `chkt_` | Checkout
|
|
285
|
+
| `stor_` | Store | `stor_e4g7j2m8r5t1` |
|
|
286
|
+
| `user_` | User | `user_f5h8k3n9s6v2` |
|
|
287
|
+
| `agnt_` | Agent | `agnt_g6j9l4p1t7w3` |
|
|
288
|
+
| `chkt_` | Checkout | `chkt_h7k1m5q2u8x4` |
|
|
289
|
+
| `fdbk_` | Feedback | `fdbk_i8l2n6r3v9y5` |
|
|
108
290
|
|
|
109
291
|
### Money
|
|
110
292
|
|
|
111
|
-
All prices are stored and returned in **cents** (integer). The CLI converts to dollars for display. Example: `7999`
|
|
112
|
-
|
|
113
|
-
---
|
|
293
|
+
All prices are stored and returned in **cents** (integer). The CLI converts to dollars for display. Example: `7999` → `$79.99`.
|
|
114
294
|
|
|
115
295
|
## Command Reference
|
|
116
296
|
|
|
297
|
+
### Authentication
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
clishop register # Interactive account creation
|
|
301
|
+
clishop login # Interactive login
|
|
302
|
+
clishop login -e user@example.com -p pass # Non-interactive login
|
|
303
|
+
clishop logout # Clear local tokens
|
|
304
|
+
clishop whoami # Print current user info
|
|
305
|
+
```
|
|
306
|
+
|
|
117
307
|
### Search & Browse
|
|
118
308
|
|
|
119
309
|
```bash
|
|
120
|
-
clishop search <query>
|
|
121
|
-
clishop search <query> --json
|
|
122
|
-
clishop search <query> -c Electronics
|
|
123
|
-
clishop search <query> --
|
|
124
|
-
clishop search <query> --
|
|
125
|
-
clishop search <query> --
|
|
126
|
-
clishop search <query> --
|
|
127
|
-
clishop search <query> --
|
|
128
|
-
clishop search <query> -
|
|
129
|
-
clishop search <query> -
|
|
130
|
-
|
|
131
|
-
clishop
|
|
132
|
-
clishop
|
|
310
|
+
clishop search <query> # Search for products
|
|
311
|
+
clishop search <query> --json # JSON output
|
|
312
|
+
clishop search <query> -c Electronics # Filter by category
|
|
313
|
+
clishop search <query> --brand Sony # Filter by brand
|
|
314
|
+
clishop search <query> --store AudioTech # Filter by store
|
|
315
|
+
clishop search <query> --min-price 1000 # Min price (cents)
|
|
316
|
+
clishop search <query> --max-price 10000 # Max price (cents)
|
|
317
|
+
clishop search <query> --min-rating 4 # Min rating (1-5)
|
|
318
|
+
clishop search <query> --in-stock # Only in-stock items
|
|
319
|
+
clishop search <query> --free-shipping # Free shipping only
|
|
320
|
+
clishop search <query> --free-returns # Free returns only
|
|
321
|
+
clishop search <query> --express # 2-day or faster delivery
|
|
322
|
+
clishop search <query> --ship-to "Home" # Use saved address for location
|
|
323
|
+
clishop search <query> --country US # Delivery country
|
|
324
|
+
clishop search <query> --deliver-by 2026-03-01 # Need it by date
|
|
325
|
+
clishop search <query> --trusted-only # Verified stores only
|
|
326
|
+
clishop search <query> -e # Force extended search
|
|
327
|
+
clishop search <query> -i # Interactive: select products for more info
|
|
328
|
+
clishop search <query> --compact # One-line-per-result output
|
|
329
|
+
clishop search <query> --detailed # Full details inline
|
|
330
|
+
clishop search <query> -s price --order asc # Sort by price ascending
|
|
331
|
+
clishop search <query> -p 2 -n 10 # Page 2, 10 results per page
|
|
332
|
+
|
|
333
|
+
clishop product <productId> # View product details
|
|
334
|
+
clishop product <productId> --json # JSON output
|
|
335
|
+
|
|
336
|
+
clishop info <id> [id...] # Get detailed info from vendor stores
|
|
337
|
+
clishop info <id> --json # JSON output
|
|
133
338
|
```
|
|
134
339
|
|
|
135
|
-
**Sort options
|
|
340
|
+
**Sort options:** `price`, `total-cost`, `rating`, `relevance`, `newest`, `delivery`
|
|
136
341
|
|
|
137
342
|
### Ordering
|
|
138
343
|
|
|
139
344
|
```bash
|
|
140
|
-
clishop buy <productId>
|
|
141
|
-
clishop buy <productId> -q 3
|
|
142
|
-
clishop buy <productId> --address <id>
|
|
143
|
-
clishop buy <productId> --payment <id>
|
|
144
|
-
clishop buy <productId> -y
|
|
145
|
-
clishop buy <productId> --agent work
|
|
146
|
-
|
|
147
|
-
clishop order list
|
|
148
|
-
clishop order list --status pending
|
|
149
|
-
clishop order list --json
|
|
150
|
-
clishop order show <orderId>
|
|
151
|
-
clishop order
|
|
152
|
-
clishop order cancel <orderId> # cancel an order (interactive confirm)
|
|
345
|
+
clishop buy <productId> # Quick-buy with defaults
|
|
346
|
+
clishop buy <productId> -q 3 # Buy quantity 3
|
|
347
|
+
clishop buy <productId> --address <id> # Specify shipping address
|
|
348
|
+
clishop buy <productId> --payment <id> # Specify payment method
|
|
349
|
+
clishop buy <productId> -y # Skip confirmation prompt
|
|
350
|
+
clishop buy <productId> --agent work # Use a specific agent
|
|
351
|
+
|
|
352
|
+
clishop order list # List your orders
|
|
353
|
+
clishop order list --status pending # Filter by status
|
|
354
|
+
clishop order list --json # JSON output
|
|
355
|
+
clishop order show <orderId> # Order details + tracking
|
|
356
|
+
clishop order cancel <orderId> # Cancel an order
|
|
153
357
|
```
|
|
154
358
|
|
|
155
|
-
**Order statuses
|
|
156
|
-
|
|
157
|
-
The `buy` command:
|
|
158
|
-
1. Fetches product info
|
|
159
|
-
2. Checks agent safety limits (max amount, category restrictions)
|
|
160
|
-
3. Shows a confirmation prompt (unless `-y` or agent has `requireConfirmation: false`)
|
|
161
|
-
4. Creates a checkout + order on the backend
|
|
162
|
-
5. Returns the order ID
|
|
359
|
+
**Order statuses:** `pending`, `confirmed`, `processing`, `shipped`, `delivered`, `cancelled`
|
|
163
360
|
|
|
164
361
|
### Agents
|
|
165
362
|
|
|
166
363
|
```bash
|
|
167
|
-
clishop agent list
|
|
168
|
-
clishop agent show
|
|
169
|
-
clishop agent show <name>
|
|
170
|
-
clishop agent create <name>
|
|
171
|
-
clishop agent create <name> --max-amount
|
|
172
|
-
clishop agent
|
|
173
|
-
clishop agent
|
|
174
|
-
clishop agent
|
|
175
|
-
clishop agent delete <name> # delete an agent (cannot delete "default")
|
|
364
|
+
clishop agent list # List all agents
|
|
365
|
+
clishop agent show # Show active agent
|
|
366
|
+
clishop agent show <name> # Show specific agent
|
|
367
|
+
clishop agent create <name> # Interactive creation
|
|
368
|
+
clishop agent create <name> --max-amount 100 --no-confirm # Non-interactive
|
|
369
|
+
clishop agent use <name> # Switch active agent
|
|
370
|
+
clishop agent update <name> # Update agent settings
|
|
371
|
+
clishop agent delete <name> # Delete (can't delete "default")
|
|
176
372
|
```
|
|
177
373
|
|
|
178
374
|
### Addresses
|
|
179
375
|
|
|
180
|
-
Addresses are scoped to the active agent.
|
|
181
|
-
|
|
182
376
|
```bash
|
|
183
|
-
clishop address list
|
|
184
|
-
clishop address add
|
|
185
|
-
clishop address remove <
|
|
186
|
-
clishop address set-default <
|
|
377
|
+
clishop address list # List addresses
|
|
378
|
+
clishop address add # Interactive: add address
|
|
379
|
+
clishop address remove <id> # Remove address
|
|
380
|
+
clishop address set-default <id> # Set default for active agent
|
|
187
381
|
```
|
|
188
382
|
|
|
189
|
-
Address fields when adding:
|
|
190
|
-
- **Label**: e.g. "Home", "Office"
|
|
191
|
-
- **Street name and number**: e.g. "123 Main St"
|
|
192
|
-
- **Apartment/suite** (optional)
|
|
193
|
-
- **Postal / ZIP code**
|
|
194
|
-
- **City**
|
|
195
|
-
- **State / Province / Region** (optional — supports international addresses)
|
|
196
|
-
- **Country**
|
|
197
|
-
|
|
198
383
|
### Payment Methods
|
|
199
384
|
|
|
200
|
-
Payment methods are scoped to the active agent. The CLI never collects card details — it opens a secure browser link.
|
|
201
|
-
|
|
202
385
|
```bash
|
|
203
|
-
clishop payment list
|
|
204
|
-
clishop payment add
|
|
205
|
-
clishop payment remove <
|
|
206
|
-
clishop payment set-default <
|
|
386
|
+
clishop payment list # List payment methods
|
|
387
|
+
clishop payment add # Get secure setup link
|
|
388
|
+
clishop payment remove <id> # Remove payment method
|
|
389
|
+
clishop payment set-default <id> # Set default for active agent
|
|
207
390
|
```
|
|
208
391
|
|
|
209
392
|
### Reviews
|
|
210
393
|
|
|
211
394
|
```bash
|
|
212
|
-
clishop review add <productId>
|
|
213
|
-
clishop review list
|
|
214
|
-
clishop review list --json
|
|
215
|
-
clishop review delete <reviewId>
|
|
395
|
+
clishop review add <productId> # Write a review
|
|
396
|
+
clishop review list # List your reviews
|
|
397
|
+
clishop review list --json # JSON output
|
|
398
|
+
clishop review delete <reviewId> # Delete a review
|
|
216
399
|
```
|
|
217
400
|
|
|
218
|
-
###
|
|
401
|
+
### Stores
|
|
219
402
|
|
|
220
403
|
```bash
|
|
221
|
-
clishop
|
|
222
|
-
clishop
|
|
223
|
-
clishop
|
|
224
|
-
clishop
|
|
225
|
-
clishop
|
|
404
|
+
clishop store list # List available stores
|
|
405
|
+
clishop store list --verified # Only verified stores
|
|
406
|
+
clishop store list --min-rating 4 # Min store rating
|
|
407
|
+
clishop store info <store> # Store details
|
|
408
|
+
clishop store catalog <store> # Browse store products
|
|
409
|
+
clishop store catalog <store> -q "cable" # Search within store
|
|
226
410
|
```
|
|
227
411
|
|
|
228
|
-
###
|
|
412
|
+
### Advertised Requests
|
|
229
413
|
|
|
230
414
|
```bash
|
|
231
|
-
clishop
|
|
415
|
+
clishop advertise create # Interactive: publish a request
|
|
416
|
+
clishop advertise quick <title> # Non-interactive: publish a request
|
|
417
|
+
clishop advertise list # List your requests
|
|
418
|
+
clishop advertise show <id> # View request + bids
|
|
419
|
+
clishop advertise accept <id> <bidId> # Accept a vendor bid
|
|
420
|
+
clishop advertise reject <id> <bidId> # Reject a vendor bid
|
|
421
|
+
clishop advertise cancel <id> # Cancel a request
|
|
232
422
|
```
|
|
233
423
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
## Non-Interactive Usage (for AI Agents & Scripts)
|
|
237
|
-
|
|
238
|
-
The CLI is designed to work in automated/scripted environments:
|
|
239
|
-
|
|
240
|
-
### Login without prompts
|
|
424
|
+
### Support Tickets
|
|
241
425
|
|
|
242
426
|
```bash
|
|
243
|
-
clishop
|
|
427
|
+
clishop support create <orderId> # Create a support ticket
|
|
428
|
+
clishop support list # List your tickets
|
|
429
|
+
clishop support show <ticketId> # View ticket + messages
|
|
430
|
+
clishop support reply <ticketId> # Reply to a ticket
|
|
431
|
+
clishop support close <ticketId> # Close a ticket
|
|
244
432
|
```
|
|
245
433
|
|
|
246
|
-
###
|
|
434
|
+
### Bug Reports & Suggestions
|
|
247
435
|
|
|
248
|
-
|
|
249
|
-
clishop buy <productId> -y
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### JSON output for parsing
|
|
436
|
+
Found a bug? Have an idea to make CLISHOP better? Report it directly from the terminal:
|
|
253
437
|
|
|
254
438
|
```bash
|
|
255
|
-
|
|
256
|
-
clishop
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
clishop
|
|
439
|
+
# Report a bug (interactive — prompts for details)
|
|
440
|
+
clishop feedback bug
|
|
441
|
+
|
|
442
|
+
# Report a bug (non-interactive — for agents/scripts)
|
|
443
|
+
clishop feedback bug \
|
|
444
|
+
--title "Search crashes on empty query" \
|
|
445
|
+
--description "Running search with no query causes unhandled error" \
|
|
446
|
+
--steps "1. Run: clishop search \"\"\n2. Observe crash" \
|
|
447
|
+
--actual "CLI exits with stack trace" \
|
|
448
|
+
--expected "Should show a friendly 'query required' error"
|
|
449
|
+
|
|
450
|
+
# Submit a suggestion (interactive)
|
|
451
|
+
clishop feedback suggest
|
|
452
|
+
|
|
453
|
+
# Submit a suggestion (non-interactive)
|
|
454
|
+
clishop feedback suggest \
|
|
455
|
+
--title "Add wishlist feature" \
|
|
456
|
+
--description "Would be great to save products to a wishlist for later"
|
|
457
|
+
|
|
458
|
+
# List your feedback
|
|
459
|
+
clishop feedback list # All feedback
|
|
460
|
+
clishop feedback list --type bug # Only bug reports
|
|
461
|
+
clishop feedback list --type suggestion # Only suggestions
|
|
462
|
+
clishop feedback list --status fixed # Filter by status
|
|
463
|
+
clishop feedback list --json # JSON output
|
|
464
|
+
|
|
465
|
+
# View a specific report
|
|
466
|
+
clishop feedback show <id> # View details + status
|
|
467
|
+
clishop feedback show <id> --json # JSON output
|
|
260
468
|
```
|
|
261
469
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
470
|
+
**Bug report fields:**
|
|
471
|
+
| Field | Description |
|
|
472
|
+
|-------|-------------|
|
|
473
|
+
| `title` | Short summary of the bug |
|
|
474
|
+
| `description` | General description |
|
|
475
|
+
| `steps` | How to trigger the bug (steps to reproduce) |
|
|
476
|
+
| `actual` | What actually happens |
|
|
477
|
+
| `expected` | What you expected to happen |
|
|
270
478
|
|
|
271
|
-
|
|
272
|
-
clishop product prod_a8k3m2x9p4w1 --json
|
|
479
|
+
**Feedback statuses:** `open`, `acknowledged`, `in_progress`, `fixed`, `wont_fix`, `closed`
|
|
273
480
|
|
|
274
|
-
|
|
275
|
-
clishop buy prod_a8k3m2x9p4w1 -y
|
|
276
|
-
|
|
277
|
-
# 5. Check order status
|
|
278
|
-
clishop order list --json
|
|
279
|
-
```
|
|
481
|
+
The CLISHOP team reviews all feedback and updates the status. You'll see admin notes when you check your feedback with `clishop feedback show <id>`.
|
|
280
482
|
|
|
281
|
-
###
|
|
483
|
+
### Account & Config
|
|
282
484
|
|
|
283
485
|
```bash
|
|
284
|
-
clishop
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
### Exit codes
|
|
288
|
-
|
|
289
|
-
- `0` — success
|
|
290
|
-
- `1` — error (auth failure, not found, validation error, API error)
|
|
486
|
+
clishop status # Full account overview
|
|
487
|
+
clishop status --json # JSON output
|
|
291
488
|
|
|
292
|
-
|
|
489
|
+
clishop config show # Show current config
|
|
490
|
+
clishop config set-output json # Set output format (human | json)
|
|
491
|
+
clishop config reset # Reset config to defaults
|
|
492
|
+
clishop config path # Print config file path
|
|
293
493
|
|
|
294
|
-
|
|
494
|
+
clishop setup # Re-run setup wizard
|
|
495
|
+
```
|
|
295
496
|
|
|
296
|
-
## Configuration
|
|
497
|
+
## Configuration
|
|
297
498
|
|
|
298
499
|
| Data | Location |
|
|
299
500
|
|------|----------|
|
|
300
501
|
| CLI config (agents, preferences) | `~/.config/clishop/config.json` (or OS equivalent) |
|
|
301
502
|
| Auth tokens | OS keychain (via `keytar`) |
|
|
302
503
|
|
|
303
|
-
|
|
504
|
+
Find the config path:
|
|
304
505
|
|
|
305
506
|
```bash
|
|
306
507
|
clishop config path
|
|
307
508
|
```
|
|
308
509
|
|
|
309
|
-
---
|
|
310
|
-
|
|
311
510
|
## Environment Variables
|
|
312
511
|
|
|
313
512
|
| Variable | Purpose | Default |
|
|
314
513
|
|----------|---------|---------|
|
|
315
514
|
| `CLISHOP_API_URL` | Override the backend API URL | `https://clishop-backend.vercel.app/api` |
|
|
316
515
|
|
|
317
|
-
|
|
516
|
+
`CLISHOP_API_URL` takes precedence over the local `config.apiBaseUrl` value.
|
|
318
517
|
|
|
319
518
|
## Architecture
|
|
320
519
|
|
|
321
520
|
```
|
|
322
|
-
|
|
323
|
-
│
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
│
|
|
329
|
-
|
|
330
|
-
|
|
521
|
+
┌─────────────────────────────┐
|
|
522
|
+
│ AI Agent / Script / Human │
|
|
523
|
+
└──────────────┬──────────────┘
|
|
524
|
+
│
|
|
525
|
+
┌───────▼───────┐
|
|
526
|
+
│ CLISHOP CLI │ ← this repo
|
|
527
|
+
│ (Node.js) │
|
|
528
|
+
└───────┬───────┘
|
|
529
|
+
│ HTTPS
|
|
530
|
+
┌───────▼───────┐
|
|
531
|
+
│ CLISHOP API │ ← clishop-backend
|
|
532
|
+
│ (Vercel) │
|
|
533
|
+
└───────┬───────┘
|
|
534
|
+
│
|
|
535
|
+
┌──────────┼──────────┐
|
|
536
|
+
▼ ▼ ▼
|
|
537
|
+
Store A Store B Store C ← vendor stores
|
|
331
538
|
```
|
|
332
539
|
|
|
333
|
-
The CLI is a
|
|
540
|
+
The CLI is a stateless client. It doesn't own any database or vendor integrations — all data flows through the backend API.
|
|
541
|
+
|
|
542
|
+
## Tech Stack
|
|
543
|
+
|
|
544
|
+
| Component | Technology |
|
|
545
|
+
|-----------|------------|
|
|
546
|
+
| Language | TypeScript (ESM) |
|
|
547
|
+
| CLI framework | [Commander.js](https://github.com/tj/commander.js) |
|
|
548
|
+
| HTTP client | [Axios](https://github.com/axios/axios) |
|
|
549
|
+
| Prompts | [Inquirer.js](https://github.com/SBoudrias/Inquirer.js) |
|
|
550
|
+
| Config storage | [Conf](https://github.com/sindresorhus/conf) |
|
|
551
|
+
| Keychain | [Keytar](https://github.com/nicktrav/node-keytar) |
|
|
552
|
+
| Spinners | [Ora](https://github.com/sindresorhus/ora) |
|
|
553
|
+
| Colors | [Chalk](https://github.com/chalk/chalk) |
|
|
554
|
+
| Bundler | [tsup](https://github.com/egoist/tsup) |
|
|
555
|
+
|
|
556
|
+
## Development
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
git clone https://github.com/DavooxBv2/CLISHOP.git
|
|
560
|
+
cd CLISHOP
|
|
561
|
+
npm install
|
|
562
|
+
|
|
563
|
+
# Run in dev mode (no build step)
|
|
564
|
+
npm run dev -- search "headphones"
|
|
565
|
+
|
|
566
|
+
# Build
|
|
567
|
+
npm run build
|
|
568
|
+
|
|
569
|
+
# Type-check
|
|
570
|
+
npm run lint
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
## Contributing
|
|
574
|
+
|
|
575
|
+
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
|
|
576
|
+
|
|
577
|
+
1. Fork the repo
|
|
578
|
+
2. Create a feature branch (`git checkout -b feat/my-feature`)
|
|
579
|
+
3. Commit your changes (`git commit -m 'feat: add my feature'`)
|
|
580
|
+
4. Push to the branch (`git push origin feat/my-feature`)
|
|
581
|
+
5. Open a Pull Request
|
|
582
|
+
|
|
583
|
+
## License
|
|
584
|
+
|
|
585
|
+
[ISC](LICENSE)
|