Skip to content

CLI: --tag flag appends instead of replacing tags #14

@orveth

Description

@orveth

Bug

When using blaze edit <id> --tag foo --tag bar, the tags are appended to existing tags rather than replacing them.

Steps to Reproduce

  1. Create a card with tags: blaze add "Test" --tag old-tag
  2. Edit to change tags: blaze edit <id> --tag new-tag
  3. Check the result: blaze show <id> -o json | jq '.tags'

Expected Behavior

Tags should be replaced, or there should be explicit --tag +add / --tag -remove syntax for incremental changes.

Actual Behavior

Tags accumulate. Example result after multiple edits:

["blaze", "nostr,infrastructure", "nostr", "infrastructure"]

Also note that --tag nostr,infrastructure was treated as a single tag string rather than two separate tags.

Suggested Fix

Either:

  1. Make --tag replace all tags (simpler)
  2. Add --tag +foo to add and --tag -foo to remove (more flexible)
  3. Add --clear-tags flag to reset before adding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions