clishop 1.5.0 → 1.5.2
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/README.md +31 -2
- package/dist/index.js +20 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,13 +74,37 @@ npm link
|
|
|
74
74
|
|
|
75
75
|
## Quick Start
|
|
76
76
|
|
|
77
|
-
You can create your account on [clishop.ai](https://clishop.ai) or do everything from the CLI
|
|
77
|
+
You can create your account on [clishop.ai](https://clishop.ai) or do everything from the CLI.
|
|
78
|
+
|
|
79
|
+
### Human-friendly setup
|
|
78
80
|
|
|
79
81
|
```bash
|
|
80
82
|
clishop setup
|
|
81
83
|
```
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
This starts the interactive setup flow, creates a resumable setup session, shows a secure payment link, and waits for completion.
|
|
86
|
+
|
|
87
|
+
### Agent-safe setup
|
|
88
|
+
|
|
89
|
+
For OpenClaw, MCP clients, Claude-style shells, and other tool runners, use the explicit setup session commands instead of scraping terminal output:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
clishop setup start --email user@example.com --json
|
|
93
|
+
clishop setup status --setup-id <setup_id> --json
|
|
94
|
+
clishop setup wait --setup-id <setup_id> --timeout 300 --json
|
|
95
|
+
clishop setup cancel --setup-id <setup_id> --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`setup start` returns immediately with:
|
|
99
|
+
|
|
100
|
+
- `setup_id`: the resumable setup session handle for the agent
|
|
101
|
+
- `setup_url`: the link the human must open in a browser
|
|
102
|
+
- `expires_at`: when the session expires
|
|
103
|
+
- `poll_after_seconds`: suggested polling interval
|
|
104
|
+
|
|
105
|
+
The agent sends `setup_url` to the human and keeps `setup_id` locally for `status`, `wait`, or `cancel`.
|
|
106
|
+
|
|
107
|
+
After setup is complete, add a shipping address and start ordering:
|
|
84
108
|
|
|
85
109
|
```
|
|
86
110
|
$ clishop search "wireless headphones"
|
|
@@ -179,6 +203,11 @@ clishop-mcp # If installed globally
|
|
|
179
203
|
npx -y clishop --mcp # Without installing
|
|
180
204
|
```
|
|
181
205
|
|
|
206
|
+
The MCP onboarding tools now follow the same resumable setup session model:
|
|
207
|
+
|
|
208
|
+
- `setup` starts the session and returns `setup_id` plus `setup_url`
|
|
209
|
+
- `setup_status` checks progress and finalizes auth when setup is complete
|
|
210
|
+
|
|
182
211
|
See the [MCP setup guides](https://clishop.ai/docs#mcp-overview) for VS Code, Claude Desktop, Cursor, and Windsurf configuration.
|
|
183
212
|
|
|
184
213
|
---
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,7 @@ function registerAuthCommands(program2) {
|
|
|
55
55
|
program2.command("whoami").description("Show the currently logged-in user").action(async () => {
|
|
56
56
|
if (!await isLoggedIn()) {
|
|
57
57
|
console.log(chalk.yellow("Not set up yet. Run: clishop setup"));
|
|
58
|
+
console.log(chalk.dim("For agent runners, use: clishop setup start --email <email> --json"));
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
const user = await getUserInfo();
|
|
@@ -815,9 +816,6 @@ function divider(color = chalk4.cyan) {
|
|
|
815
816
|
function writeJson(payload) {
|
|
816
817
|
process.stdout.write(JSON.stringify(payload, null, 2) + "\n");
|
|
817
818
|
}
|
|
818
|
-
function isInteractiveSession() {
|
|
819
|
-
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
820
|
-
}
|
|
821
819
|
function isLikelyEmail(value) {
|
|
822
820
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value.trim());
|
|
823
821
|
}
|
|
@@ -845,6 +843,16 @@ function printSetupLink(message, setupUrl) {
|
|
|
845
843
|
console.log(" " + setupUrl);
|
|
846
844
|
console.log();
|
|
847
845
|
}
|
|
846
|
+
function printSetupEmailInstructions() {
|
|
847
|
+
console.log(chalk4.yellow(" Email is required to start setup."));
|
|
848
|
+
console.log();
|
|
849
|
+
console.log(chalk4.dim(" Human-friendly:"));
|
|
850
|
+
console.log(chalk4.white(" clishop setup user@example.com"));
|
|
851
|
+
console.log();
|
|
852
|
+
console.log(chalk4.dim(" Agent-safe JSON:"));
|
|
853
|
+
console.log(chalk4.white(" clishop setup start --email user@example.com --json"));
|
|
854
|
+
console.log();
|
|
855
|
+
}
|
|
848
856
|
function printSetupStartResult(result) {
|
|
849
857
|
console.log();
|
|
850
858
|
console.log(chalk4.bold(" Setup session created."));
|
|
@@ -1094,8 +1102,8 @@ async function runSetupWizard(emailArg, { json = false } = {}) {
|
|
|
1094
1102
|
console.log();
|
|
1095
1103
|
console.log(chalk4.bold.cyan(" W E L C O M E T O C L I S H O P"));
|
|
1096
1104
|
console.log(chalk4.dim(" Order anything from your terminal."));
|
|
1097
|
-
console.log(chalk4.dim(` npm: v${"1.5.
|
|
1098
|
-
console.log(chalk4.dim(` Build: ${"2026-04-
|
|
1105
|
+
console.log(chalk4.dim(` npm: v${"1.5.2"}`));
|
|
1106
|
+
console.log(chalk4.dim(` Build: ${"2026-04-04T20:51:01.276Z"}`));
|
|
1099
1107
|
console.log();
|
|
1100
1108
|
divider(chalk4.cyan);
|
|
1101
1109
|
console.log();
|
|
@@ -1109,15 +1117,9 @@ async function runSetupWizard(emailArg, { json = false } = {}) {
|
|
|
1109
1117
|
console.log();
|
|
1110
1118
|
let email = emailArg?.trim();
|
|
1111
1119
|
if (!email) {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
return;
|
|
1116
|
-
}
|
|
1117
|
-
const answers = await inquirer3.prompt([
|
|
1118
|
-
{ type: "input", name: "email", message: "Email:" }
|
|
1119
|
-
]);
|
|
1120
|
-
email = answers.email?.trim();
|
|
1120
|
+
printSetupEmailInstructions();
|
|
1121
|
+
process.exitCode = 1;
|
|
1122
|
+
return;
|
|
1121
1123
|
}
|
|
1122
1124
|
if (!email || !isLikelyEmail(email)) {
|
|
1123
1125
|
console.error(chalk4.red("\n\u2717 A valid email address is required.\n"));
|
|
@@ -3171,6 +3173,7 @@ function registerStatusCommand(program2) {
|
|
|
3171
3173
|
try {
|
|
3172
3174
|
if (!await isLoggedIn()) {
|
|
3173
3175
|
console.log(chalk11.yellow("\nNot set up yet. Run: clishop setup\n"));
|
|
3176
|
+
console.log(chalk11.dim("For agent runners, use: clishop setup start --email <email> --json\n"));
|
|
3174
3177
|
return;
|
|
3175
3178
|
}
|
|
3176
3179
|
const spinner = ora8("Fetching account overview...").start();
|
|
@@ -4288,10 +4291,11 @@ function registerDoctorCommand(program2) {
|
|
|
4288
4291
|
|
|
4289
4292
|
// src/index.ts
|
|
4290
4293
|
var program = new Command();
|
|
4291
|
-
program.name("clishop").version("1.5.
|
|
4294
|
+
program.name("clishop").version("1.5.2").description(
|
|
4292
4295
|
chalk16.bold("CLISHOP") + ` \u2014 Order anything from your terminal.
|
|
4293
4296
|
|
|
4294
|
-
Run 'clishop setup'
|
|
4297
|
+
Run 'clishop setup' for the human-friendly flow, or
|
|
4298
|
+
'clishop setup start --email <email> --json' for agent-safe setup.
|
|
4295
4299
|
Use agents to set safety limits, addresses, and payment methods.
|
|
4296
4300
|
The "default" agent is used when no agent is specified.`
|
|
4297
4301
|
).option("--agent <name>", "Use a specific agent for this command").hook("preAction", (thisCommand) => {
|