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.24.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.24.0
File Size Uploaded
badness-0.24.0.tar.gz 1.3 MB Details

Built distributions (wheels)

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

Total release size: 32.2 MB

Release files / badness-0.24.0.tar.gz

Download URL badness-0.24.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
72f80ba7dfa78d3e0ab58085f11afb354d2e2fd993abd4820ba7da2e50c3f73e
BLAKE2b-256 checksum
How to use checksums
203c1b30dc199ef2cc3770c17fd3a81e0ae159a462ddb3bf47fd348cf05f5bba
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-win_arm64.whl
Size 3.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
3b2f55ae47f243cae73dfe5e937684b59711d7d473bc184324a5b68c65a9f38f
BLAKE2b-256 checksum
How to use checksums
8afabc25ab407976247e4d988344902438197005bd33ec90b682a12f1295c1ca
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-win_amd64.whl
Size 4.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c2ca2c0d6eadf2ec4860aaaa96ba1b06c5738a5c08525cc9a9a79b2bdc9951a4
BLAKE2b-256 checksum
How to use checksums
08ab1d21057670856b8d0cf2c6f0ac17b364a09703393fcfc4a0a8738e48fbf3
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.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
29554dc6825013861a8301dc5ff00fcbdf0237f7ffafe8648ee7b679c0cbd5df
BLAKE2b-256 checksum
How to use checksums
c30e774553a784807c77180fdb5dd1e91f33bad673d922d716b2f197290890e0
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-musllinux_1_2_aarch64.whl
Size 3.7 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
96d1e53dc6a2856365addfa3cb057256c18b6b2e103d5d2a996b2cf1cf10552a
BLAKE2b-256 checksum
How to use checksums
df8059c908a822cee257a16b37eb5b0cd9ee26fc730a3aa23d0b4941105b1b7a
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c147a292148279e7f49893370825c0968ff24bd8b0e016fa5a611181ecf7d83e
BLAKE2b-256 checksum
How to use checksums
c8c09de7630167e89e53ee4989ef0c16866d0a29e8a88928c23e76f0d28fa720
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
00a35da729f307bbee9325177e2daf1fb13cd6b419b1cbd734714a48c3a50257
BLAKE2b-256 checksum
How to use checksums
bc8be6789519d278d255516deca9a501f18a6d5f37919272aa5a8b40759bbc48
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-macosx_11_0_arm64.whl
Size 3.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
290ef09a9b6c04a444ef1ad6f442b05e92d409df5424c0de1d6556cba7631267
BLAKE2b-256 checksum
How to use checksums
e61febb1b7a8c5ecc725d7e426a40639c55f54351bb921176d1980cd72dff634
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 Sep 21, 2026.

Transparency log

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

Download URL badness-0.24.0-py3-none-macosx_10_12_x86_64.whl
Size 3.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
af4dd3651c43958295b4cdf6f8c4c9b93b4e520d7d06a38fe512910b2e66bcd0
BLAKE2b-256 checksum
How to use checksums
3972b4bbba517dd2274a5c82e39780071275f0fe7067895745d69a56cc9190fa
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 Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

0.25.0

9 release files

This release

0.24.0 This release

9 release files

0.22.1

9 release files

0.22.0

9 release files

0.21.0

9 release files

0.20.0

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