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.2

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.2
File Size Uploaded
ax_assistant_release_staging-0.1.2.tar.gz 666.7 kB Details

Built distribution (wheel)

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

Total release size: 896.4 kB

Release files / ax_assistant_release_staging-0.1.2.tar.gz

Download URL ax_assistant_release_staging-0.1.2.tar.gz
Size 666.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e882662e06ea22c379d22f840b0aa1004647e8f06b3dfe4766d8e4ab623ff4c5
BLAKE2b-256 checksum
How to use checksums
f0933d0b5eb48c7cf0569826e2766983f198692da4f94d44aa8d07fe3ae0bcec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

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

Download URL ax_assistant_release_staging-0.1.2-py3-none-any.whl
Size 229.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
746d364b589dd3a0cdc6cc15ec3516a3da9ec76d56df53a5deb9b779692130bb
BLAKE2b-256 checksum
How to use checksums
217c77a0fc4769789d9e79a0e68d611019d73fa2b9eb9925ee93a703c45dcabf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

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