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
  • Aqua: aqua install jolars/badness
  • 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.

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
    # badness version
    rev: v0.11.0
    hooks:
      # Lint .tex, .sty, .cls, .dtx, .ins, and .bib files
      - id: badness-lint
      # Format the same files in place
      - id: badness-format

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

Documentation

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

Contributing

See CONTRIBUTING.md.

License

MIT

Metadata

Release files for badness 0.20.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.20.0
File Size Uploaded
badness-0.20.0.tar.gz 1.2 MB Details

Built distributions (wheels)

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

Total release size: 32.6 MB

Release files / badness-0.20.0.tar.gz

Download URL badness-0.20.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
fd31c6d37614ec11fab7e12422e96823d55268aa145aadbbcdfa952a25cc87ca
BLAKE2b-256 checksum
How to use checksums
adc55a8519a5a85e6bf2e8a9b7c32abf5b91a19173e746e7479f9e691e9acd35
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-win_arm64.whl
Size 3.8 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
6f57382d9811f7a18fd375487aa1132f15dfc4e69ced8f671df1ff8d3cb6b9e5
BLAKE2b-256 checksum
How to use checksums
806c145716ab326fb30f9b1a716f0498d729ddcb2ca23b45fa628e1b1fd9d9a0
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-win_amd64.whl
Size 4.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
38ce010fd5a9a81181a9c3f730fd61129b4b03ce9c7e9f24bd527aefdee18cb3
BLAKE2b-256 checksum
How to use checksums
a055e3c7f233ae8c1fdfc9f873f64a17cabe96bc5986ff05d7b8c9e48473ee47
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-musllinux_1_2_x86_64.whl
Size 4.2 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0f00c2a2331437297aa8e1c03f9211a3afbde9076bb5fa1aae0f9d2182ccf520
BLAKE2b-256 checksum
How to use checksums
8af45a26c896d30a54e9b374dc7e41da14268f19f535c221aa3723c54c18bd99
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-musllinux_1_2_aarch64.whl
Size 3.8 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
aba7f411b83343e9dc0e80904940489d4400ce3ae7d3b8b2283390b5c707bd6d
BLAKE2b-256 checksum
How to use checksums
009aa4d3014945d9454f9b4395e02091456075a8ce012bf52153e3fe65844a2a
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c6e61a35255ed1a10aba57a2b43a61e7a728645c61a71f0df5bff5c4844132f4
BLAKE2b-256 checksum
How to use checksums
2ba3a7d95ed3b704f8f164a5bf359675b3f829ac6521194b6b5e16aa4ae599d9
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.9 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c9e6264b0f65469de91ed2984fcb45952bb801fade6f81def5296125fd347f04
BLAKE2b-256 checksum
How to use checksums
6a7f20f911745668a7bc2824b1b28f471842935ea8b6545fd4a1502684df965e
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-macosx_11_0_arm64.whl
Size 3.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b2cdc82b8acea747b2a47bff8f019f2d432621cc38e96a37b18308d2acfa2c13
BLAKE2b-256 checksum
How to use checksums
8de401ea43e7d3bb2c8115ef42f8bd830fef98544adf17cbcd082f0cfc0823d2
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 Aug 26, 2026.

Transparency log

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

Download URL badness-0.20.0-py3-none-macosx_10_12_x86_64.whl
Size 3.9 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
08d5c26d961d8abfcf2f98516e162a8aa6c94042b6e2bf89bd5b413b0ab96050
BLAKE2b-256 checksum
How to use checksums
3d3a33a19e6c245698257c077090094eee1e3952b2c757b6a58d860f358efcc0
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 Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.25.0

9 release files

0.24.0

9 release files

0.22.1

9 release files

0.22.0

9 release files

0.21.0

9 release files

This release

0.20.0 This release

9 release files

0.19.0

9 release files

0.18.0

9 release files

0.17.0

9 release files

0.16.0

9 release files

0.12.0

9 release files

0.11.0

9 release files

0.10.0

9 release files

0.9.0

9 release files

0.8.0

9 release files

0.7.0

9 release files

0.6.0

9 release files

0.5.0

9 release files

0.4.0

9 release files

0.3.0

9 release files

0.2.0

9 release files

0.1.0

9 release files

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