@he9527/yingdao-openapi-cli
v0.1.4
Published
Command line tools for Yingdao RPA OpenAPI.
Readme
Yingdao OpenAPI CLI
yingdao is a Node.js CLI for Yingdao RPA OpenAPI. It is designed for normal
command-line use and for agent tool calls: every command supports -h/--help,
uses readable flags, and prints JSON.
Install
From this folder during development:
npm install -g .
yingdao -hAfter publishing to npm:
npm install -g @he9527/yingdao-openapi-cli
yingdao -hNode.js 18 or newer is required. The CLI has no third-party runtime dependencies.
Credentials
For normal use, configure the Yingdao accessKey credentials once. The CLI saves
them in the user config file, then creates, caches, and refreshes accessToken
automatically.
yingdao auth config --access-key-id "..." --access-key-secret "..."Check configuration and token cache status:
yingdao auth status --prettyIf credentials are missing, configure them first. Agents should stop here and show the setup command instead of running app/job/task/queue commands as a test.
Optional private-cloud base URL:
yingdao auth config --access-key-id "..." --access-key-secret "..." --base-url "https://api.your-domain.example"By default config and token cache files are stored under
~/.yingdao-openapi-cli/. Use YINGDAO_CONFIG_DIR only when an agent or test
run needs an isolated config directory.
Environment variables YINGDAO_ACCESS_KEY_ID, YINGDAO_ACCESS_KEY_SECRET, and
YINGDAO_BASE_URL are still supported for temporary sessions. Advanced only:
YINGDAO_ACCESS_TOKEN is accepted for debugging, but agents should prefer saved
accessKey credentials so token lifecycle is automatic.
To remove saved credentials and token cache:
yingdao auth clear-config --prettyHelp
yingdao -h
yingdao app -h
yingdao job -h
yingdao queue -h
yingdao call -hCommon Commands
Preview a request without network access:
yingdao app list --page 1 --size 20 --dry-run --prettyFor broad or bulk dangerous requests, stop and confirm exact targets first. Do not start all apps/tasks, stop all running jobs, retry all failed jobs, delete users, transfer all apps, or modify queue items in bulk without an explicit confirmed list of UUIDs/accounts.
List apps:
yingdao app list --page 1 --size 20Query apps using the Postman collection endpoint:
yingdao app query --accurate-robot-name "应用名称" --page 1 --size 10Query app main-flow parameter schema:
yingdao app param-schema --robot-uuid <app-or-robot-uuid>Start a job/application:
yingdao job start --robot-uuid <uuid> --param orderId=123 --typed-param amount:number=99job start --param is converted to the documented params array. Use
--typed-param name:type=value for non-string or file parameters.
Start a scheduled/manual task. scheduleUuid comes from schedule.list or
schedule.detail; the returned taskUuid is used later for query/stop:
yingdao schedule list --source-name "任务名称" --pretty
yingdao task start --schedule-uuid <schedule-uuid> --prettyFor task startup parameters:
yingdao task start --schedule-uuid <schedule-uuid> --rela-param <robot-uuid>:orderId=123 --rela-param <robot-uuid>:fileKey:file=<file-key>Query a job:
yingdao job query --job-uuid <job-uuid>Fetch job logs with pagination. log-search returns the page directly;
log-notify creates an async log query for the same page/filter, and
log-query only polls by requestId, so set page and size on
log-search or log-notify:
yingdao job log-search --job-uuid <job-uuid> --page 2 --size 50 --sort-key time --sort-order desc
yingdao job log-notify --job-uuid <job-uuid> --page 2 --size 50 --search-key "错误"
yingdao job log-query --request-id <request-id>Enqueue a queue item:
yingdao queue enqueue --queue-uuid <queue-uuid> --name order-123 --priority 100Upload a file:
yingdao file upload --file D:\path\input.xlsxUse an endpoint wrapper directly:
yingdao call job.start --body-file .\job_start.json --dry-run --prettyCall any raw OpenAPI path:
yingdao raw POST /oapi/dispatch/v2/job/start --body-file .\job_start.jsonEndpoint Names
yingdao endpoint list --prettyImportant endpoint names include:
token.createtask.start,task.query,task.stopschedule.list,schedule.detailjob.start,job.query,job.stop,job.retry,job.listjob.log-search,job.log-notify,job.log-queryclient.group-list,client.list,client.queryfile.uploadapp.list,app.run-records,app.param-schema,app.transfer-ownerqueue.enqueue,queue.dequeue,queue.update-item,queue.reenqueueuser.list,user.create,user.modify,user.delete,user.reset-password
Publish
Before publishing:
npm pack --dry-run
npm publish --access publicUse an npm scope/name that you control. The current package name is
@he9527/yingdao-openapi-cli; change it in package.json if needed.
Legacy Python Tool
yingdao_openapi_cli.py remains in this folder for compatibility, but the npm
package entrypoint is bin/yingdao.js.
