LeanClient is a Python library for interacting with the Lean theorem prover language server. It provides a client interface to the Lean 4 server, enabling automated theorem proving, project manipulation, and environment queries. Current version is 0.10.0, with a monthly release cadence.
pip install leanclientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize LeanClient, connect to a Lean server (specify Lean version or path to lake), and evaluate a simple expression.
Always provide `lean_version` (e.g., 'v4.7.0') or `lake_path` pointing to a valid lake binary.
Replace `LeanClient().connect()` with `LeanClient(...)`.
Ensure your Lean project is version 4. Use `lean --version` to check.
Set `LAKE_PATH` to the directory containing the `lake` executable, or install Lean via elan (which adds lake to PATH).