CLI and library for JAX-oriented static checks, docstring quality, and optional HLO analysis
Project description
jaxlint
Static analysis and docstring quality tooling for JAX-heavy Python codebases.
Install
uv tool install jaxlint
# or from source
uv sync
uv run jaxlint --help
Optional HLO / export analysis:
uv sync --extra hlo
Documentation
Published builds (HTML, PDF, htmlzip per version):
- Read the Docs — import this repository using
.readthedocs.yml; the canonical URL assumes project slugjaxlint. Pull-request previews are HTML-only; PDF/htmlzip artifacts appear onlatest/tag/version builds (RTDformats). - Markdown sources: docs/index.md (notebook-free Sphinx + MyST stack, aligned with JAX’s docs toolchain at smaller scope).
CLI
jaxlint check [PATHS]...— performance sensors (AST) plus doc section and MathJax checks by defaultjaxlint doc [PATHS]...— doc sections + MathJax onlyjaxlint score [PATHS]...— rubric scores for docstrings (optional--jsonl,--baseline)jaxlint rules— list rule IDsjaxlint version— print package versionjaxlint init— print a starter[jaxlint]snippet forjaxlint.tomljaxlint hlo— hints for optionaljaxlint.hlo(requires--extra hlo)
Language server: install jaxlint[lsp], then run jaxlint-lsp or python -m jaxlint.lsp (stdio; diagnostics-only v1). See docs/lsp.md.
Testing
uv sync --all-groups --extra lsp --extra mcp --extra docs # add --extra hlo when touching JAX/HLO
uv run pytest -q --cov=jaxlint --cov-report=term-missing # mirrors CI `lint-test` (full suite + coverage)
uv run pytest -q -m mcp # MCP server + tool helpers only
uv run pytest -q -m lsp # Language server tests only
Markers include smoke, unit, integration, slow, lsp, mcp, and needs_jax. Optional jaxlint[mcp] installs the MCP SDK; run jaxlint-mcp or python -m jaxlint.mcp (stdio) for agent-facing tools: jaxlint_check, jaxlint_capabilities, jaxlint_rules, jaxlint_version. jaxlint_check defaults to the legacy behaviour (pretty-printed JSON array of diagnostics, or error: strings). Set structured=true for a jaxlint.mcp.v1 envelope (success, diagnostics, optional error, meta with elapsed_ms, paths_resolved, and requested jobs / cache_dir). Path mode can pass jobs and cache_dir through to run_checks (same semantics as jaxlint check -j / --cache-dir); these options are rejected for in-memory source checks. jaxlint_capabilities returns JSON describing the schema version, package version, and tool metadata. See docs/contributing.md for workflow details, coverage commands, and CI expectations.
Roadmap
The living plan (phased near / medium / long-term, plus what is already shipped) is docs/roadmap.md. Release notes: docs/changelog.md. Highlights: diagnostics-only LSP v1 ships as jaxlint[lsp] (see docs/lsp.md); MCP agent-grade v1 ships as jaxlint[mcp] (jaxlint-mcp, jaxlint_capabilities, structured jaxlint_check, pytest -m mcp). Shipped / near-term work includes SARIF and compact CLI output, autodoc API pages, deeper HLO tests — CI already runs a required needs_jax job (jax-hlo). jaxlint check supports -j / --jobs and an optional --cache-dir disk cache (see Roadmap).
Configuration
In jaxlint.toml (recommended standalone manifest), use the native [jaxlint] table. In pyproject.toml, use [tool.jaxlint] only.
jaxlint.toml:
[jaxlint]
select = ["JL", "JD", "JM"]
ignore = []
docstring-style = "numpy"
required-sections = ["Parameters", "Returns"]
strict-shapes = false
rubric-threshold = 0.75
[jaxlint.per-file-ignores]
"tests/**" = ["JL005"]
pyproject.toml (same keys under [tool.jaxlint]):
[tool.jaxlint]
select = ["JL", "JD", "JM"]
ignore = []
docstring-style = "numpy"
required-sections = ["Parameters", "Returns"]
strict-shapes = false
rubric-threshold = 0.75
[tool.jaxlint.per-file-ignores]
"tests/**" = ["JL005"]
See docs/rules.md for rule catalogue.
Library
jaxlint.core does not import JAX. Use jaxlint.hlo (extra hlo) for SemanticAnalyzer and GraphAuditSensor.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jaxlint-0.1.0a1.tar.gz.
File metadata
- Download URL: jaxlint-0.1.0a1.tar.gz
- Upload date:
- Size: 221.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2190ccfcb75f991c450726952ec02b870d17de7eabf30f02287ffe4f7a1ec7ca
|
|
| MD5 |
1cc386894cb8028304ebef357792a754
|
|
| BLAKE2b-256 |
9223b9f99ec1d956e43cacf17c3c029186af6fd1e163970bb3e1110251b3638e
|
Provenance
The following attestation bundles were made for jaxlint-0.1.0a1.tar.gz:
Publisher:
release.yml on maraxen/jaxlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jaxlint-0.1.0a1.tar.gz -
Subject digest:
2190ccfcb75f991c450726952ec02b870d17de7eabf30f02287ffe4f7a1ec7ca - Sigstore transparency entry: 1450444499
- Sigstore integration time:
-
Permalink:
maraxen/jaxlint@d10ee005e55639b5a54b97b35c26337be686688e -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/maraxen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d10ee005e55639b5a54b97b35c26337be686688e -
Trigger Event:
push
-
Statement type:
File details
Details for the file jaxlint-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: jaxlint-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 44.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6ddebd24f58524ce49c8ee49dff33fc20139267801f9032674ad61f81d55e0c
|
|
| MD5 |
c533398a82fcaf3b79ac045b7c26d460
|
|
| BLAKE2b-256 |
b878b950dcbbc31956c7fc238e4754792977bd435fc21ae37241c878eb58bc0f
|
Provenance
The following attestation bundles were made for jaxlint-0.1.0a1-py3-none-any.whl:
Publisher:
release.yml on maraxen/jaxlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jaxlint-0.1.0a1-py3-none-any.whl -
Subject digest:
d6ddebd24f58524ce49c8ee49dff33fc20139267801f9032674ad61f81d55e0c - Sigstore transparency entry: 1450444961
- Sigstore integration time:
-
Permalink:
maraxen/jaxlint@d10ee005e55639b5a54b97b35c26337be686688e -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/maraxen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d10ee005e55639b5a54b97b35c26337be686688e -
Trigger Event:
push
-
Statement type: