clishop 1.2.2 → 1.2.4
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/dist/index.js +3 -8
- package/dist/mcp.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -932,7 +932,7 @@ async function runSetupWizard() {
|
|
|
932
932
|
console.log();
|
|
933
933
|
console.log(chalk4.bold.cyan(" W E L C O M E T O C L I S H O P"));
|
|
934
934
|
console.log(chalk4.dim(" Order anything from your terminal."));
|
|
935
|
-
console.log(chalk4.dim(` Build: ${"2026-03-
|
|
935
|
+
console.log(chalk4.dim(` Build: ${"2026-03-04T15:39:11.106Z"}`));
|
|
936
936
|
console.log();
|
|
937
937
|
divider(chalk4.cyan);
|
|
938
938
|
console.log();
|
|
@@ -1895,7 +1895,6 @@ function renderProductInfo(result, index, totalResults, formatPriceFn) {
|
|
|
1895
1895
|
}
|
|
1896
1896
|
if (info.checkout && typeof info.checkout === "object") {
|
|
1897
1897
|
const parts = [];
|
|
1898
|
-
if (info.checkout.mode) parts.push(info.checkout.mode);
|
|
1899
1898
|
if (info.checkout.note) parts.push(info.checkout.note);
|
|
1900
1899
|
if (parts.length > 0) {
|
|
1901
1900
|
console.log(` ${chalk6.bold("Checkout:")} ${parts.join(" \u2014 ")}`);
|
|
@@ -2073,7 +2072,7 @@ function renderProductInfo(result, index, totalResults, formatPriceFn) {
|
|
|
2073
2072
|
}
|
|
2074
2073
|
}
|
|
2075
2074
|
function registerSearchCommands(program2) {
|
|
2076
|
-
program2.command("search <query>").description("Search for products").option("-c, --category <category>", "Filter by category").option("--brand <brand>", "Filter by brand").option("--model <model>", "Filter by model name/number").option("--sku <sku>", "Filter by SKU").option("--gtin <gtin>", "Filter by GTIN (UPC/EAN/ISBN)").option("--variant <variant>", "Filter by variant (size/color/storage/etc.)").option("--min-price <price>", "Minimum price (cents)", parseFloat).option("--max-price <price>", "Maximum price (cents)", parseFloat).option("--max-shipping <price>", "Maximum shipping cost (cents)", parseInt).option("--max-total <price>", "Maximum landed total: item + shipping (cents)", parseInt).option("--free-shipping", "Only show items with free shipping").option("--ship-to <address>", "Saved address label or ID (resolves country/city/postal automatically)").option("--country <code>", "Delivery country (ISO 3166-1 alpha-2, e.g. US, BE, NL)").option("--city <city>", "Delivery city").option("--postal-code <code>", "Delivery postal/zip code").option("--region <region>", "Delivery state/province/region").option("--lat <latitude>", "Delivery latitude (for local/proximity search)", parseFloat).option("--lng <longitude>", "Delivery longitude (for local/proximity search)", parseFloat).option("--deliver-by <date>", "Need delivery by date (YYYY-MM-DD)").option("--max-delivery-days <days>", "Maximum delivery/transit days", parseInt).option("--in-stock", "Only show in-stock items").option("--exclude-backorder", "Exclude backordered items").option("--min-qty <qty>", "Minimum quantity available", parseInt).option("--free-returns", "Only show items with free returns").option("--min-return-window-days <days>", "Minimum return window in days", parseInt).option("--store <store>", "Limit to a store (ID, slug, or name)").option("--vendor <vendor>", "Filter by vendor name (alias for --store)").option("--trusted-only", "Only show products from verified stores").option("--min-store-rating <rating>", "Minimum store rating (0-5)", parseFloat).option("--
|
|
2075
|
+
program2.command("search <query>").description("Search for products").option("-c, --category <category>", "Filter by category").option("--brand <brand>", "Filter by brand").option("--model <model>", "Filter by model name/number").option("--sku <sku>", "Filter by SKU").option("--gtin <gtin>", "Filter by GTIN (UPC/EAN/ISBN)").option("--variant <variant>", "Filter by variant (size/color/storage/etc.)").option("--min-price <price>", "Minimum price (cents)", parseFloat).option("--max-price <price>", "Maximum price (cents)", parseFloat).option("--max-shipping <price>", "Maximum shipping cost (cents)", parseInt).option("--max-total <price>", "Maximum landed total: item + shipping (cents)", parseInt).option("--free-shipping", "Only show items with free shipping").option("--ship-to <address>", "Saved address label or ID (resolves country/city/postal automatically)").option("--country <code>", "Delivery country (ISO 3166-1 alpha-2, e.g. US, BE, NL)").option("--city <city>", "Delivery city").option("--postal-code <code>", "Delivery postal/zip code").option("--region <region>", "Delivery state/province/region").option("--lat <latitude>", "Delivery latitude (for local/proximity search)", parseFloat).option("--lng <longitude>", "Delivery longitude (for local/proximity search)", parseFloat).option("--deliver-by <date>", "Need delivery by date (YYYY-MM-DD)").option("--max-delivery-days <days>", "Maximum delivery/transit days", parseInt).option("--in-stock", "Only show in-stock items").option("--exclude-backorder", "Exclude backordered items").option("--min-qty <qty>", "Minimum quantity available", parseInt).option("--free-returns", "Only show items with free returns").option("--min-return-window-days <days>", "Minimum return window in days", parseInt).option("--store <store>", "Limit to a store (ID, slug, or name)").option("--vendor <vendor>", "Filter by vendor name (alias for --store)").option("--trusted-only", "Only show products from verified stores").option("--min-store-rating <rating>", "Minimum store rating (0-5)", parseFloat).option("--min-rating <rating>", "Minimum product rating (1-5)", parseFloat).option("-s, --sort <field>", "Sort by: price, total-cost, rating, relevance, newest, delivery", "relevance").option("--order <dir>", "Sort order: asc, desc", "desc").option("-p, --page <page>", "Page number", parseInt, 1).option("-n, --per-page <count>", "Results per page", parseInt, 10).option("--express", "Only show items with 2-day or faster delivery").option("-e, --extended-search", "Enable extended search: query darkstores when no local results found").option("--no-extended-search", "Disable automatic extended search when no local results found").option("--extended-timeout <seconds>", "Extended search timeout in seconds (default: 30, max: 60)", parseInt).option("--json", "Output raw JSON").option("--compact", "Compact one-line-per-result output").option("--detailed", "Show full product details inline").option("-i, --interactive", "After results, interactively select products to get more info from their store").action(async (query, opts) => {
|
|
2077
2076
|
try {
|
|
2078
2077
|
const spinner = ora5(`Searching for "${query}"...`).start();
|
|
2079
2078
|
const api = getApiClient();
|
|
@@ -2186,7 +2185,6 @@ function registerSearchCommands(program2) {
|
|
|
2186
2185
|
vendor: opts.vendor,
|
|
2187
2186
|
trustedOnly: opts.trustedOnly || void 0,
|
|
2188
2187
|
minStoreRating: opts.minStoreRating,
|
|
2189
|
-
checkoutMode: opts.checkoutMode,
|
|
2190
2188
|
// Rating / sorting / pagination
|
|
2191
2189
|
minRating: opts.minRating,
|
|
2192
2190
|
sort: opts.sort === "total-cost" ? "price" : opts.sort,
|
|
@@ -2634,9 +2632,6 @@ Results for "${query}" \u2014 ${result.total} found (page ${result.page})
|
|
|
2634
2632
|
if (p.freeReturns) returnParts.push(chalk6.green("Free Returns"));
|
|
2635
2633
|
if (p.returnWindowDays) returnParts.push(`${p.returnWindowDays}-day return window`);
|
|
2636
2634
|
if (returnParts.length) console.log(` Returns: ${returnParts.join(" \xB7 ")}`);
|
|
2637
|
-
if (p.checkoutMode && p.checkoutMode !== "instant") {
|
|
2638
|
-
console.log(` Checkout: ${chalk6.yellow(p.checkoutMode)}`);
|
|
2639
|
-
}
|
|
2640
2635
|
console.log();
|
|
2641
2636
|
console.log(` ${p.description}`);
|
|
2642
2637
|
console.log();
|
|
@@ -4587,7 +4582,7 @@ function registerFeedbackCommands(program2) {
|
|
|
4587
4582
|
|
|
4588
4583
|
// src/index.ts
|
|
4589
4584
|
var program = new Command();
|
|
4590
|
-
program.name("clishop").version("1.2.
|
|
4585
|
+
program.name("clishop").version("1.2.3").description(
|
|
4591
4586
|
chalk15.bold("CLISHOP") + ' \u2014 Order anything from your terminal.\n\n Use agents to set safety limits, addresses, and payment methods.\n The "default" agent is used when no agent is specified.'
|
|
4592
4587
|
).option("--agent <name>", "Use a specific agent for this command").hook("preAction", (thisCommand) => {
|
|
4593
4588
|
const agentOpt = thisCommand.opts().agent;
|
package/dist/mcp.js
CHANGED
|
@@ -13810,7 +13810,7 @@ function safeCall(fn) {
|
|
|
13810
13810
|
var server = new McpServer(
|
|
13811
13811
|
{
|
|
13812
13812
|
name: "clishop",
|
|
13813
|
-
version: "1.2.
|
|
13813
|
+
version: "1.2.3"
|
|
13814
13814
|
},
|
|
13815
13815
|
{
|
|
13816
13816
|
capabilities: {
|
|
@@ -13853,7 +13853,7 @@ server.registerTool("search_products", {
|
|
|
13853
13853
|
if (!country) {
|
|
13854
13854
|
const agent = getActiveAgent();
|
|
13855
13855
|
try {
|
|
13856
|
-
const addrRes = await api.get("/addresses"
|
|
13856
|
+
const addrRes = await api.get("/addresses");
|
|
13857
13857
|
const addresses = addrRes.data.addresses || [];
|
|
13858
13858
|
const resolved = agent.defaultAddressId && addresses.find((a) => a.id === agent.defaultAddressId) || addresses[0];
|
|
13859
13859
|
if (resolved) {
|