Scriptable LLM multiplexer — unified interface to Claude and OpenAI via subscription OAuth
Project description
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.
- Install Claude Code:
npm install -g @anthropic-ai/claude-code - Log in:
claude login - Done — llmux reads
~/.claude/.credentials.jsonautomatically.
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.
- Install Codex:
npm install -g @openai/codex - Log in:
codex login - Done — llmux reads
~/.codex/auth.jsonautomatically.
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.
- Install:
curl -fsSL https://antigravity.google/cli/install.sh | bash - Log in:
agy(follows OAuth flow on first run) - Done — llmux reads
~/.gemini/antigravity-cli/antigravity-oauth-tokenautomatically.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llmux_sdk-0.1.4.tar.gz.
File metadata
- Download URL: llmux_sdk-0.1.4.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da16438a513adde29393eb3bf9b4c333416e8b69a0d54160304c7a9f1ac81e06
|
|
| MD5 |
eacbbf37a71563f803cef8ac157a1a0a
|
|
| BLAKE2b-256 |
ef8171f9ea0034365c7e7abc8c588166870694fc4de6091772e7f0616780fd8e
|
File details
Details for the file llmux_sdk-0.1.4-py3-none-any.whl.
File metadata
- Download URL: llmux_sdk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba1ec3459171fb70d261cc4147581845f743a5c4169835879b8646c7faec3faa
|
|
| MD5 |
2f5df377635959a7d484e66b8316126a
|
|
| BLAKE2b-256 |
f20ac444f0a155a4ff14d5a9edf19c9fb6b2c16e6d1ae724feaf237e4a81abbe
|