Browse documentation

Authentication

Sign in to Mind with your GitHub account or a passkey

Mind supports these ways to sign in:

MethodIDECLIWeb
GitHub✓✓✓
Passkey——✓
API key (CI/headless)—✓—
Users with a paid Mind subscription who sign in with GitHub or a passkey are considered individual subscribers. We may use certain content from Mind Free Tier and Mind individual subscribers for service improvement. For more information on service improvement and how to opt out, see Service improvement.

Sign in to Mind

Both methods complete in the browser:

  • GitHub — choose Continue with GitHub, authenticate at GitHub, and authorize the Mind app. You are returned to Mind signed in.
  • Passkey — enter your email address and choose Continue with Passkey. If that address already has a passkey, your device asks for it — Touch ID, Windows Hello, a phone or a security key — and you are signed in. If it does not, Mind emails you a verification link; opening it brings you back, creates a passkey on your device, and signs you in with it.

How you launch the flow differs per surface:

  1. On the welcome screen, choose Continue with GitHub. Mind redirects to your default web browser to complete the sign-in process.
  2. Complete authentication in the browser and authorize the Mind app. You're returned to the IDE signed in.

Remote machine authentication (CLI)

When running Mind CLI on a remote machine (via SSH, SSM, containers, etc.), authentication works differently since the remote machine cannot open a browser.

Device flow

The CLI displays a URL and a one-time code that you enter in any browser — no port forwarding required. You approve the device in the browser, signed in with GitHub or your passkey.

  1. Run mind login on the remote machine.
  2. The CLI displays a URL and a one-time code.
  3. Open the URL in any browser (on your local machine, phone, or another device), signing in with GitHub or your passkey if you are not already.
  4. Enter the code and approve the device.
  5. The CLI notices the approval on its own and stores the key it is issued.

API key authentication (CLI)

For CI/CD pipelines and automation scripts, you can authenticate using an API key instead of interactive sign-in.

API key based authentication is only available on paid plans. If you are using a subscription managed by an administrator, your Mind admin needs to enable API key authentication first. See enterprise identity and access.

Generate an API key

  1. Sign in to app.mindcode.sh with your paid Mind account.
  2. Navigate to the API Keys section.
  3. Create a new API key and copy it. The full key value is only shown at creation time. Set a meaningful name to remember the context of the key.
Warning

API keys are long-lived credentials. Store them securely and rotate them according to your organisation's credential policy. If a key is compromised, revoke it immediately in the Mind web console.

Use the API key

Set the MIND_API_KEY environment variable and run Mind CLI in non-interactive mode:

export MIND_API_KEY=<your-api-key>
mind chat --no-interactive "your prompt here"

On Windows:

$env:MIND_API_KEY = "<your-api-key>"
mind chat --no-interactive "your prompt here"

API key authentication supports all Mind CLI features available in non-interactive mode. For interactive sessions, use browser-based sign-in instead. For CI/CD pipelines, automation scripts, and detailed headless usage, see Headless mode.

Authentication precedence

When multiple credentials are available, Mind CLI uses this precedence order:

  1. Active browser session (from mind login)
  2. MIND_API_KEY environment variable
  3. No credentials - CLI prompts you to sign in

To check which authentication method is active, run mind whoami. Credits consumed using the API key are decremented from your subscription credits.

Connect GitHub (Web)

Connect your GitHub account to give the agent access to your repositories:

  1. Go to Settings and select the Agent tab.
  2. Under GitHub, click Connect GitHub.
  3. Authorize the Mind Agent GitHub app.
  4. Select which repositories the agent can access.

You must have write permissions on repositories for the agent to create branches and open pull requests.

How repository access works:

Mind Web shows all repositories where both conditions are met:

  1. Your GitHub user has access to the repository.
  2. The Mind Agent GitHub app has been installed and authorized for that repository.

This means you see repositories from personal accounts, shared repositories, and organisations - as long as both your GitHub user and the Mind Agent app have access.

See the GitHub integration guide for detailed setup instructions.

Sign out

To sign out of Mind IDE, open the command palette (Cmd/Ctrl + Shift + P) and run Mind: Sign Out.

Troubleshooting

If you encounter problems during the authentication process, such as browser redirect failures or sign-in errors, check the troubleshooting guide for platform-specific solutions and common fixes.