Install
openclaw skills install yapiQuery and sync YApi interface documentation. Use when user mentions "yapi 接口文档", YAPI docs, asks for request/response details, or needs docs sync. Also triggers when user pastes a YApi URL that matches the configured base_url.
openclaw skills install yapiPrefer yapi command. If missing, fallback to one-shot npx without forcing global install:
yapi -h
# fallback:
npx -y @leeguoo/yapi-mcp -h
In command examples below, yapi can be replaced by npx -y @leeguoo/yapi-mcp.
base_url.yapi whoami), then run yapi login only when needed.api_id / keyword / category.--dry-run first, then real sync.base_url from ~/.yapi/config.toml.rg -n "^base_url\\s*=" ~/.yapi/config.toml
base_url, extract IDs from path:
/project/123/... -> project_id=123.../api/456 -> api_id=456.../api/cat_789 -> catid=789api_id exists:yapi --path /api/interface/get --query id=<api_id>
# version/help
yapi --version
yapi -h
# auth
yapi whoami
yapi login
# search / fetch
yapi search --q keyword --project-id 310
yapi --path /api/interface/get --query id=123
yapi --path /api/interface/list_cat --query catid=123
Config cache locations:
~/.yapi/config.toml~/.yapi-mcp/auth-*.jsonBinding mode (recommended):
yapi docs-sync bind add --name projectA --dir docs/release-notes --project-id 267 --catid 3667
yapi docs-sync --binding projectA --dry-run
yapi docs-sync --binding projectA
Notes:
.yapi/docs-sync.json.yapi/docs-sync.links.json, .yapi/docs-sync.projects.json, .yapi/docs-sync.deployments.json--force for full sync..yapi.json config as fallback (without binding).req_body_type (use json if unsure) and provide res_body (prefer JSON Schema) when creating/updating interfaces.req_* / res_body, not only in free-text desc/markdown.