Skip to content

feat(cli): add image update command for metadata and tags#483

Draft
digaobarbosa wants to merge 2 commits into
mainfrom
digao/cli-image-metadata-update
Draft

feat(cli): add image update command for metadata and tags#483
digaobarbosa wants to merge 2 commits into
mainfrom
digao/cli-image-metadata-update

Conversation

@digaobarbosa
Copy link
Copy Markdown
Contributor

Description

Adds CLI support for updating metadata and tags on existing images using the new workspace-level API endpoints (roboflow/roboflow#11836).

Changes:

  • New roboflow image update command — single-image sync or multi-image batch (async with polling)
  • Refactored roboflow image tag to use the new POST /{workspace}/images/{imageId}/metadata endpoint, removing the now-unnecessary --project flag
  • Two new rfapi adapter functions: update_image_metadata (sync) and batch_update_image_metadata (async)

Type of change

  • New feature

How has this change been tested?

  • 116 unit tests pass (16 new tests covering adapter + CLI handler)
  • ruff lint and mypy pass
  • CLI help verified for both image update and image tag

Usage examples

# Single image: set metadata + add tags
roboflow image update <image_id> -m '{"camera": "cam1"}' --add-tags "review,v2"

# Batch: update multiple images, poll for completion
roboflow image update img1,img2,img3 --add-tags "processed" --poll

# Tag shorthand (no --project needed anymore)
roboflow image tag <image_id> --add "review" --remove "draft"

Will the change affect Universe?

No

Any specific deployment considerations

N/A — SDK-only change

Docs

  • Docs updated? CLI-COMMANDS.md update needed (tracked separately)

digaobarbosa and others added 2 commits May 20, 2026 16:10
… new metadata endpoint

Adds support for the new workspace-level image metadata/tags API:
- `roboflow image update` for updating metadata and tags on existing images (single sync + batch async)
- Refactors `roboflow image tag` to use the new endpoint, removing the now-unnecessary `--project` flag

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… hidden alias

Both `roboflow image metadata` and `roboflow image tag` now point to the
same handler with identical flags (--tags, --remove-tags, --metadata,
--remove-metadata, --poll, --timeout). Zero code duplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant