explaingit

scvxzf1/xai-sso-to-credentials

Analysis updated 2026-05-18

11PythonAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A command line tool that converts xAI SSO cookies or access tokens into standardized credential JSON files, one per account.

Mindmap

mindmap
  root((repo))
    What it does
      Convert SSO cookies
      Convert access tokens
      Output credential files
    Tech stack
      Python
      curl_cffi
    Use cases
      Batch conversion
      Concurrent processing
      Retry on failure
    Audience
      Developers
      xAI account holders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Convert a batch of xAI SSO cookies into ready-to-use credential files in one run.

USE CASE 2

Reformat existing xAI access tokens into the JSON structure other tools expect.

USE CASE 3

Process many accounts at once with adjustable concurrency and automatic retries on failure.

What is it built with?

Python

How does it compare?

scvxzf1/xai-sso-to-credentials2arons/llm-cliabe238/claude-video-plus
Stars111111
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Authenticated mode needs the curl_cffi Python package installed.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This is a small command line tool for converting xAI account credentials into a specific JSON file format. If you have an SSO cookie from xAI, or you already hold an OAuth access token, this script turns either one into a xai-*.json credential file that other tools expecting that format can use. There are two modes. In authenticated mode, you provide an SSO cookie and the script runs a real device flow login against xAI to produce a valid credential file. In the second mode, you already have an access token or a JSON credential, and the script just reformats it without contacting xAI again. The tool ships with an interactive terminal interface called tui.sh that walks you through picking a mode, pasting your input, setting how many conversions run at once, choosing retry attempts and the wait time between them, and picking an output folder. There is also a plain command line script, sso_to_auth_json.py, for people who prefer to call it directly with flags for concurrency, retry count, and retry interval. Input can be a single value or a text file with one entry per line, in a few accepted formats including a raw token, an email and password pair followed by a token, or a numbered list. Each processed account produces its own output file named after the account's email or subject identifier. The README requires the curl_cffi Python package for the authenticated mode, since local parsing alone is enough for the no-auth mode. It also warns plainly that SSO cookies, tokens, and the generated credential files are sensitive and should never be committed to a public repository, and notes that the project's own gitignore already excludes common input and output files. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me run this tool's TUI to convert a list of xAI SSO cookies into credential files.
Prompt 2
Show me the command line flags for running sso_to_auth_json.py directly with 10 workers.
Prompt 3
Explain the difference between auth mode and noauth mode in this script.
Prompt 4
What input formats does this tool accept for the SSO cookie list?

Frequently asked questions

What is xai-sso-to-credentials?

A command line tool that converts xAI SSO cookies or access tokens into standardized credential JSON files, one per account.

What language is xai-sso-to-credentials written in?

Mainly Python. The stack also includes Python.

What license does xai-sso-to-credentials use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is xai-sso-to-credentials to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is xai-sso-to-credentials for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.