Metadata-Version: 2.4
Name: cli-market
Version: 1.6.0
Summary: mcp-name: io.github.Treevu-ai/cli-market-world - CLI Market: commerce API for AI agents. 43 MCP tools, 34 indicators, 30 verified retailers in 8 countries. MIT.
Author-email: CLI Market <hello@cli-market.dev>
License-Expression: MIT
Keywords: vtex,mcp,ai-agents,ecommerce,cli,retail,commerce,infrastructure
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.0
Requires-Dist: fastapi>=0.115
Requires-Dist: uvicorn>=0.30
Requires-Dist: pydantic>=2.0
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: psycopg2-binary>=2.9
Requires-Dist: asyncpg>=0.29
Provides-Extra: pg
Requires-Dist: asyncpg; extra == "pg"

mcp-name: io.github.Treevu-ai/cli-market-world

<p align="center"><img src="https://raw.githubusercontent.com/Treevu-ai/cli-market-world/main/social-preview.svg" alt="CLI Market" width="600"/></p>

<p align="center">
  <img src="https://img.shields.io/badge/retailers-60-brightgreen" alt="60 retailers">
  <img src="https://img.shields.io/badge/platforms-3-blue" alt="3 platforms">
  <img src="https://img.shields.io/badge/countries-8-orange" alt="8 countries">
  <img src="https://img.shields.io/badge/prices-39k-3cffd0" alt="39,000 prices">
  <img src="https://img.shields.io/badge/MCP%20tools-43-00d75f" alt="43 MCP tools">
  <img src="https://img.shields.io/badge/payments-PayPal_email-ffbd2e" alt="PayPal email billing">
  <img src="https://img.shields.io/badge/dashboard-live-3cffd0" alt="dashboard">
  <img src="https://img.shields.io/badge/python-3.10+-306998" alt="py">
  <img src="https://img.shields.io/badge/license-MIT-lightgrey" alt="MIT">
</p>

<p align="center">
  <a href="https://pypi.org/project/cli-market/"><img src="https://img.shields.io/pypi/v/cli-market?color=00FF88" alt="PyPI version"></a>
  <a href="https://pypi.org/project/cli-market/"><img src="https://img.shields.io/pypi/dm/cli-market?color=00FF88" alt="PyPI downloads"></a>
  <a href="https://github.com/Treevu-ai/cli-market-world"><img src="https://img.shields.io/github/stars/Treevu-ai/cli-market-world?style=social" alt="GitHub stars"></a>
</p>

<h1 align="center">CLI Market</h1>
<p align="center"><b>Commerce infrastructure for AI agents.</b><br>60 retailers (30 verified). 8 countries. 3 platforms. 43 MCP tools. PayPal + QR (Yape/Plin).<br>39,000+ verified shelf prices, normalized per kg/L, refreshed every 8 hours.<br>One <code>pip install</code>. One API. Zero scraping.</p>

---

## What is CLI Market?

AI agents can't comparison-shop in physical retail. Every retailer requires separate auth, separate search logic, no unified cart. Agents fail before the first query.

**CLI Market fixes this.** One `pip install`. One API call across 60 retailers (30 verified). One JSON schema.

- **Search** any product across 30 verified retailers in 8 countries
- **Compare** prices cross-border — PEN, ARS, BRL, MXN, COP, CLP, EUR, USD — normalized per kg/L where parseable
- **Basket** — compare your full shopping cart across retailers (e.g. Carrefour vs Jumbo vs Vea in AR)
- **Inflation** — track real price changes from supermarket shelves, updated every 8 hours
- **Enrichment** — 34 market indicators from shelf data + public APIs (OFF, Wikimedia, IMF, Eurostat, BCB, World Bank)
- **Buy** — checkout with PayPal or QR (Yape/Plin)
- **Build** — data moat with quality-filtered spreads, canasta matching, and live dashboard

> Stripe turned payments into APIs. We turn commerce into APIs.

Posicionamiento en español (API / landing / ventas): [`docs/api-positioning-es.md`](docs/api-positioning-es.md)

<p align="center"><a href="https://cli-market.dev"><b>cli-market.dev</b></a> · <a href="https://cli-market-production.up.railway.app/docs"><b>API docs</b></a> · <a href="https://cli-market-production.up.railway.app/dashboard"><b>Dashboard</b></a></p>

---

## Quick start

```bash
pip install cli-market
market hello          # post-install: stats + next steps
export MARKET_API_URL=https://cli-market-production.up.railway.app
market login
market search "leche" --country PE
market compare "aceite de girasol 900ml" --country AR
market basket "arroz:1 aceite:1 leche:1" --country AR
market checkout --payment yape
market ask "compra arroz al mejor precio"
market indicators --country PE
market enrichment --refresh -c PE
```

---

## Price intelligence & enrichment

34 catalogued indicators: internal moat metrics (dispersion, basket stress, freshness) plus enrichment from public APIs.

