Skip to main content

Badness

Build and Test Crates.io Open VSX VS Code PyPI version npm version

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.

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.

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.28.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.28.0
File Size Uploaded Provenance Actions
badness-0.28.0.tar.gz 1.3 MB With provenance Details for badness-0.28.0.tar.gz

Built distributions (wheels)

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

Total release size: 33.9 MB

Release files / badness-0.28.0.tar.gz

Download URL badness-0.28.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
c19bd326d6247de58bd5f4ab93f6b81cbc77d493053ba197337d3d14a39f28ac
BLAKE2b-256 checksum
How to use checksums
70e876aa9fb2fbe6cccb8dcf8b0d8659f0efdc0d56135c39133c41c62388a299
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

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

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

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 Oct 18, 2026.

Transparency log

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

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

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 Oct 18, 2026.

Transparency log

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

Download URL badness-0.28.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
085ff74711dcd97e7462efcc0fc9716f31936d9da92b7136c7aaf228554de209
BLAKE2b-256 checksum
How to use checksums
3e8c679aa89dee6b8d5f99e066de47e1801a960847347e5264dc1119cc9ad1df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

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

Download URL badness-0.28.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
ec34eaf213f23d4fd606aa48447b1caad6e469099ea7e5df5689309fc99d0d7c
BLAKE2b-256 checksum
How to use checksums
e67e4a4358355ef29d6873a4c2c278fdc2968c7f7b7a7b947f34944b3bf63ed9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

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

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

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 Oct 18, 2026.

Transparency log

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

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

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 Oct 18, 2026.

Transparency log

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

Download URL badness-0.28.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
1bfdf3cce6fb3a62f12c7667666f0b400787fadbe5eca01122b984b4962a5f4b
BLAKE2b-256 checksum
How to use checksums
666f863859700a4698b29d5e0ea37f0e0fa3809757a1924857e1e9076d44c200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

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

Download URL badness-0.28.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
6b4d591dfa00a6fe64d15b6ab6a4884c2839e0e4ae7856a700a8f5e1c02be454
BLAKE2b-256 checksum
How to use checksums
7b29cc2677afee7d748597140b95af7e5018e46fd1dc7c0f978fef0683ee7b4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

Security for badness 0.28.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.28.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 Oct 18, 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.28.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