Launch Claude Code against alternative LLM routers
Project description
leitum
What is leitum?
leitum is a small CLI tool that launches Claude Code
against alternative LLM routers and providers (Requesty, OpenRouter, LiteLLM, local Ollama, etc.)
instead of the Anthropic API directly. It mirrors the ergonomics of ollama launch and omlx launch:
prepend leitum to your claude invocation and get your chosen provider and models configured automatically.
Install
# via uvx (no install needed)
uvx leitum --version
# via pip
pip install leitum
# via Homebrew (own tap)
brew tap <owner>/leitum
brew install leitum
Quickstart
# Initialize config directory and example providers file
leitum init
# Set your API key
export REQUESTY_API_KEY=your-key-here
# Launch Claude Code via Requesty
leitum claude
# Dry-run: see what would happen without launching
leitum --dry-run claude
Configuration
Config lives at ~/.config/leitum/api-providers.yaml (XDG). Example:
schema_version: 1
providers:
- name: requesty
base_url: https://router.requesty.ai
auth:
token: ${REQUESTY_API_KEY}
defaults:
start: anthropic/claude-sonnet-4-5
models:
- id: anthropic/claude-sonnet-4-5
roles: [sonnet, start]
- id: anthropic/claude-opus-4-5
roles: [opus]
- id: anthropic/claude-haiku-4-5
roles: [haiku]
See docs/configuration.md for the full schema reference.
Pin provider and models per repository with leitum.yaml (checked into version control):
schema_version: 1
provider: requesty
models:
start: anthropic/claude-sonnet-4-5
CLI Reference
leitum [OPTIONS] <subcommand> [ARGS...]
Global options (before the subcommand):
| Flag | Short | Effect |
|---|---|---|
--provider <name> |
-p |
Set provider |
--use-last-provider |
-P |
Reuse last provider |
--model <id> |
-m |
Set START model |
--use-last-model |
-M |
Reuse last START model |
--opus <id> |
-o |
Set OPUS model |
--sonnet <id> |
-s |
Set SONNET model |
--haiku <id> |
-k |
Set HAIKU model |
--refresh |
-r |
Refresh model cache |
--no-project-config |
Ignore leitum.yaml | |
--dry-run |
Print env + exec line, do not launch | |
--verbose |
-v |
Verbose logging on stderr |
Subcommands: claude, provider list/show/add/remove, refresh, doctor, init, completions.
See docs/commands.md for details.
Providers
Troubleshooting
Run leitum doctor for a full sanity check. See docs/troubleshooting.md.
Contributing
See CLAUDE.md and the PRDs in prd/ for the authoritative specification.
License
Apache 2.0 — see LICENSE.
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 leitum-0.1.1.tar.gz.
File metadata
- Download URL: leitum-0.1.1.tar.gz
- Upload date:
- Size: 96.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aad4604f11faad65211b770405085f340bd90732e7f6c39adf2ca5ec9ac8dcd2
|
|
| MD5 |
7970a720e77d280a296762fbab115464
|
|
| BLAKE2b-256 |
415d6907f7987924c7f3561676cd64d0f60ba529f4a28b9eb0ed6c3dd3c828b3
|
Provenance
The following attestation bundles were made for leitum-0.1.1.tar.gz:
Publisher:
release.yml on rgielen/leitum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leitum-0.1.1.tar.gz -
Subject digest:
aad4604f11faad65211b770405085f340bd90732e7f6c39adf2ca5ec9ac8dcd2 - Sigstore transparency entry: 1814218620
- Sigstore integration time:
-
Permalink:
rgielen/leitum@13c6160fcaf225d246f76df0ccd310ae4a432504 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rgielen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@13c6160fcaf225d246f76df0ccd310ae4a432504 -
Trigger Event:
push
-
Statement type:
File details
Details for the file leitum-0.1.1-py3-none-any.whl.
File metadata
- Download URL: leitum-0.1.1-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8c9b602b2dd683efb4deb393c90f06c91844f77384f6091dc08c74fb3325460
|
|
| MD5 |
595c4f81eea35b34cbdafe746dd09607
|
|
| BLAKE2b-256 |
120d0776d9900ee02b20b04a8a55c84994ef907f19ff8def6dd7c4530705e4a6
|
Provenance
The following attestation bundles were made for leitum-0.1.1-py3-none-any.whl:
Publisher:
release.yml on rgielen/leitum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leitum-0.1.1-py3-none-any.whl -
Subject digest:
b8c9b602b2dd683efb4deb393c90f06c91844f77384f6091dc08c74fb3325460 - Sigstore transparency entry: 1814218992
- Sigstore integration time:
-
Permalink:
rgielen/leitum@13c6160fcaf225d246f76df0ccd310ae4a432504 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rgielen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@13c6160fcaf225d246f76df0ccd310ae4a432504 -
Trigger Event:
push
-
Statement type: