feat: add --json support to mutating commands#84
Merged
scottlovegrove merged 2 commits intomainfrom Mar 14, 2026
Merged
Conversation
Add --json (and --full where applicable) to thread reply/done, conversation reply/done, msg update/delete. Object-returning mutations (reply, update) output the full entity via formatJson(); void mutations (done, delete) output a minimal status object for scripting consumers. Extends MutationOptions with json/full fields and documents the pattern in AGENTS.md so future commands follow the same convention. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
This PR introduces valuable machine-readable output by adding --json and --full flags to mutating commands and establishing a consistent pattern via MutationOptions. These enhancements will greatly improve the CLI's programmatic usability for future integrations. However, there is a minor omission in the skill source of truth (SKILL_CONTENT), which currently only documents the --json option and might cause agents to overlook the extended payload capabilities provided by the --full flag.
Follow-up to PR review: add --full examples to thread reply, conversation reply, and msg update in SKILL_CONTENT so agents know the extended payload form is available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
github-actions bot
pushed a commit
that referenced
this pull request
Mar 14, 2026
# [2.12.0](v2.11.0...v2.12.0) (2026-03-14) ### Features * add --json support to mutating commands ([#84](#84)) ([738ecf2](738ecf2))
|
🎉 This PR is included in version 2.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--json(and--fullwhere applicable) to all mutating commands:thread reply,thread done,conversation reply,conversation done,msg update,msg deleteformatJson(); void mutations (archive/delete) output a minimal status object (e.g.{ id, deleted: true })MutationOptionsinsrc/lib/options.tswithjsonandfullfields so future commands get the pattern for freeAGENTS.mdso future contributors follow the same approachTest plan
tw thread reply <ref> "test" --jsonreturns comment object withid,content,threadId, etc.tw thread reply <ref> "test" --json --fullreturns all comment fieldstw thread done <ref> --jsonreturns{ "id": ..., "isArchived": true }tw conversation reply <ref> "test" --jsonreturns message objecttw conversation done <ref> --jsonreturns{ "id": ..., "archived": true }tw msg update <ref> "test" --jsonreturns updated message objecttw msg delete <ref> --jsonreturns{ "id": ..., "deleted": true }--json(text output unchanged)🤖 Generated with Claude Code