Skip to content

feat(user): add --json and --full support to tw user#175

Merged
scottlovegrove merged 1 commit intomainfrom
scottl/user-json
Apr 16, 2026
Merged

feat(user): add --json and --full support to tw user#175
scottlovegrove merged 1 commit intomainfrom
scottl/user-json

Conversation

@scottlovegrove
Copy link
Copy Markdown
Collaborator

Summary

  • Adds --json and --full flags to tw user so the current session user can be emitted as machine-readable JSON, matching the pattern already in tw users and tw away status.
  • Updates SKILL_CONTENT (and regenerates skills/twist-cli/SKILL.md) to document the new flags.
  • Adds tests covering both essential-fields and --full output.

Test plan

  • npm test -- user passes (3 tests)
  • Full suite passes via pre-push hook (443 tests)
  • npm run build clean
  • npm run sync:skill clean
  • Manual: tw user --json | jq .id returns the current user id

🤖 Generated with Claude Code

Brings `tw user` in line with `tw users` and `tw away status` for
machine-readable output, enabling scripting use cases like piping the
current user's id or email into other commands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@doistbot doistbot requested a review from Bloomca April 16, 2026 16:02
@scottlovegrove scottlovegrove self-assigned this Apr 16, 2026
@scottlovegrove scottlovegrove added the 👀 Show PR PR must be reviewed before or after merging label Apr 16, 2026
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds --json and --full flag support to the tw user command, alongside the necessary skill documentation updates and test coverage. These additions nicely improve the CLI's scriptability and maintain consistency across the available machine-readable output options. No issues were flagged during the review.

Share FeedbackReview Logs

@scottlovegrove scottlovegrove merged commit 00aae9f into main Apr 16, 2026
5 checks passed
@scottlovegrove scottlovegrove deleted the scottl/user-json branch April 16, 2026 16:08
doist-release-bot bot added a commit that referenced this pull request Apr 16, 2026
## [2.30.0](v2.29.2...v2.30.0) (2026-04-16)

### Features

* **user:** add --json and --full support to tw user ([#175](#175)) ([00aae9f](00aae9f))
@doist-release-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released 👀 Show PR PR must be reviewed before or after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants