Skip to main content

llmux

Scriptable LLM multiplexer — unified interface to Claude and OpenAI via subscription OAuth (no API keys needed).

Getting tokens

Claude

llmux reuses the token from an existing Claude Code (CLI) session.

  1. Install Claude Code: npm install -g @anthropic-ai/claude-code
  2. Log in: claude login
  3. Done — llmux reads ~/.claude/.credentials.json automatically.

Or set the env var manually:

export CLAUDE_OAUTH_TOKEN=your_token_here

The token is at .claudeAiOauth.accessToken inside ~/.claude/.credentials.json.


OpenAI (Codex)

llmux reuses the token from an existing Codex CLI session.

  1. Install Codex: npm install -g @openai/codex
  2. Log in: codex login
  3. Done — llmux reads ~/.codex/auth.json automatically.

Or set env vars manually:

export CODEX_OAUTH_TOKEN=your_access_token
export CODEX_ACCOUNT_ID=your_account_id

Both values are in ~/.codex/auth.json under .tokens.access_token and .tokens.account_id.


Google (Antigravity CLI)

llmux reuses the token from an existing Antigravity CLI (agy) session.

  1. Install: curl -fsSL https://antigravity.google/cli/install.sh | bash
  2. Log in: agy (follows OAuth flow on first run)
  3. Done — llmux reads ~/.gemini/antigravity-cli/antigravity-oauth-token automatically.

Or set the env var manually:

export AGY_OAUTH_TOKEN=your_access_token_here

The access token is at .token.access_token inside ~/.gemini/antigravity-cli/antigravity-oauth-token. Token expires after 1 hour — re-run agy to refresh.


Quick start

from llmux import Agent, Claude, GPT, Gemini

# Claude (default)
agent = Agent(Claude.sonnet46)
print(agent("Hello!"))

# OpenAI
agent = Agent(GPT.gpt55)
print(agent("Hello!"))

# Gemini (via Antigravity CLI)
agent = Agent(Gemini.flash25)
print(agent("Hello!"))

# Streaming
with Agent(Claude.sonnet46) as agent:
    for chunk in agent.stream("Tell me a joke"):
        print(chunk, end="", flush=True)

Install

pip install llmux

From git:

pip install git+ssh://git@gitlab.com/grisus/llmux-sdk.git

Locally (development):

pip install -e ".[dev]"   # editable + pytest
pip install -e .           # runtime only

Run tests

pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmux_sdk-0.1.11.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llmux_sdk-0.1.11-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file llmux_sdk-0.1.11.tar.gz.

File metadata

  • Download URL: llmux_sdk-0.1.11.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for llmux_sdk-0.1.11.tar.gz
Algorithm Hash digest
SHA256 9af4d256b3d28c9baa8fe043a0b3fa132aa0eafe2665630aad4cfd5fcd6a1ad7
MD5 9d7f0414ea1e392602ccef18c0e96968
BLAKE2b-256 ec5f9cf1b7b331868da12652d29a084c63e7baa7e3b3b8064d4ed4743409ddba

See more details on using hashes here.

File details

Details for the file llmux_sdk-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: llmux_sdk-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for llmux_sdk-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 2abd53db3dcfcd83c6ae6908ec796190a64b150ec5e84a96b43fa4ca860a6c53
MD5 9b1aac5acf27836bf6890b228a58f94b
BLAKE2b-256 e5ae2e405d3fa7feb69a4a36fd8726b3baf5bdb4679b23213a99760c9cbcaff3

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.13

2 files

0.1.12

2 files

This release

0.1.11 This release

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.5

2 files

0.1.4

2 files

0.1.2

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page