Skip to content

feat: CLI login/logout/whoami commands#1

Open
sonpiaz wants to merge 2 commits into
mainfrom
feat/cli-auth-commands
Open

feat: CLI login/logout/whoami commands#1
sonpiaz wants to merge 2 commits into
mainfrom
feat/cli-auth-commands

Conversation

@sonpiaz

@sonpiaz sonpiaz commented Apr 11, 2026

Copy link
Copy Markdown
Member

Summary

  • affitor login — opens browser, polls CMS for JWT via handshake
  • affitor logout — deletes stored credentials
  • affitor whoami — shows logged-in user info
  • API client updated with authStart() and authPoll() methods

Test plan

  • npx affitor --help shows login/logout/whoami commands
  • affitor whoami --json returns {"logged_in": false} when not logged in
  • affitor logout --json works cleanly
  • affitor login opens browser and polls (requires CMS running)

🤖 Generated with Claude Code

sonpiaz and others added 2 commits April 11, 2026 00:51
Opens dashboard login page, polls CMS for JWT via polling handshake.
Credentials stored in ~/.affitor/credentials.json (mode 0600).
Supports --json flag for agent automation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…JSON

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant