Unified entry:python3 {baseDir}/cli.py <command> [options]
Command quick reference
| Command | Description | Example |
|---|---|---|
search |
Find products | cli.py search --query "帮我找1688上支持一件代发包邮的露营椅,100元以内" --channel douyin |
prod_detail |
Product details | cli.py prod_detail --item-ids "991122553819,894138137003" |
shops |
Check bound stores | cli.py shops |
publish |
Distribution | cli.py publish --shop-code CODE --data-id ID |
opportunities |
Business opportunity hot list | cli.py opportunities |
trend |
Trend insights | cli.py trend --query "大码女装" |
shop_daily |
Store operation daily report | cli.py shop_daily |
configure |
Configure AK | cli.py configure YOUR_AK |
check |
Check configuration status | cli.py check |
All commands output JSON:{"success": bool, "markdown": str, "data": {...}}
When displaying, output markdown directly; append Agent analysis after it and do not mix it in.
Usage flow
The Agent, based on user intent,directly executes the corresponding command, without needing to first execute checkeach time.
In cases such as missing AK or store anomalies, each command will return a clear error on its own; the Agent only needs to respond according to the "Exception handling" below.
Typical product selection & distribution path:search → user filtering → shops(confirm target store) → publish
Product details usage guide:
prod_detail: Used when the user wants to see product title, price, category, SKU, CPV attributes, and merchant information.
Business opportunity/trend usage guide:
opportunities: Used when the user wants to see "right now/last 1 hour/hot list/trending business opportunities."trend: Used when the user asks about periodic trends, price distribution, or hot product overview for a broad category/industry; if the keyword is too long or too specific, first try the user's original term, and if the result is empty, prompt the user to switch to a broader/split term and retry.shop_daily: Used when the user wants to see "store operation daily report/today's sales/channel operation diagnosis/product selection suggestions for main products."
Security statement
| Risk level | Command | Agent behavior |
|---|---|---|
| Read-only | search, shops, check, opportunities, trend, shop_daily | Execute directly |
| Configuration | configure | Execute after indicating the scope of impact |
| Write | publish | Must first perform a dry-run pre-check; ask follow-up questions only when the write target is not unique, and if the target is unique, execute directly |
Global write rules (applicable to all write operations):
- Must first perform dry-run.
- Only when the write target is not unique (there are multiple candidate products or stores), ask the user once for ambiguity resolution.
- When the target is unique, after the dry-run succeeds, directly perform the formal write without a second confirmation.
Exception handling
When any command outputs success: false :
- First output the
markdownfield(already includes a user-readable error description) - Then append guidance based on the keyword:
| markdown keyword | Additional Agent action |
|---|---|
| "AK not configured" or "invalid signature"/"401" | Output the following AK guidance message |
| "Authorization expired" | Prompt the user to reauthorize in the 1688 AI version APP |
| "Store not bound" or shops returns 0 stores | Output the following Store opening guidance script |
| "Rate limited"/"429" | Advise the user to wait 1-2 minutes and retry |
| Other | Just output markdown |
For detailed error code explanations, see references/common/error-handling.md。
Execution prerequisites (mandatory on first capability hit)
- First execution of
search: first read in fullreferences/capabilities/search.md - First execution of
prod_detail: first read in fullreferences/capabilities/prod_detail.md - First execution of
shops: first read in fullreferences/capabilities/shops.md - First execution of
publish: first read in fullreferences/capabilities/publish.md - First execution of
configure: first read in fullreferences/capabilities/configure.md - First execution of
opportunities: first read in fullreferences/capabilities/opportunities.md - First execution of
trend: first read in fullreferences/capabilities/trend.md - First execution of
shop_daily: first read in fullreferences/capabilities/shop_daily.md - Repeated calls to the same capability within the same session can reuse the already loaded knowledge; re-read only when rules conflict or documents are updated.
AK guidance script
"You need to configure AK first. Open 1688 AI Edition APP(if not installed, click the link to download), on the homepage tap "One-click deploy Store-opening Claw, fully automated money-making 🦞", enter the page to get AK, then tell me: 'My AK is xxx'"
Store opening guidance script
"No store is bound yet. Open 1688 AI Edition APP → on the homepage "One-click Store Opening", and tell me once it's done."
FAQ knowledge base (loaded on demand)
When the user asks business or technical questions,load the corresponding file first before answering, do not speak in generalities based on experience.
| User topic | Load file |
|---|---|
| AK issues, distribution failure, supported platforms, fees | references/faq/base.md |
| Which platform to choose, Douyin Store/Pinduoduo/Taobao | references/faq/platform-selection.md |
| Product selection risks, categories, holiday product selection | references/faq/product-selection.md |
| Shipping fee templates, pricing, markup multiplier | references/faq/listing-template.md |
| Shipping timeout, transit fees, remote areas | references/faq/fulfillment.md |
| Returns, refund only, shipping insurance, after-sales | references/faq/after-sales.md |
| New store first sale, service score, promotion | references/faq/new-store.md |
| Material review, white background image, title optimization | references/faq/content-compliance.md |