Skip to main content

Badness

CI Crates.io Open VSX VS Code PyPi npm DOI

Badness is a language server, formatter, and linter for LaTeX. It is designed to be fast, robust, and memory efficient. It bundles three tools in one:

  • Formatter (badness format): opinionated, deterministic, and rule-based layout.
  • Linter (badness lint): syntax errors and best practices.
  • Language server (badness lsp): both of the above, plus information on hovering, symbol outlines, go-to-definitions, code actions, and much more.

The architecture is modeled after rust-analyzer, relying on a incremental parser that forms a full concrete syntax tree of the document, and then using that tree to provide formatting, linting, and language server features. It is designed to used both inside your editor and on the command line, and is fast enough to provide real-time analysis after every keystroke and formatting on save, even for large documents and complex projects.

The audience for Badness is both authors who write LaTeX documents (.tex and .bib files) and developers who write LaTeX packages (.sty, .cls, .dtx, and .ins files), and provides support both for the newer LaTeX3 programming layer and the older LaTeX2e layer.

Installation

Badness is available from several sources:

  • crates.io: cargo install badness
  • Homebrew: brew install jolars/tap/badness
  • npm: npm install -g badness (bundles a prebuilt binary)
  • PyPI: uv tool install badness/pipx install badness
  • mise/Aqua: see the installation guide
  • Prebuilt binaries: from the releases page
  • VS Code/Open VSX: the Badness extension (also works in Positron and Cursor)
  • NixOS: the badness package on Nixpkgs
  • From source: cargo install --path . in a checkout

Install Script

The installer scripts pick the right release artifact for your platform and install to a user-local directory by default. They download the matching Badness CLI release asset and verify its checksum. If you prefer, download and inspect the script before running it.

For macOS and Linux:

curl --proto '=https' --tlsv1.2 -sSf https://badness.dev/install | sh

For Windows PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://badness.dev/install.ps1 | iex"

The VS Code/Open VSX extension bundles the badness binary and starts the language server automatically when you open a supported LaTeX or BibTeX file: .tex, .sty, .cls, .dtx, .ins, or .bib.

Usage

# Format a file in place (or `badness format -` for stdin → stdout)
badness format paper.tex

# Verify formatting without writing, showing diffs
badness format --check bibliography.bib

# Lint, reporting parse diagnostics
badness lint paper.tex

# Fix lint issues in place
badness lint --fix paper.tex

Formatting is configurable via a TOML file named badness.toml. See the documentation for the full reference.

Editor Integration

The language server runs over stdio (badness lsp); see the editor setup guide for instructions on how to integrate with your editor.

For Neovim, Badness is included in nvim-lspconfig and Mason. See the Neovim setup guide.

Badness is also available in Zed. See the Zed setup guide.

Pre-Commit Hook

badness-pre-commit provides pre-commit hooks for linting and formatting. It installs a prebuilt binary wheel from PyPI, so no Rust toolchain or LaTeX distribution is required:

repos:
  - repo: https://github.com/jolars/badness-pre-commit
    rev: v0.26.0
    hooks:
      - id: badness-lint
      - id: badness-format

See the pre-commit guide for installation, optional fixes, and updates.

GitHub Actions

badness-action installs badness and runs format and lint checks in CI:

jobs:
  badness:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: jolars/badness-action@v1

See the integration guide for a complete workflow, dprint setup, and using Badness inside Panache code blocks.

Documentation

See https://badness.dev/ for the full documentation, including a user guide, reference, and developer guide.

Citation

If you use Badness in your research, please cite the release you used. Select that release in the Zenodo archive and export its citation. To cite Badness generally, use the concept DOI 10.5281/zenodo.20664708.

Machine-readable metadata is available in CITATION.cff.

Contributing

See CONTRIBUTING.md.

Funding

I am grateful for the financial support offered by the TeX Users Group through the TeX Development Fund.

License

MIT

Metadata

