Skip to content

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

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

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

Conversation

@digaobarbosa
Copy link
Copy Markdown
Contributor

@digaobarbosa digaobarbosa commented May 20, 2026

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 metadata command — single-image sync or multi-image batch (async with polling)
  • roboflow image tag kept as a hidden alias pointing to the same handler (zero duplication)
  • 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?

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

Usage examples

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

# Remove metadata keys
roboflow image metadata <image_id> --remove-metadata "old_key"

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

# Tag alias works identically
roboflow image tag <image_id> --tags "review" --remove-tags "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 3 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>
@digaobarbosa digaobarbosa self-assigned this May 21, 2026
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