Skip to main content

Launch Claude Code against alternative LLM routers

Project description

leitum

PyPI version License

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


Download files

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

Source Distribution

leitum-0.1.0.tar.gz (95.9 kB view details)

Uploaded Source

Built Distribution

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

leitum-0.1.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file leitum-0.1.0.tar.gz.

File metadata

  • Download URL: leitum-0.1.0.tar.gz
  • Upload date:
  • Size: 95.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for leitum-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d652ab1f5961e7916e5ca30f056b42837be7890d298a979002afa051a8a3dd77
MD5 6a903294b2b6310b5dc7b705c413f64f
BLAKE2b-256 92b4f2b2d3aa1fed484a45b59b4363ad76c8d7b328a4259dd55da07089d40a4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for leitum-0.1.0.tar.gz:

Publisher: release.yml on rgielen/leitum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file leitum-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: leitum-0.1.0-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

Hashes for leitum-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e98336c424134674b804c7de4f114ec561ba894bd65e44c0f5fae6dc1c5bead
MD5 1e2d2c212688febea566456e874cca81
BLAKE2b-256 8024df685e89582a0a261c09768f08140cee97a725da6d0b2ca8e5653ed9ecca

See more details on using hashes here.

Provenance

The following attestation bundles were made for leitum-0.1.0-py3-none-any.whl:

Publisher: release.yml on rgielen/leitum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page