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

Installation Scripts

If you prefer a one-liner installer that picks the right binary for your platform, you can use the installer scripts below.

For macOS and Linux:

curl --proto '=https' --tlsv1.2 -LsSf \
    https://github.com/jolars/badness/releases/latest/download/badness-installer.sh | sh

For Windows PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://github.com/jolars/badness/releases/latest/download/badness-installer.ps1 | iex"

The VS Code/Open VSX extension bundles the badness binary and starts the language server automatically when you open a .tex file.

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.18.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.18.0
File Size Uploaded
badness-0.18.0.tar.gz 1.2 MB Details

Built distributions (wheels)

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

Total release size: 32.0 MB

Release files / badness-0.18.0.tar.gz

Download URL badness-0.18.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
b86e2323c21f753de4d524781821c72d0ec88b092f2c82df05d11e4104cb5d99
BLAKE2b-256 checksum
How to use checksums
d9c473c9748977d217e31559536db9f7714ef1c916080f1a3b64787ae14e4cf2
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 24, 2026.

Transparency log

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

Download URL badness-0.18.0-py3-none-win_arm64.whl
Size 3.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
ef1fb5b209cbb7898e2e357cd66bb358b48f154d133058653b9820529e7b1deb
BLAKE2b-256 checksum
How to use checksums
9a1b16126e6dca846a06f18678613e7b9d858d68095cf6d8d8eb17e5366e2828
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 24, 2026.

Transparency log

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

Download URL badness-0.18.0-py3-none-win_amd64.whl
Size 3.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ca2a967c13ef7780e2f91daf5f5c442edada048770bbd9d287777d0f5a82646e
BLAKE2b-256 checksum
How to use checksums
b190407f1189ba5fa9166b123c4f0785be274bc6c8d35cab47ce78096f5544c4
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 24, 2026.

Transparency log

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

Download URL badness-0.18.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
95568a9c3e6f420216faef5d242599714836f2868bcd3a830a89b3d472687d90
BLAKE2b-256 checksum
How to use checksums
33051bd033ffd451170ffa0a57b5c4b15493626423836bd7cdbf441ea9e44d6c
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 24, 2026.

Transparency log

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

Download URL badness-0.18.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
d85fa029b1f2c2fe7deb3fafa8cdd5d9934e7e569a52d8f54027ce255fa1d5e5
BLAKE2b-256 checksum
How to use checksums
fa5dfa4fb8dd45b7517d7646d0b3bb7b6ff6cfc625cc5f93707470e6be21d8a0
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 24, 2026.

Transparency log

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

Download URL badness-0.18.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
cc76e63caa2e4eab5d31df1a246969960d87382a736875f5c2cffd00244b330b
BLAKE2b-256 checksum
How to use checksums
d16013f6587861b43504878323b77691e9bfd65bf354d4f71652f3f226902b7a
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 24, 2026.

Transparency log

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

Download URL badness-0.18.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
902313ac8bc8f6a1abe6706a06695e43d90c5124afa00a6f865d7f6494ec7b1f
BLAKE2b-256 checksum
How to use checksums
b58595cc610596cbdeb635c7154e30b0da980035ddbd5fcdc6c3468be9e5feeb
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 24, 2026.

Transparency log

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

Download URL badness-0.18.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
88e65bff0e5eeae089c45d1524a81a1d8817be83529f3972d75d7b431f879b4d
BLAKE2b-256 checksum
How to use checksums
5b5746556ab67b1a6697cd198f51e24bfc01a62a241f557d7a041843a9056b99
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 24, 2026.

Transparency log

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

Download URL badness-0.18.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
e3902b5e354b5a4f6119ad838418cae1a4df62fc226bd4702ec57e4fdb8eadce
BLAKE2b-256 checksum
How to use checksums
334398cf0f7be9ca888a9588ae7c665fe69ccf9d698274e16d4b656f328720aa
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 24, 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

0.20.0

9 release files

0.19.0

9 release files

This release

0.18.0 This release

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