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

# major user

> Authenticate to Major, manage your session, and inspect who you are logged in as.

The `user` group handles authentication. Tokens are stored securely in your OS keychain.

| Command                | Purpose                             |
| ---------------------- | ----------------------------------- |
| `major user login`     | Log in and select an organization.  |
| `major user logout`    | Log out and remove credentials.     |
| `major user whoami`    | Show current user and organization. |
| `major user gitconfig` | Set your GitHub username.           |

## `major user login`

```bash theme={null}
major user login
```

**When to use:** authenticating with Major.

**What happens:**

1. Opens the login page in your browser.
2. Authenticate with email/password or SSO (if configured for your organization).
3. Securely stores your session token.
4. Prompts you to select your default organization.

<Note>
  You can re-run `login` anytime to refresh your token or switch organizations.
</Note>

## `major user logout`

```bash theme={null}
major user logout
```

**When to use:** signing out or switching accounts.

**What happens:**

1. Revokes your session.
2. Removes your stored credentials.

## `major user whoami`

```bash theme={null}
major user whoami
```

**When to use:** checking your current login status.

**What happens:**

Displays your email and current organization.

## `major user gitconfig`

```bash theme={null}
major user gitconfig
```

**When to use:** setting up or updating your GitHub username.

**What happens:**

1. Shows your currently stored username (if any).
2. Prompts you to enter or update your GitHub username.
3. Saves the username so Major can automatically invite you to new repositories.
