$npx skillfedfor your agent

leanclient

Interact with the Lean theorem prover language server

With conditionsPyPI Software DevelopmentReleased Jul 20262.4M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — leanclient-0.13.0-py3-none-any.whl
v0.13.0 · released 2026-07-28 · Python >=3.10 · 3 runtime deps: orjson, psutil, tqdm

Yes, if you need programmatic access to Lean 4 from Python and have a working Lean project environment. The package is permissively licensed, has low install friction, and is actively maintained. However, it is very new (first release January 2025), so expect potential API changes and incomplete feature coverage; the Windows support caveat and experimental status of some features warrant caution in production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a working Lean 4 project with lakefile.toml in the specified PROJECT_PATH; Lean 4 and lake must be installed and accessible on the system.
  • Low install friction with a pure Python wheel and only three runtime dependencies (orjson, psutil, tqdm).
  • Repository is active with recent commits and no archived status, though the project is very new (first release January 2025).

License · maintenance · safety

MIT (permissive) — MIT licensed under permissive terms, allowing free use, modification, and distribution with minimal restrictions.

last release 2026-07-28 (17 days) · last repo commit 2026-07-28 · 46 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,392,189 downloads/mo, #3,088 on PyPI

Verify before relying

pip install leanclient

import leanclient as lc

PROJECT_PATH = "path/to/your/lean/project/root/"
client = lc.LeanLSPClient(PROJECT_PATH)
diagnostics = client.get_diagnostics("MyProject/Basic.lean")
print(f"Found {len(diagnostics)} diagnostics")
  • Whether Lean 4 and a working Lean project setup are required prerequisites beyond Python 3.10.
  • Performance characteristics on Windows, given the documentation mentions 'Better Windows support' as a potential future feature.
  • Stability of experimental features like interactive diagnostics and widgets.
Same gist for agents: .md · .json

What it is and what it does

leanclient is a thin Python wrapper around the Lean 4 language server, enabling programmatic interaction with Lean files and projects. It exposes LSP operations like querying diagnostics, retrieving document symbols (theorems, definitions), getting hover information, updating file content in memory, and exploring module hierarchies through dependency graphs. The package is designed for batch processing and automation tasks where you need to interact with Lean code from Python without building a full IDE.

The package depends on orjson for JSON serialization, psutil for system monitoring, and tqdm for progress indication. It requires Python 3.10 or later and expects a Lean project with a lakefile.toml to be present. Most operations are implemented, though call hierarchy is noted as unreliable and some workspace-level operations remain unimplemented.

Use it for

  • Batch-process multiple Lean files to extract diagnostics, symbols, or type information for analysis or documentation generation.
  • Automate theorem proving workflows by programmatically querying goals, hover info, and code actions within a Lean project.
  • Build tooling that inspects module dependencies and reverse-dependency graphs to understand Lean library structure.
  • Integrate Lean verification into Python-based research or testing pipelines that need to check Lean code correctness.
  • Develop IDE-like features or editor plugins that delegate Lean interactions to a subprocess via this client.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need programmatic access to Lean 4 from Python and have a working Lean project environment.

The package is permissively licensed, has low install friction, and is actively maintained. However, it is very new (first release January 2025), so expect potential API changes and incomplete feature coverage; the Windows support caveat and experimental status of some features warrant caution in production use.

Install

leanclient on PyPI

Before you install

Low install friction with a pure Python wheel and only three runtime dependencies (orjson, psutil, tqdm). Repository is active with recent commits and no archived status, though the project is very new (first release January 2025).

Requires a working Lean 4 project with lakefile.toml in the specified PROJECT_PATH; Lean 4 and lake must be installed and accessible on the system.

License in practice

MIT licensed under permissive terms, allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install leanclient

import leanclient as lc

PROJECT_PATH = "path/to/your/lean/project/root/"
client = lc.LeanLSPClient(PROJECT_PATH)
diagnostics = client.get_diagnostics("MyProject/Basic.lean")
print(f"Found {len(diagnostics)} diagnostics")

Verify before relying

  • Whether Lean 4 and a working Lean project setup are required prerequisites beyond Python 3.10.
  • Performance characteristics on Windows, given the documentation mentions 'Better Windows support' as a potential future feature.
  • Stability of experimental features like interactive diagnostics and widgets.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
orjsonpsutiltqdm
MaintenanceActively maintained 17 days since the last release
Last repo commit
First released
Downloads2,392,189 / month, #3,088 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: leanclient-0.13.0-py3-none-any.whl

Tags

Capabilities
lean 4 language server pythonlean theorem prover interactionlsp client leanlean file diagnosticslean document symbolslean hover informationlean module hierarchy
Topics
lean-theorem-proverlanguage-server-protocolformal-verification

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “lean 4 language server python”

  • leanclientInteract with a Lean 4 language server running in a subprocess via…
  • lean-lsp-mcpProvides an MCP server that exposes the Lean theorem prover to LLM…
  • quantconnect-stubsProvides type stubs for QuantConnect's Lean algorithmic trading…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also lean-lsp-mcp · lsprotocol · python-language-server · jupyterlab-lsp · jedi-language-server · jupyter-lsp · ruff-lsp · python-lsp-server · quantconnect-stubs · quipclient