Skip to content

Refactor login command to auth with status/logout subcommands#4

Merged
scottlovegrove merged 1 commit intomainfrom
scottl/auth
Jan 22, 2026
Merged

Refactor login command to auth with status/logout subcommands#4
scottlovegrove merged 1 commit intomainfrom
scottl/auth

Conversation

@scottlovegrove
Copy link
Copy Markdown
Collaborator

Summary

  • Rename tw logintw auth with subcommands structure
  • Rename tw login tokentw auth token
  • Add tw auth status to show current auth state and user info
  • Add tw auth logout to remove stored token

Changes Made

  • New auth command structure: Converted single login command to auth parent command with subcommands
  • Added status subcommand: Shows authentication status and user info when logged in
  • Added logout subcommand: Removes stored authentication token
  • Enhanced auth library: Added clearApiToken() function to properly handle token removal
  • Updated tests: Comprehensive test coverage for all new auth subcommands
  • Updated documentation: Updated CLAUDE.md to reflect new auth system

Test plan

  • npm run build passes
  • npm run type-check passes
  • npm test passes (88 tests)
  • Manual test: tw auth --help shows all subcommands
  • Manual test: tw auth status shows unauthenticated state
  • Manual test: tw auth token <token> saves token successfully
  • Manual test: tw auth logout removes stored token
  • All linting checks pass

🤖 Generated with Claude Code

- Rename `tw login` → `tw auth` with subcommands structure
- Rename `tw login token` → `tw auth token`
- Add `tw auth status` to show current auth state and user info
- Add `tw auth logout` to remove stored token
- Add clearApiToken function to lib/auth.ts
- Update tests and documentation

Co-Authored-By: Claude Sonnet 4 <[email protected]>
@scottlovegrove scottlovegrove self-assigned this Jan 22, 2026
@scottlovegrove scottlovegrove requested a review from gnapse January 22, 2026 15:59
@scottlovegrove scottlovegrove added the 👀 Show PR PR must be reviewed before or after merging label Jan 22, 2026
@scottlovegrove scottlovegrove merged commit 59e6493 into main Jan 22, 2026
2 checks passed
@scottlovegrove scottlovegrove deleted the scottl/auth branch January 22, 2026 16:00
github-actions Bot pushed a commit that referenced this pull request Jan 22, 2026
# 1.0.0 (2026-01-22)

### Bug Fixes

* add UTF-8 charset to OAuth callback HTML responses ([#8](#8)) ([fcb2d49](fcb2d49))

### Features

* Add Biome linting, upgrade to Node 20, and add CI workflows ([#3](#3)) ([57f802e](57f802e))
* add loading animations with global API proxy integration ([#7](#7)) ([bf53bfb](bf53bfb))
* Add OAuth authentication with dynamic client registration ([#6](#6)) ([2845ebd](2845ebd)), closes [#5](#5)
* add semantic release automation for NPM publishing ([#10](#10)) ([c756324](c756324))
* Refactor login command to auth with status/logout subcommands ([#4](#4)) ([59e6493](59e6493))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Copy Markdown
Collaborator

@gnapse gnapse left a comment

Choose a reason for hiding this comment

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

🎉

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