| Tier | Sources | Examples |
|---|---|---|
| **Shelf + tier 1** | Open Food Facts, Wikimedia, Open-Meteo, World Bank | `off_match_rate`, `wiki_demand_momentum`, `food_cpi_yoy` |
| **Tier 2 macro** | IMF, Eurostat, BCB, World Bank | `imf_inflation_yoy`, `eurostat_food_hicp_yoy`, `bcb_food_inflation_mom` |
| **Subcategory** | Canasta items (10 SKUs) | `subcat_price_momentum`, `subcat_wiki_momentum`, `subcat_min_price` |

```bash
market indicators --country PE
market scores --country PE
market enrichment --refresh -c PE
curl "$MARKET_API_URL/v1/intel/enrichment?country=PE"
curl "$MARKET_API_URL/v1/intel/enrichment/subcategories?country=PE"
```

Docs: [`docs/DATA-MOAT-INDICATORS.md`](docs/DATA-MOAT-INDICATORS.md)

---

## Multi-platform coverage

| Platform | Count | Examples |
|---|---|---|
| **VTEX** | 38 | Wong, Metro, Plaza Vea, Carrefour, Jumbo, Motorola, Electrolux, Whirlpool, Samsung, HEB, Chedraui, Easy, Promart, Coppel, Ripley, C&A, Hering |
| **Shopify** | 15 | Adidas, Gymshark, Allbirds, Alo Yoga, Glossier, Fenty Beauty, Kylie Cosmetics, ColourPop, Brooklinen, Casper, On Running |
| **Magento** | 7 | Falabella PE/CL/CO, Paris CL, Ripley CL, Liverpool MX, El Palacio MX |

---

## 43 MCP tools

`market_login` `market_lines` `market_search` `market_compare` `market_add` `market_cart` `market_cart_update` `market_cart_remove` `market_checkout` `market_orders` `market_reorder` `market_ask` `market_basket` `market_inflation` `market_indicators` `market_scores` `market_intel_refresh` `market_enrichment` `market_enrichment_subcategories` `market_enrichment_refresh` `market_analytics_indicators` `market_categories` `market_barcode` `market_enrich` `market_stores` `market_countries` `market_ticket` `market_voice` `market_price_history` `market_stats` `market_alerts` `market_whoami` `market_preferences` `market_subscription` `market_export` `market_trending` `market_scan` `market_stock` `market_notify` `market_brands` `market_favorites` `market_exchange` `market_delivery`

---

## Payments

**Pro plan (default):** request via email → PayPal Hosted Button → manual activation within 24 h.  
See [ops/E2E_CLIENT_JOURNEY.md](ops/E2E_CLIENT_JOURNEY.md) and [ops/BILLING_MANUAL.md](ops/BILLING_MANUAL.md).

| Method | Use | Type |
|---|---|---|
| **PayPal Hosted Button** | Pro subscription ($49/mo) | Email + link (manual activate) |
| **PayPal REST** | Optional automation | Webhooks (future) |
| **Yape / Plin** | Checkout orders (Pro tier) | QR code |

### Upgrade to Pro

```bash
market login
market upgrade --email you@example.com
# Pay via link in email → reply with CLI username → ops activates Pro
```

Ops after payment confirmed:

```bash
python3 ops/activate_pro.py username --request-id PRO-XXXXXXXX
```

---

## Pricing

| | Free | Pro | Enterprise |
|---|---|---|---|
| **Price** | $0 | $49/mo | Custom |
| **Requests** | 1,000/day | 10,000/day | Unlimited |
| **API keys** | 1 (read) | 10 (read+write) | Unlimited |
| **Checkout** | — | ✅ (after email activation) | ✅ |
| **Data export** | — | JSON/CSV | ✅ |
| **Support** | Community | Email | 24/7 + onboarding |

---

## Architecture

```
cli-market (PyPI)
├── market_cli.py            → CLI (rich tables, natural language)
├── market_server.py         → FastAPI backend (54 endpoints)
├── market_mcp.py            → MCP server (43 tools)
├── market_core.py           → Shared core (SQLite/PG, connectors)
├── market_indicators.py     → Indicator catalog + refresh (34 definitions)
├── market_enrich_sources.py → Public API enrichment (OFF, IMF, Eurostat…)
├── market_enrich_subcategory.py → Per-canasta-item signals
├── collect_prices.py        → Price collector (8h daemon, 228 queries)
├── market_stores.py         → 60 retailer definitions
├── market_connectors/
│   ├── vtex.py              → VTEX public API (38 stores)
│   ├── shopify.py           → Shopify API (15 stores)
│   ├── magento.py           → Magento REST API (7 stores)
│   ├── paypal_payments.py   → PayPal checkout
│   ├── sunat_invoicing.py   → SUNAT + PSE
│   └── minimax.py           → TTS, image, video generation
└── landing/                 → Next.js (Cloudflare Pages)
```

---

**SINAPSIS INNOVADORA S.A.C.** — RUC 20613045563 — Lima, Peru  
Founder: **Antonio Cuba**  
[cli-market.dev](https://cli-market.dev) · [GitHub](https://github.com/Treevu-ai/cli-market-world)
