Skip to content

Conversation

@ddiddi
Copy link
Contributor

@ddiddi ddiddi commented Dec 2, 2025

Summary

Adds a complete authentication system to Solo CLI with three new commands that enable users to authenticate with hub.getsolo.tech.

New Commands

  • solo login - Directs users to hub.getsolo.tech to obtain authentication token

    • Opens hub.getsolo.tech automatically in browser
    • Prompts for token input (hidden for security)
    • Saves token to config file
  • solo logout - Removes authentication token

    • Clears token from config file
    • Provides confirmation message
  • solo whoami - Shows current authentication status

    • Displays authentication status
    • Shows masked token (first 8 + last 4 characters)
    • Shows user domain if configured
    • Provides helpful guidance if not authenticated

Additional Features

  • Helper functions (is_authenticated(), require_auth()) for other commands to check authentication
  • Secure token storage in config file under auth section
  • Rich console formatting for better user experience

Files Changed

  • solo/cli.py - Added 3 new command definitions
  • solo/commands/login.py - New file with all authentication logic (192 lines)

Test Plan

  • Test solo login command opens browser and saves token correctly
  • Test solo logout command removes token from config
  • Test solo whoami displays correct authentication status
  • Verify token masking works properly in whoami output
  • Test helper functions can be imported by other commands
  • Verify authentication state persists across CLI invocations

🤖 Generated with Claude Code

- Add solo login command that directs users to hub.getsolo.tech to get token
- Add solo logout command to remove authentication token
- Add solo whoami command to display current authentication status
- Include helper functions (is_authenticated, require_auth) for other commands to use
- Store authentication token securely in config file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <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.

2 participants