Skip to main content

Read-only Xianyu query and shop diagnosis CLI

Project description

youn-xy-cli

只读闲鱼查询与店铺诊断 CLI。项目采用 xiaohongshu-cli 风格的 Click + Client/Mixins 架构,并迁入 goofish-cli 已验证的闲鱼登录、MTop、浏览器查询和风控能力。

安装与开发

pip install youn-xy-cli

运行环境还需要:

  • Node.js:执行闲鱼 MTop 签名脚本。
  • 系统 Google Chrome:QR 登录、Feed、搜索和浏览器详情查询。
  • 与登录浏览器相同的本机用户环境:登录态默认保存在 ~/.goofish-cli/

本地开发:

uv sync --extra dev
uv run goofish --help

核心流程

goofish auth login
goofish auth status --yaml
goofish search items "iPhone 15"
goofish item view @1
goofish feed
goofish item list
goofish skills install --list

所有业务命令均为只读。JSON/YAML 输出使用稳定的 ok/schema_version/data/error envelope。Feed、搜索和详情访问仅使用闲鱼网站与经审查的淘系接口。

详见 执行计划合规说明

维护者发布流程见 发布指南

验证与排障

uv run pytest -q
uv run ruff check src tests
uv run mypy src/youn_xy_cli
uv build

真实账号浏览器 smoke 默认跳过。确认本机已登录闲鱼后,可运行:

XIANYU_REAL_ACCOUNT_SMOKE=1 uv run pytest tests/test_real_account_smoke.py -q

遇到安全验证时,先在系统浏览器人工完成验证,再运行 goofish auth reset-guard。本工具不会绕过验证码或修改浏览器 Cookie。

在其他 Skill 中使用

优先使用 MCP,skill 无需解析 CLI 文本:

{
  "mcpServers": {
    "goofish": {
      "command": "uvx",
      "args": ["--from", "youn-xy-cli", "youn-xy-cli"]
    }
  }
}

也可以使用稳定 Python API:

from youn_xy_cli.api import login, search_items, item_view

login(browser="auto")
items = search_items("iPhone 15", limit=5)
detail = item_view("@1")

登录态按操作系统用户和机器保存、加密,不能直接复制到其他机器或隔离容器。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youn_xy_cli-0.1.0.tar.gz (70.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youn_xy_cli-0.1.0-py3-none-any.whl (78.1 kB view details)

Uploaded Python 3

File details

Details for the file youn_xy_cli-0.1.0.tar.gz.

File metadata

  • Download URL: youn_xy_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 70.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for youn_xy_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39ad5d98503401d4c08ba32852481cd12982d8b9735cde11a6adf33448dc7ab1
MD5 c562f2c6fc638aacc99437d7afc2abdc
BLAKE2b-256 6dd1b18b486ddb59954a3097cb10c7537de8ac4ad3040ad51342027a7e02ee63

See more details on using hashes here.

File details

Details for the file youn_xy_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: youn_xy_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 78.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for youn_xy_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27349a7c506ae1e0ef5991415e0c12ed21599e0d2b640b69665424e4928b8789
MD5 bbf8784381553300dc7e68a69f36ebc1
BLAKE2b-256 47908fd05c21aef014d3e5fa81a5cd31d9005db4354ac0683814fbeb2e08b676

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page