Skip to main content

Monoformat

Opinionated and "zero config" formatters like Ruff and Prettier are amazing in the sense that they remove any need for thinking about formatting. However, they still require you to:

  • Be used separately (one is Python and the other is Node)
  • Be configured for the language version and so forth

Monoformat does this automatically. You can only use the language version that monoformat allows and you can configure literally nothing except which files it's going to reformat and which it's not.

Installation

Monoformat is available on PyPI:

pip install monoformat

Usage

Monoformat is a command line tool. You can run it with:

monoformat .

This will reformat all files in the current directory and its subdirectories.

It will take care to avoid .git and other special directories. There is a default pattern embedded but you can change it with the --do-not-enter flag, which is a pattern matching folder or file names you don't want to consider.

On addition to the --do-not-enter rule, it will by default check all .gitignore files and .formatignore files (which use the .gitignore syntax but only affect the decision of whether to format a file or not, not to put them in git) and.

Default project

Let's say you have a Django project. It contains lots of files, including a node_modules somewhere and a a lot of big migration files.

You might want to have at the root of your repo a .gitignore file that looks like that:

node_modules
.idea
.vscode
.env
*.pyc

And then specifically to avoid formatting migrations (which can be super expensive), and to avoid running prettier on Django templates (which ends up badly) add a .formatignore file that looks like that:

**/migrations/*
**/templates/*

Then you can run monoformat . and it will only format the files that are relevant to your project.

Without install

I've actually spent an absurd amount of time to make it extremely simple to run Python and JS code without installing anything. You can do this with:

curl -s https://pypi.run/monoformat | python3 - .

Doing so will entirely reformat with Ruff, oxfmt and Prettier the current directory.

Supported languages

Monoformat supports the following languages:

  • Python (Ruff, both import sorting and Black-style formatting)
  • JavaScript (oxfmt)
  • TypeScript (oxfmt)
  • JSON (Prettier)
  • Markdown (Prettier)
  • YAML (Prettier)
  • HTML (Prettier)
  • CSS (Prettier)
  • SCSS (Prettier)
  • Less (Prettier)
  • Vue (Prettier)
  • Svelte (Prettier)
  • MJML (Prettier)
  • PHP (Prettier)

JavaScript and TypeScript run through oxfmt, which is Prettier-compatible in style but dramatically faster. Everything that runs through Prettier or oxfmt requires Node to be available. If you don't have a system-wide Node installation, you can get one bundled as a Python wheel:

pip install monoformat[node]

Metadata

Release files for monoformat 1.0.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 monoformat 1.0.0
File Size Uploaded
monoformat-1.0.0.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for monoformat 1.0.0
File Interpreter ABI Platform
monoformat-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.1 kB

Release files / monoformat-1.0.0.tar.gz

Download URL monoformat-1.0.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4c626df89ea787d759cd2d74af935f6b7e72582feb03569a8a0d0ae35c61968c
BLAKE2b-256 checksum
How to use checksums
694054c88a63c3cbfc99d16bd35be46df2b0ba098cd81aa360e4853a13e760c8
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 21, 2026.

Transparency log

Release files / monoformat-1.0.0-py3-none-any.whl

Download URL monoformat-1.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75da41c453e700c158d64f1143e2b1b12121759c50c483535518d6a26a19c4d1
BLAKE2b-256 checksum
How to use checksums
45f7e09d3c2eeacb9bcc00a6fc7b7ad9f2a0b012ace8b3647667f82fe1a83189
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 21, 2026.

Transparency log
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