goofish-cli 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/CHANGELOG.md +13 -1
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/PKG-INFO +5 -5
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/README.md +4 -4
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/docs/mcp-setup.md +2 -2
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/pyproject.toml +9 -1
- goofish_cli-0.2.1/src/goofish_cli/__init__.py +9 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/mcp_server.py +11 -3
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/uv.lock +1 -1
- goofish_cli-0.2.0/src/goofish_cli/__init__.py +0 -1
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.env.example +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.github/pull_request_template.md +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.github/workflows/ci.yml +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.github/workflows/publish.yml +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/.gitignore +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/CONTRIBUTING.md +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/LICENSE +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/NOTICE +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/docs/architecture.md +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/docs/compliance.md +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/examples/README.md +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/examples/publish_from_folder.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/examples/watch_to_autoreply.sh +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/cli.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/auth/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/auth/login.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/auth/reset_guard.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/auth/status.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/category/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/category/recommend.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/item/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/item/delete.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/item/get.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/item/publish.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/item/view.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/location/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/location/default.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/media/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/media/upload.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/message/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/message/history.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/message/list_chats.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/message/send.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/message/watch.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/search/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/commands/search/search.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/browser.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/browser_cookie.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/errors.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/guard.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/limiter.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/mtop.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/output.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/registry.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/session.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/sign.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/strategy.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/token.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/core/ws.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/src/goofish_cli/static/goofish_js_version_2.js +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/__init__.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_auth_login.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_browser_cookie.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_guard.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_item_view.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_limiter.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_list_chats.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_mtop.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_publish_payload.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_registry.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_search.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_session_bootstrap.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_sign.py +0 -0
- {goofish_cli-0.2.0 → goofish_cli-0.2.1}/tests/test_ws_codec.py +0 -0
|
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.1] - 2026-04-22
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- MCP script entry 新增 `goofish-cli`(与 package 名一致),`uvx goofish-cli` 即可直接拉起
|
|
13
|
+
MCP server。Claude Code 等 AI Agent 的 MCP 配置应使用这个入口。`goofish-mcp` 作为
|
|
14
|
+
次级入口保留,但只在本包已装到某 env 时可用(`pip install goofish-cli` /
|
|
15
|
+
`uv tool install goofish-cli` / `uvx --from goofish-cli goofish-mcp`)——单写
|
|
16
|
+
`uvx goofish-mcp` 仍会因 PyPI 无同名包解析失败。
|
|
17
|
+
- `goofish_cli.__version__` 改为从 `importlib.metadata` 动态读取 package 版本,避免和
|
|
18
|
+
`pyproject.toml` 的 `version` 字段 drift(之前硬编码在 `__init__.py` 里,0.2.0 忘了同步)。
|
|
19
|
+
|
|
9
20
|
## [0.2.0] - 2026-04-22
|
|
10
21
|
|
|
11
22
|
### Added
|
|
@@ -56,6 +67,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
56
67
|
- 本版本需要用户手动从浏览器导入 cookie(含 `unb` / `_m_h5_tk` / `x5sec`)
|
|
57
68
|
- 遇到 `RGV587_ERROR` 风控时,需在浏览器完成滑块验证并**重新导出**带 `x5sec` 的 cookie
|
|
58
69
|
|
|
59
|
-
[Unreleased]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.
|
|
70
|
+
[Unreleased]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.1...HEAD
|
|
71
|
+
[0.2.1]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.0...v0.2.1
|
|
60
72
|
[0.2.0]: https://github.com/fancyboi999/goofish-cli/compare/v0.1.0...v0.2.0
|
|
61
73
|
[0.1.0]: https://github.com/fancyboi999/goofish-cli/releases/tag/v0.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: goofish-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: 闲鱼 CLI — 支持 MCP,未来支持 Claude Skills。为 AI Agent 提供闲鱼自动化基础能力。
|
|
5
5
|
Project-URL: Homepage, https://github.com/fancyboi999/goofish-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/fancyboi999/goofish-cli
|
|
@@ -58,7 +58,7 @@ Description-Content-Type: text/markdown
|
|
|
58
58
|
**同一份定义**同时输出给三种消费者:
|
|
59
59
|
|
|
60
60
|
- 👨💻 **人类**:`goofish item get 12345 --format table`
|
|
61
|
-
- 🤖 **AI Agent(Claude Code / Cursor / Codex)**:`uvx goofish-
|
|
61
|
+
- 🤖 **AI Agent(Claude Code / Cursor / Codex)**:`uvx goofish-cli` → 自动注册成 MCP tool
|
|
62
62
|
- 🧩 **Claude Skills**(规划中):`skills/` 目录直接放进 Agent
|
|
63
63
|
|
|
64
64
|
> 架构思想来自 [opencli](https://github.com/jackwener/opencli) 的 single-registry 设计。
|
|
@@ -215,7 +215,7 @@ $ goofish item publish \
|
|
|
215
215
|
"mcpServers": {
|
|
216
216
|
"goofish": {
|
|
217
217
|
"command": "uvx",
|
|
218
|
-
"args": ["goofish-
|
|
218
|
+
"args": ["goofish-cli"]
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -231,13 +231,13 @@ Claude 会自动把全部命令看成 tool:`goofish_item_get` / `goofish_item_
|
|
|
231
231
|
|---|---|
|
|
232
232
|
| 11 个核心 mtop 接口 | 发布/下架/查询/图片/类目/地址/IM 全覆盖 |
|
|
233
233
|
| CLI + `--format` 多格式输出 | `json` / `yaml` / `table` / `md` / `csv`,人机两用 |
|
|
234
|
-
| MCP Server | `uvx goofish-
|
|
234
|
+
| MCP Server | `uvx goofish-cli` 一行接入 Claude Code / Cursor |
|
|
235
235
|
| WebSocket 批量 push 全量解码 | 一帧多条消息全部还原,不丢单 |
|
|
236
236
|
| WebSocket 自动重连 | 断线自退避重连,长跑无感知 |
|
|
237
237
|
| 已读回执 / typing / 新消息通知分类 | `/s/sync` 元事件结构化为三类 JSONL |
|
|
238
238
|
| 全局限流 + 风控熔断 | 令牌桶 1 写/分钟 + RGV587 自动熔断 |
|
|
239
239
|
| 单元测试 | 33 个,ruff 零告警 |
|
|
240
|
-
| 包分发 | `pip install goofish-cli` / `uvx goofish-
|
|
240
|
+
| 包分发 | `pip install goofish-cli` / `uvx goofish-cli` |
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
**同一份定义**同时输出给三种消费者:
|
|
20
20
|
|
|
21
21
|
- 👨💻 **人类**:`goofish item get 12345 --format table`
|
|
22
|
-
- 🤖 **AI Agent(Claude Code / Cursor / Codex)**:`uvx goofish-
|
|
22
|
+
- 🤖 **AI Agent(Claude Code / Cursor / Codex)**:`uvx goofish-cli` → 自动注册成 MCP tool
|
|
23
23
|
- 🧩 **Claude Skills**(规划中):`skills/` 目录直接放进 Agent
|
|
24
24
|
|
|
25
25
|
> 架构思想来自 [opencli](https://github.com/jackwener/opencli) 的 single-registry 设计。
|
|
@@ -176,7 +176,7 @@ $ goofish item publish \
|
|
|
176
176
|
"mcpServers": {
|
|
177
177
|
"goofish": {
|
|
178
178
|
"command": "uvx",
|
|
179
|
-
"args": ["goofish-
|
|
179
|
+
"args": ["goofish-cli"]
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -192,13 +192,13 @@ Claude 会自动把全部命令看成 tool:`goofish_item_get` / `goofish_item_
|
|
|
192
192
|
|---|---|
|
|
193
193
|
| 11 个核心 mtop 接口 | 发布/下架/查询/图片/类目/地址/IM 全覆盖 |
|
|
194
194
|
| CLI + `--format` 多格式输出 | `json` / `yaml` / `table` / `md` / `csv`,人机两用 |
|
|
195
|
-
| MCP Server | `uvx goofish-
|
|
195
|
+
| MCP Server | `uvx goofish-cli` 一行接入 Claude Code / Cursor |
|
|
196
196
|
| WebSocket 批量 push 全量解码 | 一帧多条消息全部还原,不丢单 |
|
|
197
197
|
| WebSocket 自动重连 | 断线自退避重连,长跑无感知 |
|
|
198
198
|
| 已读回执 / typing / 新消息通知分类 | `/s/sync` 元事件结构化为三类 JSONL |
|
|
199
199
|
| 全局限流 + 风控熔断 | 令牌桶 1 写/分钟 + RGV587 自动熔断 |
|
|
200
200
|
| 单元测试 | 33 个,ruff 零告警 |
|
|
201
|
-
| 包分发 | `pip install goofish-cli` / `uvx goofish-
|
|
201
|
+
| 包分发 | `pip install goofish-cli` / `uvx goofish-cli` |
|
|
202
202
|
|
|
203
203
|
---
|
|
204
204
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"mcpServers": {
|
|
10
10
|
"goofish": {
|
|
11
11
|
"command": "uvx",
|
|
12
|
-
"args": ["goofish-
|
|
12
|
+
"args": ["goofish-cli"]
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{
|
|
22
22
|
"mcpServers": {
|
|
23
23
|
"goofish": {
|
|
24
|
-
"command": "/Users/you/Desktop/goofish-cli/.venv/bin/goofish-
|
|
24
|
+
"command": "/Users/you/Desktop/goofish-cli/.venv/bin/goofish-cli"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "goofish-cli"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "闲鱼 CLI — 支持 MCP,未来支持 Claude Skills。为 AI Agent 提供闲鱼自动化基础能力。"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "Apache-2.0" }
|
|
@@ -44,6 +44,14 @@ dev = [
|
|
|
44
44
|
|
|
45
45
|
[project.scripts]
|
|
46
46
|
goofish = "goofish_cli.cli:app"
|
|
47
|
+
# MCP server 入口。名字与 package 名一致,`uvx goofish-cli` 可直接拉起(uvx 默认按
|
|
48
|
+
# command 名查包,和 scripts 名对齐就不用 --from 绕弯)。这是 Claude Code 等 AI Agent
|
|
49
|
+
# 配 MCP 时的推荐写法。
|
|
50
|
+
goofish-cli = "goofish_cli.mcp_server:main"
|
|
51
|
+
# 保留 `goofish-mcp` 别名只在 **本包已装** 时可用(`pip install goofish-cli` /
|
|
52
|
+
# `uv tool install goofish-cli` / `uvx --from goofish-cli goofish-mcp`)。单独的
|
|
53
|
+
# `uvx goofish-mcp` 仍会因 PyPI 无同名包解析失败 —— 这不是别名能救的,Claude Code
|
|
54
|
+
# MCP 配置必须用上面的 `uvx goofish-cli`。
|
|
47
55
|
goofish-mcp = "goofish_cli.mcp_server:main"
|
|
48
56
|
|
|
49
57
|
[project.urls]
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"""FastMCP 入口。扫描同一 registry → 每个 Command 注册为 @mcp.tool()。
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Claude Code 配置:
|
|
3
|
+
启动(推荐):`uvx goofish-cli` —— uvx 按 command 名找包,`goofish-cli` 匹配 PyPI
|
|
4
|
+
包名,一行搞定。Claude Code 配置:
|
|
5
|
+
|
|
5
6
|
{
|
|
6
7
|
"mcpServers": {
|
|
7
|
-
"goofish": { "command": "uvx", "args": ["goofish-
|
|
8
|
+
"goofish": { "command": "uvx", "args": ["goofish-cli"] }
|
|
8
9
|
}
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
其他入口(仅在 `goofish-cli` 包已装到某 env 时可用):
|
|
13
|
+
- `python -m goofish_cli.mcp_server`
|
|
14
|
+
- `goofish-mcp`(pip / uv tool install 后可用;或 `uvx --from goofish-cli goofish-mcp`)
|
|
15
|
+
|
|
16
|
+
注意:`uvx goofish-mcp` 单写会因 PyPI 无同名包而解析失败——不是别名能救的,这是 uvx
|
|
17
|
+
按 command 名查包的默认行为决定的。
|
|
10
18
|
"""
|
|
11
19
|
from __future__ import annotations
|
|
12
20
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|