Skip to content

feat: CLI support for issue metadata (bd update --metadata, @file.json, editor) #1413

@turian

Description

@turian

Context

Issue metadata support was added in PR #1407 (requested in #1406). Metadata is now stored and validated as JSON, but there is no first-class CLI UX for setting/updating it.

Goal

Add CLI support to set/update issue.metadata conveniently.

Proposed UX

  • Inline JSON:
    • bd update <id> --metadata '{"files":["a.go","b.go"]}'
  • Update via file:
    • bd update <id> --metadata @meta.json
  • Optional: edit in $EDITOR:
    • bd edit <id> --metadata (or bd update <id> --metadata-edit)

Validation

  • Reuse existing validation (json.Valid) and return a clear error on invalid JSON.
  • Consider allowing empty input to clear metadata (set to {} or null semantics—TBD).

Acceptance Criteria

  • Can set metadata on an issue in both direct and daemon modes.
  • bd show --json includes metadata when set.
  • Invalid JSON is rejected with a helpful error message.

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