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 login

Authentication Flow

  1. Run nmbl login
  2. Your default browser opens to the Google OAuth page
  3. Sign in with your Google account
  4. Grant permissions to nmbl
  5. Authentication token is stored locally
  6. You’re ready to use nmbl commands

Examples

First Time Setup

# Install nmbl
dotnet tool install --global nmbl

# Authenticate
nmbl login

# Verify authentication
nmbl whoami

Re-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 login

Use Cases

Initial Setup

# Complete setup process
dotnet tool install --global nmbl
nmbl login
nmbl --version

Team Onboarding

# New team member setup
dotnet tool install --global nmbl
nmbl login
# Now ready to use team commands

CI/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:

Troubleshooting

Browser Doesn’t Open

If the browser doesn’t open automatically:

  1. Copy the URL from the console output
  2. Manually paste it into your browser
  3. Complete the authentication flow

Authentication Fails

If authentication fails:

  1. Check your internet connection
  2. Ensure you have a Google account
  3. Try logging out and back in:
    nmbl logout
    nmbl login

Permission Denied

If you see permission errors:

Corporate Firewall

If behind a corporate firewall:

Authentication Methods

nmbl supports multiple authentication methods:

OAuth (Google)

nmbl login

Best for individual developers.

License Key

See Authentication documentation for license key setup.

Security Best Practices

Don’t Share Tokens

Regular Re-authentication

# Periodically re-authenticate for security
nmbl logout
nmbl login

Machine-Specific Authentication

# Authenticate separately on each machine
# Don't copy tokens between machines