login - OAuth Authentication
Overview
The login command authenticates you with nmbl using OAuth through your Google account. Authentication is required to use most nmbl commands. The authentication process opens your default web browser and securely stores credentials locally.
Syntax
nmbl loginAuthentication Flow
- Run
nmbl login - Your default browser opens to the Google OAuth page
- Sign in with your Google account
- Grant permissions to nmbl
- Authentication token is stored locally
- You’re ready to use nmbl commands
Examples
First Time Setup
# Install nmbl
dotnet tool install --global nmbl
# Authenticate
nmbl login
# Verify authentication
nmbl whoamiRe-authenticate After Token Expiry
# If you see authentication errors
nmbl login
# Try the command again
nmbl cc src/Authenticate on a New Machine
# After installing nmbl on a new machine
nmbl loginUse Cases
Initial Setup
# Complete setup process
dotnet tool install --global nmbl
nmbl login
nmbl --versionTeam Onboarding
# New team member setup
dotnet tool install --global nmbl
nmbl login
# Now ready to use team commandsCI/CD Authentication
For CI/CD environments, you may need to use alternative authentication methods or license keys. See the Authentication documentation for details.
Token Storage
Authentication tokens are stored:
- Location: In your user profile directory
- Security: Encrypted and accessible only to your user account
- Persistence: Tokens persist across sessions until they expire or you log out
Troubleshooting
Browser Doesn’t Open
If the browser doesn’t open automatically:
- Copy the URL from the console output
- Manually paste it into your browser
- Complete the authentication flow
Authentication Fails
If authentication fails:
- Check your internet connection
- Ensure you have a Google account
- Try logging out and back in:
nmbl logout nmbl login
Permission Denied
If you see permission errors:
- Ensure you have write access to your user profile directory
- On Linux/Mac, check file permissions
- Try running without sudo (don’t use sudo with login)
Corporate Firewall
If behind a corporate firewall:
- Ensure OAuth URLs aren’t blocked
- Check with your IT department
- Consider using license key authentication instead
Authentication Methods
nmbl supports multiple authentication methods:
OAuth (Google)
nmbl loginBest for individual developers.
License Key
See Authentication documentation for license key setup.
Security Best Practices
Don’t Share Tokens
- Never share your authentication token
- Don’t commit tokens to version control
- Don’t share screenshots containing token information
Regular Re-authentication
# Periodically re-authenticate for security
nmbl logout
nmbl loginMachine-Specific Authentication
# Authenticate separately on each machine
# Don't copy tokens between machinesRelated Commands
logout- Clear authentication tokenswhoami- Check authentication status- Authentication Guide - Detailed authentication documentation