How superjack2050/1688-cli works
1688 CLI supports a buyer workflow from product or supplier discovery through inquiry, cart, checkout, order tracking, and seller follow-up. The CLI routes commands through a profile-aware dispatcher, which uses either a persistent daemon or an inline browser session; command results are rendered for human terminals or machine-readable consumers. README-documented capabilities are retained, but unsampled command internals and their specific dependencies are not inferred.
Main entry points: dispatch.ts Command dispatch · search.ts Product search · supplier-search.ts Supplier search · recovery.ts Browser recovery
Components 22
CLI and output
- Command interface
src/cli.ts - JSON and TTY output
src/io/output.ts
Sourcing
- Product search
src/commands/search.ts - Product research
src/commands/research.ts - Image search
src/commands/image-search.ts - Offer details
src/commands/offer.ts - Supplier search
src/commands/supplier-search.ts - Supplier research
src/commands/supplier-search.ts - Supplier inspection
src/commands/supplier-inspect.ts
Buying and orders
- Cart operations
src/commands/cart-list.ts - Checkout preview
src/commands/checkout-prepare.ts - Place order
src/commands/checkout-confirm.ts - Order tracking
src/commands/order-list.ts
Seller conversations
- Seller inquiry
src/commands/seller-inquire.ts - Seller chat and messages
src/commands/seller-chat.ts
Browser runtime
- Command dispatch
src/session/dispatch.ts - Profile daemon
src/daemon/manager.ts - Daemon socket client
src/daemon/client.ts - Browser session
src/session/context.ts - Browser recovery
src/session/recovery.ts - Profile state and paths
src/session/paths.ts
Other components
- Buyer or agent
Connections 30
- Buyer or agent → Command interface: runs commands
README.md - Command interface → Command dispatch: routes commands
src/session/dispatch.ts - Command dispatch → Daemon socket client: checks or calls
src/session/dispatch.ts - Command dispatch → Browser session: runs inline
src/session/dispatch.ts - Profile daemon → Daemon socket client: checks or calls
src/daemon/manager.ts - Daemon socket client → Profile state and paths: resolves socket
src/daemon/client.ts - Profile daemon → Profile state and paths: manages profile files
src/daemon/manager.ts - Product search → Browser recovery: wraps collection
src/commands/search.ts - Image search → Command dispatch: dispatches command
src/commands/image-search.ts - Image search → Browser recovery: uses recovery
src/commands/image-search.ts - Offer details → Command dispatch: dispatches command
src/commands/offer.ts - Offer details → Browser recovery: wraps collection
src/commands/offer.ts - Supplier search → Browser recovery: wraps collection
src/commands/supplier-search.ts - Product research → Product search: uses search
src/commands/research.ts - Product research → Offer details: enriches offers
src/commands/research.ts - Supplier research → Supplier search: discovers suppliers
README.md - Supplier research → Supplier inspection: enriches suppliers
README.md - Buyer or agent → Product search: sources products
README.md - Buyer or agent → Supplier search: finds suppliers
README.md - Buyer or agent → Seller inquiry: asks seller
README.md - Buyer or agent → Cart operations: manages cart
README.md - Buyer or agent → Checkout preview: previews checkout
README.md - Buyer or agent → Place order: confirms checkout
README.md - Buyer or agent → Order tracking: tracks orders
README.md - Buyer or agent → Seller chat and messages: follows up
README.md - Place order → Cart operations: uses cart items
src/commands/checkout-confirm.ts - Place order → Checkout preview: uses preview
src/commands/checkout-confirm.ts - Command interface → JSON and TTY output: configures output
src/cli.ts - Product search → JSON and TTY output: emits results
src/commands/search.ts - Supplier search → JSON and TTY output: emits results
src/commands/supplier-search.ts