> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vibehub.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# vibe login

> Authenticate with your VibeHub account

## Usage

```bash theme={null}
vibe login [options]
```

## Description

Authenticate with your VibeHub account. This opens your browser to complete the sign-in process using Google OAuth.

## Options

<ParamField query="--profile" type="string">
  Specify a profile name for multiple accounts. Defaults to "default".
</ParamField>

## Examples

### Basic Login

```bash theme={null}
vibe login
```

This opens your default browser to sign in with Google.

### Login with Profile

```bash theme={null}
vibe login --profile work
```

Use profiles to manage multiple VibeHub accounts (e.g., personal and work).

## What Happens

<Steps>
  <Step title="Browser Opens">
    Your default browser opens to the VibeHub login page
  </Step>

  <Step title="Sign In">
    Sign in with your Google account
  </Step>

  <Step title="Authorization">
    VibeHub receives your authentication token
  </Step>

  <Step title="Token Stored">
    Your credentials are securely stored locally
  </Step>
</Steps>

## Output

A successful login shows:

```
Opening browser for authentication...
✓ Successfully logged in as your.email@gmail.com
Profile: default

You can now use VibeHub CLI commands.
```

## Credential Storage

Your credentials are stored in:

| OS      | Location                             |
| ------- | ------------------------------------ |
| macOS   | `~/.vibehub/credentials`             |
| Linux   | `~/.vibehub/credentials`             |
| Windows | `%USERPROFILE%\.vibehub\credentials` |

## Multiple Accounts

Use profiles to manage multiple VibeHub accounts:

```bash theme={null}
# Login to personal account (default)
vibe login

# Login to work account
vibe login --profile work

# Login to client account
vibe login --profile client

# Switch between profiles
vibe use work
vibe use default
```

## Verify Login

Check if you're logged in:

```bash theme={null}
vibe whoami
```

Output:

```
Logged in as: your.email@gmail.com
Profile: default
```

## Troubleshooting

### Browser Doesn't Open

If the browser doesn't open automatically:

1. Look for the URL printed in the terminal
2. Copy and paste it into your browser manually
3. Complete the sign-in process

### Already Logged In

If you're already logged in, running `vibe login` again will:

* Re-authenticate your account
* Refresh your token
* Keep the same profile

### Wrong Account

If you signed in with the wrong Google account:

```bash theme={null}
vibe logout
vibe login
```

Then sign in with the correct account.

## Security

<Warning>
  Never share your authentication tokens. They grant full access to your VibeHub account.
</Warning>

* Tokens are stored locally on your machine
* Use `vibe logout` on shared computers
* Credentials are not encrypted by default - protect your home directory

## Related Commands

* [vibe logout](/cli/commands/logout) - Sign out of VibeHub
* [vibe whoami](/cli/commands/whoami) - Check current user
* [vibe profiles](/cli/commands/profiles) - Manage multiple accounts
