Xianyu Auto-Reply: An automation system for Alibaba Xianyu marketplace sellers
闲鱼自动回复管理系统是一个基于 Python + FastAPI 开发的自动化客服系统,专为闲鱼平台设计。系统通过 WebSocket 连接闲鱼服务器,实时接收和处理消息,提供智能化的自动回复服务。同时集成闲鱼自动发货,自动评价,自动擦亮等功能,实现闲鱼虚拟商品自动化流程。
At a glance
- What is it?
- Xianyu Auto-Reply is a FastAPI and React application that automates customer service and fulfillment tasks on Xianyu, Alibaba's second-hand marketplace. It provides auto-reply, auto-shipping, and product publishing automation.
- Who is it for?
- Xianyu Auto-Reply suits Xianyu sellers who manage high volumes of customer inquiries and fulfill many orders. It is most useful for sellers of virtual items where automation brings the most value.
- Can I use it commercially?
- Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 7 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Automation for Xianyu marketplace sellers
Xianyu is Alibaba's second-hand marketplace where individuals and small businesses sell used and new items. The platform connects buyers and sellers across China. Managing customer inquiries, fulfilling orders, and publishing new products is time-consuming, especially for high-volume sellers. The last push to the repository was on 2026-09-24. Xianyu Auto-Reply automates these tasks using browser automation and system integration, built with FastAPI, React, MySQL, Redis, and Playwright. The main system handles account management (login and session persistence), message sending and receiving in real-time via WebSocket, auto-reply configuration and matching, auto-shipping of virtual goods, order tracking, product publishing with templates, and order collection with auto-evaluation and store polishing. A separate subsystem called Promotion handles commission accounts, product selection rules based on criteria, asset and template libraries, automated publishing schedules, deletion rules, and compensation tasks for failed shipments. The main system's three backend services (backend-web, websocket, and scheduler) each expose a /health health check endpoint. Together, these let sellers automate their entire workflow from customer inquiry to fulfillment and review. The default credentials are admin / admin123 on first deployment. The system ships with Docker Compose configuration and automated deployment scripts that provision MySQL, Redis, and application services.
Auto-reply, auto-shipping, and product publishing
Multi-account management lets sellers operate multiple Xianyu accounts from a single dashboard, with automatic login and session management. Auto-reply sends templated responses to customer messages based on text keywords, image keywords, default replies, and product-specific replies. Messages are received in real-time via WebSocket and processed by the system. The system also supports AI replies through integration with large language models for context-aware and intelligent responses. Auto-shipping automatically delivers virtual goods (cards, gift codes, software licenses) when orders are fulfilled, with automatic reshipment if the first attempt fails, and all shipment results are recorded. Auto-review and auto-polish (listing refresh) help sellers manage their store ratings and visibility. Product publishing automation lets sellers define templates from a material library and address library, then publish products individually or in bulk, with publication logs tracking what was published when. The Promotion subsystem handles commissions across seller accounts, with product selection rules that automatically identify candidates based on criteria, a template library to manage titles, images, descriptions, Taobao commands, shortened links, inventory and publishing status, timed publishing rules that reuse the main system's publishing capability, scheduled deletion rules to remove products after a set period, and compensation tasks for failed shipments and link repairs. The system tracks all activities in logs for audit and debugging.
Technology stack and deployment
The backend uses FastAPI for the API gateway and business logic, with SQLAlchemy 2.0 for ORM and database access. MySQL 8.0 stores persistent data, and Redis 7 provides caching, session management, and task assistance. Playwright handles browser automation for login, cookie refresh, and product publishing. APScheduler manages scheduled tasks like auto-shipping and order collection. Loguru handles logging across services.
The frontend uses React 18 with TypeScript, Vite for development and builds, TailwindCSS for styling, Zustand for state management, and Lucide React for icons. The system architecture splits the main application into four services: frontend (port 9000) for the UI, backend-web (port 8089) for the API gateway, websocket (port 8090) for Xianyu connection and real-time messaging, and scheduler (port 8091) for automated tasks. The Promotion subsystem adds backend (port 8092) and frontend (port 9001) services.
For deployment, the project provides one-click scripts. The recommended approach for servers with Docker installed:
curl -fsSL https://xy-update.zhinianboke.com/deploy.sh | sed 's/\r$//' | bashAlternatively, clone and deploy locally:
git clone https://github.com/zhinianboke/xianyu-auto-reply.git
cd xianyu-auto-reply
bash deploy.shThe deploy.sh script auto-generates .env and docker-compose.deploy.yml, pulls prebuilt images from Aliyun, cleans up old encrypted containers while preserving data volumes, and starts services. The front end runs on port 9000 with API documentation at port 8089/docs and default credentials admin/admin123. For servers with external MySQL and Redis (cloud RDS or standalone instances), use deploy_remote.sh instead, which generates .env.remote and provisions only the four application services without internal database containers. Subsequent updates can use update.sh or deploy_remote.sh to refresh images and restart services. For development, Docker Compose can start just the infrastructure services while backend and frontend services run locally. Each backend service is started separately in its own Python 3.11+ virtual environment with `pip install -e .` followed by `python main.py`. The frontend starts with `npm install && npm run dev`. The system includes build scripts for individual services: build_frontend.sh, build_backend_web.sh, build_websocket.sh, and build_scheduler.sh for selective rebuilding without affecting other services.
Multi-account and concurrent operations
The system manages multiple Xianyu accounts with automatic login, cookie management, and session refresh. This allows sellers to operate several stores from one dashboard. All operations on Xianyu are serialized to avoid conflicts, but the system handles multiple accounts concurrently. Notifications alert sellers to important events. When fulfillment is complete, logs record what was shipped and to whom.
Virtual goods and high-volume sellers benefit most
Xianyu Auto-Reply is particularly useful for sellers of virtual items like game accounts, digital gifts, and software licenses, where orders can be automatically fulfilled through the auto-shipping module. It is also useful for high-volume stores where response time and consistency matter, since the WebSocket integration provides real-time message handling and the auto-reply system can process hundreds of inquiries. The system's Promotion subsystem adds value for commission-based sellers who manage product distribution across multiple accounts with automated selection and publishing rules. Low-volume sellers or sellers of physical items may not benefit as much because each order requires different handling and the setup overhead is substantial. The system works best for sellers with stable product catalogs and templated responses. Seasonal sellers or those with highly variable inventory may struggle to maintain rules and templates. Like any automation system that interacts with a web interface, the system may break if Xianyu changes their interface unexpectedly, requiring code updates. The AGPL-3.0 license requires that any modifications to the system remain open source and available to users. Production deployment requires at least 2 CPU cores and 4 GB RAM minimum, with 4 cores and 8 GB RAM recommended.
When this tool is appropriate
Xianyu Auto-Reply is appropriate for Xianyu sellers with high-volume stores, especially sellers of virtual items where automation brings immediate value. It is less useful for low-volume sellers or sellers of physical items where each order requires manual attention. Setup requires technical knowledge: you need to install and configure the system, manage database credentials, and maintain the deployment. Consider the learning curve and setup effort before adopting this system.
Editorial conclusion
Xianyu Auto-Reply suits Xianyu sellers who manage high volumes of customer inquiries and fulfill many orders. It is most useful for sellers of virtual items where automation brings the most value. The project is open source and accepts contributions. Installation requires Python 3.11+, Node.js 18+, MySQL 8.0+, and Redis 6+.
Frequently asked questions
What is Xianyu?
Xianyu is Alibaba's second-hand marketplace where individuals and small businesses sell used and new items.
Can I use this system for multiple Xianyu accounts?
Yes. Xianyu Auto-Reply supports multi-account management with automatic login and session management.
Does it support virtual goods?
Yes. The system provides auto-shipping for virtual goods, which is the primary use case for automation.
What are the system requirements?
Python 3.11+, Node.js 18+, MySQL 8.0+, Redis 6+, and Chromium or Chrome for Playwright.
Is Xianyu Auto-Reply open source?
Yes. The project is open source and accepts contributions. See the repository for installation and development instructions.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/zhinianboke-xianyu-auto-reply)