Login and Authentication

The Codity CLI supports browser-based VCS login and Codity email/password login.

Browser Login

Run the login command:

codity login

This opens your default browser where you authenticate with your VCS provider (GitHub, GitLab, Bitbucket, or Azure DevOps). Once authenticated, the CLI automatically receives your credentials with no manual token copying required.

After a successful login, the CLI displays:

  • Account — Your username
  • Organization — Your workspace/org name
  • Provider — The VCS provider used
  • Workspace — The active workspace ID

Email Login

If your organization uses Codity email accounts, sign in with:

codity login --email

The CLI prompts for:

  1. Email address
  2. Password

After successful login, the CLI stores your Codity workspace credentials and shows the active account, organization, provider, and workspace.

Use email login when:

  • You accepted a Codity invite link and created a password.
  • Your team uses Codity without a VCS-provider dashboard login.
  • The dashboard's CLI setup page tells you to run codity login --email.

See Codity Accounts for the full account and invite flow.

Logging Out

To log out from CLI:

codity logout

Verifying Authentication

After logging in, run:

codity doctor

If your session has expired, run codity login or codity login --email again.

Personal Access Tokens (PAT)

For pull request operations (codity pr), you may need to configure a VCS Personal Access Token:

codity config set-pat

This interactive command prompts you to:

  1. Select your VCS provider (GitHub, GitLab, Bitbucket, or Azure DevOps)
  2. Enter your Personal Access Token
  3. Optionally add a label

The token is encrypted and stored securely on the server — it is never stored in plaintext locally.