Release files for badness 0.29.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 badness 0.29.0
File Size Uploaded Provenance Actions
badness-0.29.0.tar.gz 1.3 MB With provenance Details for badness-0.29.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for badness 0.29.0
File Actions
badness-0.29.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for badness-0.29.0-py3-none-win_arm64.whl
badness-0.29.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for badness-0.29.0-py3-none-win_amd64.whl
badness-0.29.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for badness-0.29.0-py3-none-musllinux_1_2_x86_64.whl
badness-0.29.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for badness-0.29.0-py3-none-musllinux_1_2_aarch64.whl
badness-0.29.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for badness-0.29.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
badness-0.29.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for badness-0.29.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
badness-0.29.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for badness-0.29.0-py3-none-macosx_11_0_arm64.whl
badness-0.29.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for badness-0.29.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 33.9 MB

Release files / badness-0.29.0.tar.gz

Download URL badness-0.29.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
3fd084a75e5acd1aaf9cb53f4f9e9f51e7e460911c5d910dfae10b08190604f5
BLAKE2b-256 checksum
How to use checksums
0d7faf02b0f7d4e87f6ea71fa68e73fdef1c899980fe66a85d27d20f33dc113b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-win_arm64.whl

Download URL badness-0.29.0-py3-none-win_arm64.whl
Size 4.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
e5a5336fba2b7ee84aa12ab8c50eb65d20a33cb601664ac26b70e510d9231ae5
BLAKE2b-256 checksum
How to use checksums
64b3d7b23b985bbbd85cfb4eefbfe29b90cb93dcfdce4512a160c1b421e232cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-win_amd64.whl

Download URL badness-0.29.0-py3-none-win_amd64.whl
Size 4.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
49a9960d953bfcaf14f053f898332f12d421172c7048c0dcc2a5477a28e6ea4c
BLAKE2b-256 checksum
How to use checksums
5f039ecbec8d4f18e57f7f43a7cfc03ecc1ffeb26bbe255042e1b337ff4e080f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-musllinux_1_2_x86_64.whl

Download URL badness-0.29.0-py3-none-musllinux_1_2_x86_64.whl
Size 4.4 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c880cdd5cd08f9f9aa52edbbba9612fb7e7a7a47479b1680293d858e975cc82d
BLAKE2b-256 checksum
How to use checksums
18fc5e8e1df7d21a45fa2e1d5a4f1668e2e0799fed0eb724e9de2b681b507c02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-musllinux_1_2_aarch64.whl

Download URL badness-0.29.0-py3-none-musllinux_1_2_aarch64.whl
Size 3.9 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
296a491104d5d925536c7650630b9a9463fedbb55077fb366d75fa5c8587e956
BLAKE2b-256 checksum
How to use checksums
bf431ad88bdd04223143ecdeb9bbc568fc0a732b01f7e5423d894f640ccfc6eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL badness-0.29.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c0d13522a76013b4cd65655246373146155a35f54dd3bf8cacfac04ec8e981b5
BLAKE2b-256 checksum
How to use checksums
dbf60652e6e3c2759999fddd55a05f5b582aac500507df34f6fbad303952e2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL badness-0.29.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 4.0 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
513cb78c3b0a8d722195363c970e3292cc2f3c4bea3262c352241d12ebda4018
BLAKE2b-256 checksum
How to use checksums
8b3f7b2c11cf4bd7518a25f6e46b5e98d302d05fdfd46890bb1b52cf030b532f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-macosx_11_0_arm64.whl

Download URL badness-0.29.0-py3-none-macosx_11_0_arm64.whl
Size 3.8 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3f5d714b3db7a4215326f4458db1d9c63476e3ab3521f18c0e2c4b7794c441c0
BLAKE2b-256 checksum
How to use checksums
6249fa9ef7b64692271f469f3e84cca9512243edf5046e11fbf6d9ce67260d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / badness-0.29.0-py3-none-macosx_10_12_x86_64.whl

Download URL badness-0.29.0-py3-none-macosx_10_12_x86_64.whl
Size 4.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6a2050ec1c4464c01f859fed05078a8b58303ff0d29bf735905be62bc282498a
BLAKE2b-256 checksum
How to use checksums
a2c61ee8ce97b4f2872a3973c47aea623a9d14d0993201fce835faf485f4dc4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for badness 0.29.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for badness-0.29.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.29.0 This release

9 release files Full provenance

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