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 Mistral, so an API key is required. Export MISTRAL_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).

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

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.0
File Size Uploaded
ax_assistant_release_staging-0.1.0.tar.gz 482.6 kB Details

Built distribution (wheel)

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

Total release size: 621.7 kB

Release files / ax_assistant_release_staging-0.1.0.tar.gz

Download URL ax_assistant_release_staging-0.1.0.tar.gz
Size 482.6 kB
Tags Source
SHA-256 checksum
How to use checksums
20367a61a9599c3290a2e755583b75a1b3bb6526de30c0cd3bcbbcb207b9ffe1
BLAKE2b-256 checksum
How to use checksums
532fe150fa2e9c457cfab60205f9849e9032d0341e6663f304dde1b7a29ec20a
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.0-py3-none-any.whl

Download URL ax_assistant_release_staging-0.1.0-py3-none-any.whl
Size 139.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0816a2709197198f8ed723e021c0e50c8376d1564831372ec474417fbae2bcb
BLAKE2b-256 checksum
How to use checksums
b6b660d8c136ffa367679d4b220439eb0e951fa492bad90b05c566e158d95168
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

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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