Skip to main content

Subshell + MLX LLM-calling backends (Claude/Codex CLI, local MLX) shared across tools.

Project description

spawnllm

PyPI Python Docs License: MIT

Subshell + MLX LLM-calling backends (Claude/Codex CLI, local MLX) shared across tools.

spawnllm centralizes the LLM-calling plumbing that small tools keep re-inventing: driving the claude and codex CLIs as subshells — with structured Pydantic output, model tiers, and faithful error capture — and running local Apple-Silicon MLX models with adapter fusion, prompt-cache reuse, and batched generation. Depend on it once and each tool keeps only its domain logic instead of its own copy of the backends.

Install

No install needed — run everything through uvx:

uvx spawnllm --help

uvx fetches spawnllm into a throwaway environment and runs it. To add it to a project instead:

uv add spawnllm

For the local MLX engine (Apple Silicon only), pull the extra:

uv add "spawnllm[mlx]"

Quickstart

List the backends spawnllm can drive:

uvx spawnllm backends
claude
codex
mlx

What problems does this solve?

  • Duplicate subshell plumbing. Building claude/codex argv, piping stdin/stdout, teeing stderr, and turning non-zero exits into useful errors — written once, not re-derived per tool.
  • Structured-output boilerplate. A Pydantic model becomes a JSON-schema constraint and a parsed, validated result the same way for every backend.
  • Local MLX is fiddly. Adapter fusion, prompt-cache reuse, worker-thread lifecycle, and batched single-token generation live behind one engine instead of in every consumer.
  • Behavior drift. Two tools that call the same models stay byte-for-byte consistent because they share the backend layer rather than each maintaining a copy.

Docs

Read the docs for the full guide and API reference.

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

spawnllm-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

spawnllm-0.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spawnllm-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for spawnllm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0be332429021ce2781249e1cfc4b319e642f5c089aa79f5f3e54c8f89c000f10
MD5 94beb4a25ac6cb79f99c6ad902f0161e
BLAKE2b-256 3abfc321136d823a02abfd1764834f0517bd4d4e3ea4bfbaaae61f9ee52c5608

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spawnllm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for spawnllm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b668b63efe80d3eb4c9a333d14e18ded9cbe7f8ebf60c64b78f811d30c9b6c7
MD5 38500e3e1f23e9bdc6549b42fa9e9295
BLAKE2b-256 3ff93c9593a14ab8543935abf180b119978ada08b1f7d1d83eed244ac135e029

See more details on using hashes here.

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