Skip to Content
SynapseX CLIAuthentication

Sign the CLI in to your SynapseX account

This page connects synapsex-code to your SynapseX account. At the end you will have a working model credential — so synapsex-code models lists models and synapsex-code run produces an answer — and, if you want Lab compute, a second credential for that.

Both logins work the same way: the CLI opens your browser, you approve a short code in an already signed-in session, and the CLI receives its own credential. You never paste a secret into your terminal, and nothing sensitive ends up in your shell history.

Sign in for AI models

synapsex-code providers login
  1. Choose SynapseX from the provider list.
  2. Enter your SynapseX account email.
  3. Your browser opens https://chat.synapsex.ai/activate with the code pre-filled. Approve it there.

Verify it landed:

synapsex-code providers list synapsex-code models

providers list prints the credential store path and how many credentials are stored. synapsex-code models now lists the SynapseX model ids you can pass to -m — they are printed with the synapsex/ prefix.

To skip the picker:

synapsex-code providers login --provider synapsex

Sign in for SynapseX Compute (Lab)

synapsex-code lab login

This runs the same browser approval, but mints a separate per-device compute token (prefix sxc_) stored under its own credential id. It is what every synapsex-code lab command that talks to the server uses.

You do not need this to use the free offline capabilities. lab run --sim and lab run --local never contact the server and never touch a credential.

Why are there two credentials?

They unlock different things and are stored separately, so revoking one device’s compute access does not sign you out of models everywhere.

CredentialCreated byWhat it unlocks
synapsexsynapsex-code providers loginSynapseX AI models for the terminal agent and run
synapsex-computesynapsex-code lab loginSynapseX Compute / Lab commands

The compute token is the only secret the CLI holds for Lab work. It is per-device and revocable.

Where are the credentials stored?

~/.local/share/synapsexCode/auth.json

The file is written with mode 0600 (readable only by you). Running synapsex-code providers list prints the exact path on your machine, so you do not have to guess it on Windows or under a custom XDG layout.

More on paths and configuration: CLI configuration.

Sign out

synapsex-code providers logout # choose which credential to remove synapsex-code providers logout synapsex # remove a specific one

Sign in without a browser (CI and headless machines)

Set SYNAPSEX_API_KEY in the environment. The SynapseX provider loads straight from it, with no providers login step:

export SYNAPSEX_API_KEY=YOUR_SYNAPSEX_API_KEY synapsex-code models

This is the right approach for CI runners and containers, where opening a browser is not possible. See CLI configuration for the full environment variable list.

Only SynapseX providers are accepted

providers login offers exactly two options: SynapseX and SynapseX Compute. Third-party provider ids are rejected:

synapsex-code providers login --provider anthropic
Error: Unknown provider "anthropic"

The same applies to --provider openai and any other third-party id. Do not plan on connecting a third-party model key through this command.

Next step

Code with the SynapseX terminal agent.