⚠️ DEPRECATED — Repository MovedThis codebase has been merged into
xwzhangSZU/opencli-stackunderplugins/expense-orders/(full git history preserved viagit subtree). All future development happens there. This repository is archived and read-only.
OpenCLI adapters for reimbursement prep on JD and Taobao/Tmall.
This plugin is intentionally OpenCLI-only and does not rely on MCP. The first version
does three things:
- list reimbursement candidates from JD orders
- list issued-invoice reimbursement candidates from Taobao/Tmall invoice records
- export invoice PDFs and compact order-summary screenshots with consistent file names
- JD: read personal order history, use existing
查看发票, download invoice PDFs, generate compact reimbursement summary cards from captured order data - Taobao/Tmall: read
我的发票, only process records that are already已开票, download invoice PDFs, generate compact reimbursement summary cards from captured order data - no automatic Taobao invoice application
- no parallel browser runs across JD and Taobao
opencli jd expense-list --from YYYY-MM-DD --to YYYY-MM-DD --output manifest.json
opencli jd expense-export --manifest manifest.json --output /path/to/export-root
opencli taobao expense-list --from YYYY-MM-DD --to YYYY-MM-DD --output manifest.json
opencli taobao expense-export --manifest manifest.json --output /path/to/export-root
bash scripts/export-all.sh --from YYYY-MM-DD --to YYYY-MM-DD --output /path/to/export-rootEach exported order is written to:
<output>/<图书类|其他商品服务支出>/<YYYY-MM>/<YYYY-MM-DD>__<title>__<JD|TAOBAO>__order-<orderId>/
With these files:
<YYYY-MM-DD>__<title>__<JD|TAOBAO>__order-<orderId>__订单截图.png<YYYY-MM-DD>__<title>__<JD|TAOBAO>__order-<orderId>__发票.pdfmeta.json
order-detail.png is a compact reimbursement-friendly horizontal summary strip, not a full-page dump.
It is intentionally normalized to keep these fields visible:
- product title
- order number
- order date
The manifest also suggests a future bank-record screenshot name in the same style:
<YYYY-MM-DD>__<title>__<JD|TAOBAO>__order-<orderId>__支付记录.png
If an include order still fails to download its invoice, scripts/export-all.sh also writes:
manual-invoice-followup.jsonmanual-invoice-followup.md
These files are the handoff checklist for manual invoice recovery.
This repo now distinguishes three date concepts explicitly:
order_date: user-facing date kept for backward compatibilityinvoice_date: invoice issuance date when the source page exposes itreal_order_date: actual order-placement date fetched from the order detail page when available
For reimbursement month grouping, downstream tools should use accounting_date:
- JD:
accounting_date = order_date - Taobao/Tmall:
accounting_date = invoice_date, falling back toorder_datefor legacy manifests
This matters for Taobao preorder items, where the real order-placement date may be much earlier than the invoice issuance month.
bash install.shOptional custom OpenCLI home:
OPENCLI_HOME=/path/to/.opencli bash install.shbash uninstall.shThe first version is conservative:
include: books, journals, software, licenses, clear computer accessories such as docks, hubs, adaptersreview: ambiguous computer-related or generic electronicsexclude: pets, medicine, home goods, phone accessories, games, coffee gear and other clearly unrelated items
If another machine already has OpenCLI installed, follow MIGRATION-OTHER-MACHINE.md.
For acceptance checks after migration, use TEST-MATRIX.md.
If you want Codex / Claude Code to pull, install, and verify the repo on another machine, start from AGENT-SYNC-VERIFY-PROMPT.md.