Context#
The tangled issue create command currently only produces human-readable output. In scripting and LLM workflows it's common to capture the result of a create command and pass fields (like the issue number or URI) directly to a subsequent command without parsing formatted text.
All other read commands (issue list, issue view) already support --json, so issue create is an inconsistent gap.
Tasks#
- Add
--json [fields]option totangled issue create, consistent with the existing--jsonpattern onissue listandissue view.- JSON output should include at minimum:
number,title,uri,state,createdAt. - Support optional comma-separated field filtering (e.g.
--json number,uri) to match existing behaviour.
- JSON output should include at minimum:
- Add tests for JSON output from
issue create, covering full output and field-filtered output.
Notes#
Depends on (or should be done alongside) issue #8, which adds the sequential number to the human-readable output โ the same resolved number should appear in the JSON output. Follows the field-filtering pattern already implemented in src/utils/formatting.ts.
Closed by https://tangled.org/markbennett.ca/tangled-cli/pulls/2