Skip to content

Add label assign command#21

Merged
garaemon merged 3 commits intomainfrom
2026.04.05-label-assign
Apr 7, 2026
Merged

Add label assign command#21
garaemon merged 3 commits intomainfrom
2026.04.05-label-assign

Conversation

@garaemon
Copy link
Copy Markdown
Owner

@garaemon garaemon commented Apr 5, 2026

Assign existing labels to library items from the CLI

Adds paperpile label assign <item_id> <label_name> which resolves the label
name to its ID, appends it to the item's current label list, and pushes the
update through the Sync API. Errors if the label is already assigned.

Test plan

  • API layer tests: success, label not found, item not found
  • CMD layer tests: success output, error propagation
  • go vet and go test ./... pass

🤖 Generated with Claude Code

garaemon and others added 3 commits April 5, 2026 11:31
Allow assigning an existing label to a library item via `paperpile label assign <item_id> <label_name>`.
The command resolves the label name to its ID, appends it to the item's label list,
and pushes the update through the Sync API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Sync API requires mcollection "Library" (not "LibraryItems") for item
updates, plus a "fields" key and "updated" timestamp in the data payload.
Without these the server rejects with a 400 schema validation error.
Matches the pattern used by TrashItem in delete.go.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve merge conflicts after label delete was merged into main.
Both label assign and label delete commands are now present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@garaemon garaemon merged commit 0eca24d into main Apr 7, 2026
3 checks passed
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