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

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

Built distributions (wheels)

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

Total release size: 33.9 MB

Release files / badness-0.29.1.tar.gz

Download URL badness-0.29.1.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
168b93a96942c898254722c83c20a6bd5622912a6401332fb0cd6fb850d21668
BLAKE2b-256 checksum
How to use checksums
3433e128ade3e7804654ae694ebdfffb9fed9cdff2868860237e318715ee7fa8
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-py3-none-win_arm64.whl
Size 4.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
6ccd0cb73fd9e2b842cd8a3f21e90be427643a7f8b805d35726831ec637bebbb
BLAKE2b-256 checksum
How to use checksums
f5d42f445b9f799658dcf99c811c0fd1dd65759a20a8d361682934a296535946
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-py3-none-win_amd64.whl
Size 4.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
fdc66aa5666635f617682bb0ac679b3e16c76c1f361e239f23225cfd74380980
BLAKE2b-256 checksum
How to use checksums
4a9c397e85a1f59b12c2074425b92b7d12eaa10c87710c2ed77d88c81d96c7eb
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-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
8ff740cf2ad66b96885bbb35baee200d5cc1a5ef2d331aa6428e6738ecfc0105
BLAKE2b-256 checksum
How to use checksums
635c9e1e17da2d5b6e4809055e9773a5e7fb2d5f0b29bb38369d4f8bad084afa
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-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
9638295c67ec76d0c0cb7ac86267022261869c9335d703d23996e79110a4e372
BLAKE2b-256 checksum
How to use checksums
a3282cd283c3453713c110add8543cae8c4f7333f187fe167e8f8fcaaa9c1762
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-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
25add538686beadaceb86a8b592c8109a33c82b8967cf334492c6808bb0c6ab0
BLAKE2b-256 checksum
How to use checksums
de9d520415fef76e818f3acb127f2066c90ba6009b081c9900e66f6bfa2f1dd9
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-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
4e05c066835a2be04aae40697f4a1ec783bd6528ea1c5509a0982ace2043c37d
BLAKE2b-256 checksum
How to use checksums
ef12396716c0d21fd525ffa6a9ec656d3d6dce99e38d793e163fe890223ac4b4
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-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
967463813f88d60966414afa615a4361daec96c3cf4e059230c31e27bdd9f6a2
BLAKE2b-256 checksum
How to use checksums
e8026b8546f1632b94dfb0ceef1da58628f8e2345cff9227a556459d35a9e089
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 8, 2026.

Transparency log

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

Download URL badness-0.29.1-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
7fbb5c961e7d8f1f03d5fc486c112b1f5d6dde50b598b13a970e2fb8f7867d8b
BLAKE2b-256 checksum
How to use checksums
ca4c12537e84244373ee030327bc7ac9b85fac654a329534973235332c3ca27a
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 8, 2026.

Transparency log

Security for badness 0.29.1

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.1.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 8, 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.1 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