Skip to main content

Axiomatic Lean Search

Semantic search over Lean 4 declarations — Mathlib, core, Batteries, and your own Lean projects. Ask in plain English and get matching declarations, ranked by meaning rather than name. Ships a Python CLI and JSON-RPC sidecar plus a VS Code extension.

Install

VS Code (recommended): install the extension from the Marketplace and open a Lean project. On first activation it sets up everything it needs — including its own Python — with no manual steps.

CLI only:

uv tool install ax-assistant-release-staging

Quickstart

Queries embed your text with qwen3-embedding-8b via OpenRouter, so an API key is required. Export OPENROUTER_API_KEY, or put it in a .env.secrets file in your project root (the current directory, the --folder target, and a user-global config file are checked in that order; shell environment always wins). Results are reranked with Qwen3-Reranker-8B when SILICONFLOW_API_KEY is also set; without it, queries fall back to vector-ranked results.

cd my-lean-project
ax-search-lean fetch                                  # download prebuilt search databases
ax-search-lean status                                 # what's installed, and any updates
ax-search-lean query "self-adjoint operator is symmetric"

Search databases are SQLite files with sqlite-vec vector indexes, either downloaded prebuilt or built locally from a Lean project (ax-search-lean index).

Layout

Path What
src/ax_assistant_public/ Python package: CLI (ax-search-lean), JSON-RPC sidecar (ax-search-lean-sidecar), indexing and query engine
extensions/ax-search-lean/ VS Code extension — search sidebar, backed by the sidecar

Names

The PyPI distribution is ax-assistant-release-staging (provisional; see TODO-packaging.md), the module is ax_assistant_public, the commands are ax-search-lean and ax-search-lean-sidecar, and the extension settings are axSearchLean.*. The module, command, and setting names are stable surface — renaming them would break imports, configs, and keybindings.

Development

uv sync                                # Python deps + editable install
pnpm install                           # extension deps

uv run pytest                          # Python tests
uv run ruff check .                    # lint
pnpm --filter ax-assistant-release-staging run test  # extension tests

To run the extension from source, open this repo in VS Code and launch "Run Search Extension (isolated)" (F5). It loads only this extension and resolves the sidecar from the repo .venv, so an installed release can't shadow your working copy.

Regenerate the TypeScript protocol bindings after changing src/ax_assistant_public/protocol.py:

pnpm --filter ax-assistant-release-staging run protocol:codegen

CI asserts the generated file is up to date.

License

AGPL-3.0-only. See LICENSE.

Metadata

Release files for ax-assistant-release-staging 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ax-assistant-release-staging 0.1.3
File Size Uploaded
ax_assistant_release_staging-0.1.3.tar.gz 688.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ax-assistant-release-staging 0.1.3
File Interpreter ABI Platform
ax_assistant_release_staging-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 927.3 kB

Release files / ax_assistant_release_staging-0.1.3.tar.gz

Download URL ax_assistant_release_staging-0.1.3.tar.gz
Size 688.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c4facc430919b17094c9fc14c8cd3f8b23b1e194ea0a6f44f46556c7a94d8b43
BLAKE2b-256 checksum
How to use checksums
2265111765953d6a6a31deab558f18a8bb7bfc38996b794546cfce080faf3fcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ax_assistant_release_staging-0.1.3-py3-none-any.whl

Download URL ax_assistant_release_staging-0.1.3-py3-none-any.whl
Size 238.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e108ed4e4576faf432aaa7f0df98ff7ee1ab116e64bae7ecd72548a3706437b
BLAKE2b-256 checksum
How to use checksums
e1263c1d67a8b9354caa17479daeb6f77ecbdd0318e9ea359e1078e9634bce8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page