Alibaba · One CLI

Alibaba supplier chat in your terminal

alicli is a TypeScript CLI that mirrors an Alibaba buyer-seller account into local SQLite with full-text search, and supports deterministic replies, first contacts and media, plus local order staging. No vision agent, no model in the send loop.

Quickstart Install
alicli pull --follow
PullSearchSendContactInspectMediaOriginalsThreadsOrdersRFQDoctorWatchdog

Private alpha · 0.1.0-alpha.1 · Access and install →

alicli

A script-friendly CLI for the Alibaba buyer-seller inbox. One command pulls the structured message feed into a local SQLite store with an FTS5 index; the rest read that store or act on the account through a MobileRun cloud phone. Output is a human table by default and a stable JSON envelope under --json, so the same command serves a terminal, a shell pipeline, and a coding agent.

Why alicli

  • Deterministic, end to end. Search reads the vendor search API. Sending walks the accessibility tree: open the conversation, read the screen, prove identity, type, read back, tap send. No language model decides what to click. The vision-driven search and sync verbs were retired on 2026-09-14 and now refuse with a pointer to their replacements rather than silently falling back.
  • It refuses instead of guessing. Before a reply goes out, alicli establishes how many outgoing messages the account holds. If it cannot, it refuses. A send reports one of three outcomes: sent, not_sent, or unknown — and unknown is never retried automatically, because a duplicate message to a waiting supplier costs more than a late one.
  • The thread proves itself. A chat title is set by the other side. Before typing, alicli requires a message on screen selected as unique by the local mirror. The conversation id is the address; the text is a gate against the stored corpus, whose coverage still matters.
  • Local mirror, fast search. Messages, threads, media and the send ledger live in one SQLite file with an FTS5 index. messages search answers offline in milliseconds, and any tool that can open SQLite can read it.
  • Original documents, byte-verified. Suppliers send quotes and certificates as PDF and Office files. media original fetches the real bytes and checks them against the feed’s MD5, so what lands on disk is what was sent and not a picture of it.
  • The money click stays human. Orders are staged, reviewed, approved, and only then placed. The current production transport is prepare-only; a human places the approved order in Alibaba.
  • Every send is attributable. ALICLI_LANE names the sender on record and is required before the account is touched. On an account several people share, a message nobody can be tied to is worse than no message.
  • Mutation-tested, not just tested. The suite is 555 tests, and the acceptance bar is 169 mutations that must each turn a named test red. A mutation that leaves its named test green exposes a gap in the check.

Pick your path

  • Trying it. Read Install, then Quickstart. Start with a configured account, pull the feed, then read a thread.
  • Keeping the mirror warm. Read pull for the follow loop and the --full backfill, and doctor for ingestion freshness.
  • Finding who owes you a reply. Read threads. Every thread carries a state: unanswered, awaiting_reply, never_answered, or unknown when an undated message makes the order undecidable.
  • Replying from a script. Read send for addressing by conversation id, the lane requirement, the preflight, and what each of the three outcomes means for a retry.
  • Approaching a new supplier. Read contact inspect to read a product page without opening a chat, then contact for the first message.
  • Getting the actual files. Read media original for PDFs and Office documents, media render for the device-rendered fallback and its two measured limits, and media gap to see what is missing and why.
  • Placing an order. Read order and the approval model before wiring anything automatic.
  • Wiring up an agent. Pair --json from JSON output with watchdog exit codes, and read Architecture for what the CLI will and will not do on its own.
  • Reading the store directly. Read store for the schema and the read-only patterns.

Output

Every command takes a global --json. Handled results use the envelope below. Also check the exit status and command outcome; startup errors can be plain text. Example values below:

$ alicli send --to 1000000000001-1000000000002#11011@icbu \
    --message "Can you confirm the 500pc price?" --json

{"success":true,"data":{
  "threadId":"1000000000001-1000000000002#11011@icbu",
  "msgId":"mr-0000000000000000",
  "sentBy":"ops",
  "outcome":"sent",
  "preflight":"mirror is level with the account",
  "evidenceUsed":"Our MOQ for that panel is 500pc, lead time 25 days."
},"error":null,"code":null}

evidenceUsed is the message that convinced the identity gate. It is an audit trail for why this send went into this chat, not a summary of the conversation.

Status

Private alpha, 0.1.0-alpha.1, MIT. This build includes the feed, search, send, first-contact and media paths. Order staging and approval are local; production placement is manual. See Retired commands for what was removed and why, and Testing bar for how changes are accepted.