feat(widgets): add Claude account email widget#295
Conversation
Adds a new ClaudeAccountEmail widget in the Session category that displays the user's email by reading from git config user.email or falling back to common environment variables (GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL, EMAIL, USER_EMAIL). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@FA387 Can you explain how the configured git email relates to the authenticated Claude account? To pull the Claude account email you'd need to look in |
Replaces the git config approach with reading oauthAccount.emailAddress directly from ~/.claude.json — the actual Claude account credentials file. Respects CLAUDE_CONFIG_DIR environment variable. No external tools required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Good catch, thanks for the feedback! You're right — git email and Claude account email are completely unrelated. I've updated the widget to read |
|
P.S. I think it will help other people in the same situations Best regards |
|
Thanks for this. It'll be published in the next release. |
|
Thank you, sir! Glad that I can contribute~ |
Summary
git config user.emailfirst, then falls back to common environment variables (GIT_AUTHOR_EMAIL,GIT_COMMITTER_EMAIL,EMAIL,USER_EMAIL)nullgracefully if no email source is found (widget is hidden)Widget details
Claude Account EmailSessionblueyou@example.comWhy this is useful
When using Claude Code with multiple accounts (e.g. via ccswitch), it's helpful to see at a glance which account/email is active in the status line — no need to run
git config user.emailseparately.Test plan
bun run start) under the Session categorygit config user.email, setEMAILenv var insteadyou@example.comin the TUI editor🤖 Generated with Claude Code