跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

platform-cli

Use when operating Ultralytics Platform from a terminal or script with the ul cloud CLI (ul cloud RESOURCE OPERATION key=value, PyPI package ultralytics-platform) — listing, creating, updating, cloning, or moving projects, datasets, and models; inspecting dataset images, statistics, metadata, duplicates, and similar images; starting and monitoring cloud training runs; per-image model validation analysis; downloading weights; exports, deployments, uploads, trash and restore, storage integrations, and account usage, storage, and billing; and building Agents (YOLO, LLM, gate, and alert workflows). For the Platform web UI or local yolo commands, see yolo; for choosing what to train and how to improve it, see yolo-training and yolo-tuning.

ultralytics · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ultralytics/skills --skill platform-cli

技能说明


name: platform-cli description: > Use when operating Ultralytics Platform from a terminal or script with the ul cloud CLI (ul cloud RESOURCE OPERATION key=value, PyPI package ultralytics-platform) — listing, creating, updating, cloning, or moving projects, datasets, and models; inspecting dataset images, statistics, metadata, duplicates, and similar images; starting and monitoring cloud training runs; per-image model validation analysis; downloading weights; exports, deployments, uploads, trash and restore, storage integrations, and account usage, storage, and billing; and building Agents (YOLO, LLM, gate, and alert workflows). For the Platform web UI or local yolo commands, see yolo; for choosing what to train and how to improve it, see yolo-training and yolo-tuning.

Platform CLI (ul cloud)

ul needs Python 3.11+ and comes with pip install ultralytics or pip install ultralytics-platform. ul cloud <resource> <operation> calls the Platform API through the generated SDK; ul login, ul train, ul predict, the ul cloud train|predict|export|download shortcuts (see yolo), and the other local commands delegate to the ultralytics package. This skill covers Platform operations, not model selection or hyperparameter tuning.

pip install ultralytics                   # or `pip install ultralytics-platform`
export ULTRALYTICS_API_KEY="YOUR_API_KEY" # or `ul login API_KEY`
ul cloud --help                           # every resource and operation
ul cloud training start --help            # one operation's arguments, types, and choices

Canonical command shapes

ul cloud account summary # plan, credits, counts; `username` is your workspace
ul cloud datasets list   # omit owner= for your own workspace; owner=TEAM for a team
ul cloud projects create project=helmets name="Helmet Detection" visibility=private
ul cloud models create body='{"owner":"WS","project":"helmets","model":"exp1","name":"Experiment 1"}'
ul cloud training start model_id=MODEL_ID gpu_type=l4 \
  train_args='{"model":"yolo26n.pt","data":"ul://WS/datasets/helmets","epochs":50}'
ul cloud models training project=helmets model=exp1 # live status, epoch progress, metrics
ul cloud models files project=helmets model=exp1    # short-lived weights download URL

Argument rules:

  • Use the command shapes shown here without a preliminary --help call. Check operation help when a needed argument is missing or after an argument error.
  • Arguments are SDK Python names as key=value (gpu_type, project_id), never --key value. A boolean key given without =value means true. Quote JSON for the shell.
  • An operation takes one body= JSON object exactly when its help lists body (dict[str, Any]). These are the operations whose API request is a union of shapes: models create, deployments update, images update, lifecycle delete-trash, datasets ingest, datasets create-batch, upload signed-url, storage-integrations create/discover, and models predict/deployments predict. Every other operation takes flat fields; nested objects such as train_args, metadata, and args are still JSON values.
  • Object and array values accept @file.json or @- for stdin. Multipart binaries such as the predict file field accept @path only.
  • For body keys and value types, read only the operation's request schema, such as paths["/api/models"].post.requestBody, from the production contract at https://platform.ultralytics.com/openapi.json, instead of guessing or loading the whole file.

Behavior rules:

  • Output is the complete API response on stdout, printed as JSON, text, or bytes according to its content type. Download operations return expiring signed URLs, not bytes: datasets export, datasets create-export, models files, and a completed exports retrieve. Preserve them verbatim and fetch them separately.
  • Failures go to stderr: exit 1 for API/connection errors, 2 for argument/file errors, 130 when interrupted. Interrupting does not cancel a submitted job; use its cancel operation (models delete-training, exports delete, datasets delete-batch).
  • There is no --json, --fields, --dry-run, or automatic pagination. datasets list (limit, include_samples, include_image_urls) and projects list (limit) take no offset or search; pass include_samples=false to keep dataset listings small. models list requires project=. Operations that page expose page, offset, cursor, or page_token. Follow returned continuation fields until exhausted. A limit-only listing may still be incomplete.
  • An omitted path owner defaults to the logged-in username after one account lookup. Pass owner=TEAM for team workspaces. Account, billing, trash, storage-integration, and Roboflow commands act on the credential's own account, and account summary does not list teams for API keys.
  • Display names, URL slugs, database IDs, and URIs are distinct. Training data is ul://OWNER/datasets/DATASET; starting weights are a checkpoint name or ul://OWNER/PROJECT/MODEL. Carry returned IDs and slugs into the next command; retrieve missing identifiers instead of inferring them from names or URLs. Take a named dataset's or project's slug from its listing before retrieving it.

Working method

  1. Resolve the requested outcome and target. Use exact supplied identifiers; otherwise list and pick one unambiguous match. For several matches, inspect distinguishing metadata and ask when the target or consequence stays ambiguous. When a named resource is not found, say so and offer the closest matches; never substitute another one. A bounded listing does not prove absence; broaden discovery or report what was searched. Look up datasets the user names in their own workspace; find new public datasets with explore search q=... type=datasets, one short keyword at a time (aerial, then UAV), narrowed with task=. Explore dataset search lists token-autocomplete name matches i
阅读完整来源 ↗