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.30.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.30.0
File Size Uploaded Provenance Actions
badness-0.30.0.tar.gz 1.3 MB With provenance Details for badness-0.30.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for badness 0.30.0
File Actions
badness-0.30.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for badness-0.30.0-py3-none-win_arm64.whl
badness-0.30.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for badness-0.30.0-py3-none-win_amd64.whl
badness-0.30.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for badness-0.30.0-py3-none-musllinux_1_2_x86_64.whl
badness-0.30.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for badness-0.30.0-py3-none-musllinux_1_2_aarch64.whl
badness-0.30.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.30.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
badness-0.30.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for badness-0.30.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
badness-0.30.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for badness-0.30.0-py3-none-macosx_11_0_arm64.whl
badness-0.30.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for badness-0.30.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 34.2 MB

Release files / badness-0.30.0.tar.gz

Download URL badness-0.30.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
adcb6e6b310429cdea1860e87259c6a77d1df23fe87931017d9617b3342ab2fb
BLAKE2b-256 checksum
How to use checksums
b5797bd3e21f42bb5b2fe8ac50f820018e1c16b6b568e58c75e6aa3460d01239
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 20, 2026.

Transparency log

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

Download URL badness-0.30.0-py3-none-win_arm64.whl
Size 4.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
60e0da8e53dba57f2b1986292d5598f278af1a6772679a087cf2afe0c2667ae2
BLAKE2b-256 checksum
How to use checksums
f16a0e558d090605ec2e97e4126da8cf74bcd814e1ce469f4ca0ce292fec0cfe
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 20, 2026.

Transparency log

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

Download URL badness-0.30.0-py3-none-win_amd64.whl
Size 4.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
86abb55d56532b5fabdf741c8c8ce8764642d0d2462873b6e44b8465a0b0f21d
BLAKE2b-256 checksum
How to use checksums
f584563eab6cfe155c982120074825cae6d766c94526554f9689dd7768794954
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 20, 2026.

Transparency log

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

Download URL badness-0.30.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
34d228be5dc24a33ee9687ee91336d173567017c38d27828beb2105e1f7a2dd1
BLAKE2b-256 checksum
How to use checksums
0643c6bda37da70d32a6387c01af8c01c448f400cf5d6804806190eeeb8c9b03
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 20, 2026.

Transparency log

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

Download URL badness-0.30.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
132b83e853b426897741d8862250176ee2bd5fc2bef907e7ad7a128adca1ff2a
BLAKE2b-256 checksum
How to use checksums
865ed122f279df175afb4e7c6db92e5d44feb26ee45c5bc8da230a5dd07a8e71
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 20, 2026.

Transparency log

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

Download URL badness-0.30.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
3c5ceefa45460f58934cab6c03328a7a88af33eb9858d9bbe59d4a77b9536e19
BLAKE2b-256 checksum
How to use checksums
971ebda9d907e5cc55cb3d5e611bf8fcf8b82015d69ea19e536fae9a30dcbe84
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 20, 2026.

Transparency log

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

Download URL badness-0.30.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 4.1 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
055227ffeb989fa009136bd3fe220c588be7d4a0188981bf9352c981e4e091ee
BLAKE2b-256 checksum
How to use checksums
08948187edb68639a29eb742a214ffca73628828b25ff6a0d22008a6680b5f64
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 20, 2026.

Transparency log

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

Download URL badness-0.30.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
f20c74d4ad52acec1ea31ecfa728c08d498b3ca7837410a1ccc79c5c18467da8
BLAKE2b-256 checksum
How to use checksums
5c3d41a71476a0c9ea0341f153bc1800441dd461c9ee0c5a550c9e26652e6679
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 20, 2026.

Transparency log

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

Download URL badness-0.30.0-py3-none-macosx_10_12_x86_64.whl
Size 4.1 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ae223028959473a4ff6f3950bcf992803e597ddb0265b46443d6f674c600fda0
BLAKE2b-256 checksum
How to use checksums
1b61bf0bc34d2d6669c6fea3ab5c80a1b0cfb076bb0ee06df35c0d050f68383e
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 20, 2026.

Transparency log

Security for badness 0.30.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.30.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 20, 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.30.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