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.

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

Built distributions (wheels)

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

Total release size: 33.8 MB

Release files / badness-0.27.0.tar.gz

Download URL badness-0.27.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a7ae3d4257a66425cb9fa0fd014a0fdbdda570f04915ec3de725c35920ef44f6
BLAKE2b-256 checksum
How to use checksums
40ee4e9b87ee96c9e503a83e6134effc43e584e42aa781b387b28567b9642231
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 Oct 8, 2026.

Transparency log

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

Download URL badness-0.27.0-py3-none-win_arm64.whl
Size 3.9 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
5f7f7b5e0c0d4ca20a47e7b0b4a2572bd2f80524f03d00f692fcefd0ebc2272a
BLAKE2b-256 checksum
How to use checksums
2fefafb1d397524fde86b324571f250f109e18aeba82a49b490abe7f72948266
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 Oct 8, 2026.

Transparency log

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

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

Transparency log

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

Download URL badness-0.27.0-py3-none-musllinux_1_2_x86_64.whl
Size 4.3 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b4e09b286084ed12c2bc8bc6227d453139d28dd8569f7de37f22516b4b534df8
BLAKE2b-256 checksum
How to use checksums
efc425e51e880ad0b55fffb0c3e670c8151f36cca26edb34a82ac303c6c133c5
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 Oct 8, 2026.

Transparency log

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

Download URL badness-0.27.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
4491c149ba4b4c2a09a3c26399aafb6c8d4d29e0eb66f8a6652add14f344067e
BLAKE2b-256 checksum
How to use checksums
f76c4bef787bccf5c204d41a9e54eb7803acb0fce38092b8b8012e8e2f676ece
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 Oct 8, 2026.

Transparency log

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

Download URL badness-0.27.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
94cd14547e1b47acdaa48ac0fd433dbfed773142e2a3d729b3953f7fcc6734f2
BLAKE2b-256 checksum
How to use checksums
765d769caac9d2ba124d4e409aac06e486834e4523d9d264f9c27cea0568d5a5
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 Oct 8, 2026.

Transparency log

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

Download URL badness-0.27.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.0 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0502d13e4e1e53b8b9aac6393e6f35125736ed5f8b5abd04a88959dd924757ff
BLAKE2b-256 checksum
How to use checksums
68ed43160ceedc8311fadcc954038601f04f3b6c07306e19026e43f68d792261
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 Oct 8, 2026.

Transparency log

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

Download URL badness-0.27.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
93fd7408bfe5cd49036046b4ec492abcd5ccdb374d21b5ea459981841aec7b9e
BLAKE2b-256 checksum
How to use checksums
c78ae9d58d3bbe88c7717aec1cfff427b4b4726bdab91d27be90d101008ce69c
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 Oct 8, 2026.

Transparency log

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

Download URL badness-0.27.0-py3-none-macosx_10_12_x86_64.whl
Size 4.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
88fe12e0aeccb0390c55ee5117a3cc7bf83bd8c0ae61b90e70b4aad4136a8074
BLAKE2b-256 checksum
How to use checksums
6464e4a5f163ec46029423b8406fd2fd95c4d44604849375ce31301c704f623e
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 Oct 8, 2026.

Transparency log

Security for badness 0.27.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.27.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 Oct 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.27.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