Skip to content

Commit 9ba62fe

Browse files
committed
feat(cli): 增强 yapi CLI 接口与更新提示
- 新增 group/project/interface/log 等快捷命令与分类管理 - 支持 interface list --limit all 与 project token - 增加更新提示与关闭开关,修复登录密码提示体验
1 parent 903e96b commit 9ba62fe

File tree

3 files changed

+780
-16
lines changed

3 files changed

+780
-16
lines changed

packages/yapi-mcp/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,27 @@ yapi login
107107
# 检查当前登录用户
108108
yapi whoami
109109

110-
# 搜索接口
111-
yapi search --q keyword
110+
# 搜索接口(可选:按项目过滤)
111+
yapi search --q keyword --project-id 310
112+
113+
# 分组/项目/接口/日志(快捷命令)
114+
yapi group list
115+
yapi group get --id 129
116+
yapi project list --group-id 129 --page 1 --limit 10
117+
yapi project get --id 365
118+
yapi project token --project-id 365
119+
yapi interface list-menu --project-id 365
120+
yapi interface list --project-id 365 --page 1 --limit 20
121+
yapi interface list --project-id 365 --limit all
122+
yapi interface get --id 31400
123+
yapi interface cat add --project-id 365 --name "2" --desc ""
124+
yapi interface cat update --cat-id 3722 --name "公共分类 1" --desc "公共分类"
125+
yapi interface cat delete --cat-id 4169
126+
yapi log list --type group --type-id 129 --page 1 --limit 10
127+
128+
# 更新提示(自动检查,可关闭)
129+
# 设置环境变量 YAPI_NO_UPDATE_CHECK=1
130+
# 或在命令后加 --no-update
112131

113132
# 获取接口详情
114133
yapi --path /api/interface/get --query id=123

packages/yapi-mcp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@leeguoo/yapi-mcp",
3-
"version": "0.3.20",
3+
"version": "0.3.21",
44
"description": "YApi Auto MCP Server - Model Context Protocol server for YApi integration, enables AI tools like Cursor to interact with YApi API documentation",
55
"main": "dist/index.js",
66
"bin": {

0 commit comments

Comments
 (0)