Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Cutesy 🥰

A cute little HTML linter, until y̵ou ma̴k̵e i̴͌ͅt̴̖̀ a̵̤̤͕̰͐̅͘͘n̶̦̣͙̑̌̆̄ǵ̷̗̗̀͝r̷̭̈́͂͘ẙ̶͔̟̞̊̈…̴̢͘

Cutesy reformats & lints HTML documents, including HTML templates. It ensures consistent indentation, line breaks, and formatting while automatically fixing most issues.

First-class support for your favorite frameworks ❤️

  • Full support for Django templates 🐍💕
  • Sorts classes for TailwindCSS 💖✨
  • Works with AlpineJS and HTMX ⚡💘

Features ✨

  • Auto-fix: Automatically corrects most formatting issues
  • Configurable: Extensive configuration options for your project's needs
  • Fast: Rust core for high performance

Status

Build Status Coverage: 92% PyPI - Version

Table of Contents

🚀 Quick Start

Install:

pip install cutesy

Format your HTML files:

cutesy "*.html" --fix

For Django projects with TailwindCSS:

cutesy "templates/**/*.html" --fix --extras=[django,tailwind]

Installation

Cutesy requires Python 3.12+ and works on Linux, macOS, and Windows.

Basic Installation:

pip install cutesy

For system-wide CLI tool:

pipx install cutesy

Development Installation:

git clone https://github.com/chasefinch/cutesy.git
cd cutesy
pip install -e .

📚 Detailed guide: See Installation Documentation for editor integration, pre-commit hooks, and CI/CD setup.

Basic Usage

Command Line

Check files for issues:

cutesy "*.html"                    # Check all HTML files
cutesy "templates/**/*.html"       # Check recursively
cutesy --code '<div>test</div>'    # Check code string

Fix issues automatically:

cutesy "*.html" --fix              # Fix all issues
cutesy "*.html" --fix --quiet      # Fix quietly
cutesy "*.html" --return-zero      # Don't fail CI on issues

Key Options

Option Description Example
--fix Auto-fix issues (recommended) cutesy "*.html" --fix
--extras Enable template/framework support --extras=[django,tailwind]
--ignore Ignore specific rules --ignore=[F1,D5]
--quiet Suppress detailed output --quiet
--check-doctype Process non-HTML5 files --check-doctype

Configuration

Configuration Files

Create a cutesy.toml file in your project:

fix = true
extras = ["django", "tailwind"]
indentation_type = "spaces"
line_length = 99
ignore = ["F1"]  # Ignore specific rules

Also supports:

  • pyproject.toml (under [tool.cutesy])
  • setup.cfg (under [cutesy])

Common Configurations

Django + TailwindCSS:

fix = true
extras = ["django", "tailwind"]
line_length = 120
max_items_per_line = 6

📚 Complete guide: See Configuration Documentation for all options and examples.

Framework Support

Django Templates

Enable Django template processing:

cutesy "templates/*.html" --fix --extras=django

Supports:

  • {% %} template tags with proper indentation
  • {{ }} variables
  • Template inheritance ({% extends %}, {% block %})
  • Complex template logic with nested HTML

Example transformation:

<!-- Before -->
{% if user.is_authenticated %}
<div class="welcome">
        <h1>Welcome, {{ user.name }}!</h1>
{% endif %}

<!-- After -->
{% if user.is_authenticated %}
    <div class="welcome">
        <h1>Welcome, {{ user.name }}!</h1>
    </div>
{% endif %}

TailwindCSS

Automatic class sorting and organization:

cutesy "*.html" --fix --extras=tailwind

Features:

  • Smart sorting: Groups utility classes logically
  • Responsive prefixes: Maintains sm:, md:, lg: order
  • Pseudo-classes: Preserves hover:, focus:, etc.
  • Custom classes: Keeps your custom classes at the end

Example:

<!-- Before -->
<div class="text-red-500 p-4 bg-white hover:bg-gray-100 md:p-8 rounded-lg">

<!-- After -->
<div class="bg-white hover:bg-gray-100 p-4 md:p-8 rounded-lg text-red-500">

AlpineJS & HTMX

Cutesy works great with attribute-heavy frameworks:

  • Proper indentation for multi-line attributes
  • Whitespace normalization inside attributes
  • Consistent formatting across your components

Examples

Cutesy ensures that HTML documents contain consistent whitespace, follow best practices, and adhere to common conventions. In --fix mode, Cutesy turns this:

    <!doctype html>
<html>
                    <head>
        <title>Cutesy 🥰 demo</title>
    </head>
<body>
            <h1>Hi     there!</h1>


            {% if request.user.is_authenticated %}
                    <p>Cutesy is so happy      when your code is neat.</p>
                            {% endif %}



                <div     class='danger-zone'
                        id="lintTrap"   ></div    >
                    </body>
</html>

…into this:

<!doctype html>
<html>
<head>
    <title>Cutesy 🥰 demo</title>
</head>
<body>
    <h1>Hi there!</h1>

    {% if request.user.is_authenticated %}
        <p>Cutesy is so happy when your code is neat.</p>
    {% endif %}

    <div id="lintTrap" class="danger-zone"></div>
</body>
</html>

Real-World Usage

Django Project:

# Format all templates
cutesy "templates/**/*.html" --fix --extras=[django,tailwind]

# Check before committing
cutesy "templates/**/*.html" --quiet

Static Site:

# Format with custom config
cutesy "src/**/*.html" --fix --line-length=120

# Format specific files
cutesy "src/components/*.html" --fix --extras=tailwind

Documentation

Document Description
Installation Guide Complete installation instructions, editor integration, CI/CD setup
Configuration Guide All configuration options, file formats, project examples
Rules Reference Complete list of all rules with examples and fixes
Development Guide Contributing, testing, development setup, Rust extensions
Distribution Guide PyPI publishing, Homebrew formula, package management

When to Use Cutesy

Cutesy is great for:

  • Server-rendered HTML templates with Django, Jinja2, ERB, Liquid, and other template engines
  • Attribute-heavy patterns like AlpineJS and HTMX, with smart attribute reordering and formatting
  • Component frameworks like Svelte and Vue (.svelte, .vue files) with HTMLX-style syntax
  • Speed-focused static analysis for HTML — fast, with additional linting and best-practice checks beyond formatting
  • Pluggability — better hooks for custom attribute ordering, validation, and transformation
  • AI code validation — an all-in validation strategy to maximize code quality and catch errors, which agents can use to validate and update their own output

Not for

  • JSX / TSX files — Cutesy formats HTML templates, not JavaScript files.
  • Standalone JS / CSS files — Cutesy’s just for HTML, the templates that generate it, and the styles & scripts inside it. Use a CSS/JS toolchain for external files. Avoid JS or CSS “templates” which accept server instructions; Keep this in your HTML.

Why not Prettier, Stylelint & ESLint? Cutesy uses all three under the hood for formatting scripts & styles, and it will even respect your configuration for each. Cutesy provides access to these tools (as well as Typescript and automated testing) for server-rendered HTML templates, for <style> and <script> blocks inside of HTML documents, and for styles & scripts inside of HTML attributes.

Aside from that, Cutesy enforces an opinionated style for the HTML itself, along with any template-language tags, and it includes additional post-format analysis such as HTML & framework best practices. (Think image sizing, load order, template tag formatting, Tailwind theme setup, etc.)

Benefits

  • ✅ Validate AI code output - Catch inconsistencies in generated HTML
  • ✅ Enforce team standards - Consistent formatting across all developers
  • ✅ Catch errors early - Find malformed HTML and template syntax issues
  • ✅ Save time - No more manual formatting or style discussions
  • ✅ Better code reviews - Focus on logic, not formatting
  • ✅ Framework integration - Works with your existing tools and workflows

Badge

Show off how Cutesy keeps you in line.

code style: cutesy

[![code style: cutesy](https://img.shields.io/badge/code_style-cutesy_🥰-fd7f9c.svg?style=flat)](https://github.com/chasefinch/cutesy)

License

MIT License - see LICENSE file for details.

Contributing

We welcome contributions! Whether it's:

  • 🐛 Bug reports via GitHub Issues
  • 💡 Feature requests via GitHub Discussions
  • 🔧 Code contributions via Pull Requests
  • 📖 Documentation improvements

See our Development Guide for getting started.


Keep your HTML tidy with Cutesy! 🥰

or els̴͔e

Metadata

Release files for cutesy 1.0rc6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cutesy 1.0rc6
File Size Uploaded Provenance
cutesy-1.0rc6.tar.gz 115.0 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for cutesy 1.0rc6
File
cutesy-1.0rc6-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
cutesy-1.0rc6-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
cutesy-1.0rc6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
cutesy-1.0rc6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-32, Linux glibc 2.5+ x86-32 Details
cutesy-1.0rc6-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
cutesy-1.0rc6-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
cutesy-1.0rc6-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
cutesy-1.0rc6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
cutesy-1.0rc6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-32, Linux glibc 2.17+ x86-32 Details
cutesy-1.0rc6-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 7.3 MB

Release files / cutesy-1.0rc6.tar.gz

Download URL cutesy-1.0rc6.tar.gz
Size 115.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42ec46fef38cd80f3ce34e70c3bcb7eb28af556a15dc7d8d2a9bebf7af80a2c3
BLAKE2b-256 checksum
How to use checksums
31c2544b7e818d25bc3a9f58d2ef57c0be3d8c821200be89b7399b09c984a6f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp313-cp313-win_amd64.whl

Download URL cutesy-1.0rc6-cp313-cp313-win_amd64.whl
Size 523.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8cef810e13682c606e56a0a41cf066f61e4fdb4b61eaf36679b8a68e4f2843b4
BLAKE2b-256 checksum
How to use checksums
a4b9f129b3e2d914dc518a649c13cc2658ed9ae77c79bd393b0b51a63773762d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp313-cp313-win32.whl

Download URL cutesy-1.0rc6-cp313-cp313-win32.whl
Size 475.7 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
83890aca90187b805d8388458732230c9fc31e5c214dd8dab51184379b749587
BLAKE2b-256 checksum
How to use checksums
6cd36a9e08f3c92bccd4c1586159f542c899df867343ed80a775973393bb49c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cutesy-1.0rc6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 971.2 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c52904d0fd632b9032ffafd33b64921a8f02b5af45bb18d1d80f6a8e5815065e
BLAKE2b-256 checksum
How to use checksums
c234f6c33664ce1aadb6cd587b6b307468ae73400bdf0c9752bd45c2fb17e83d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL cutesy-1.0rc6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 1.0 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
6e2453a3ff7c453df82eec318e8d973a9642797b2ccfc4655116b7095a7322fa
BLAKE2b-256 checksum
How to use checksums
e21c3446b57e977d2802cff4ea11f6bfd3b26f294fcca34ec2db83b88df62f39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp313-cp313-macosx_11_0_arm64.whl

Download URL cutesy-1.0rc6-cp313-cp313-macosx_11_0_arm64.whl
Size 610.5 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1c8fb10e34a2d7fccd9f023fe6f306cc62175b8d1d073ee67c30ec66deee7edb
BLAKE2b-256 checksum
How to use checksums
8d15ccbc625164125e60e05ef03d932cfd24ab3f6caaf1598aaf3fc81ec82064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp312-cp312-win_amd64.whl

Download URL cutesy-1.0rc6-cp312-cp312-win_amd64.whl
Size 523.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4f6034ed5ff19332e7e83cec65dad1ccc66e196da6e11aaec22ddde16d25cde2
BLAKE2b-256 checksum
How to use checksums
36b0d9ff80f7813f3bd887f5a187577acc5ccb641d8bbb288811a0b5cd557a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp312-cp312-win32.whl

Download URL cutesy-1.0rc6-cp312-cp312-win32.whl
Size 476.4 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
16d0bd3cfe09ad137668be448655bed6b0db8d53051794114b36848c7dfc2f87
BLAKE2b-256 checksum
How to use checksums
3a158326320b946849e75887f41de3c9fdc36cbc13c8cd6d64bfd9d58accaf0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cutesy-1.0rc6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 978.6 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
39cea54d0829df0d88d268ec577ba04d543b712851f1c56f4640c61b86e83d23
BLAKE2b-256 checksum
How to use checksums
f16ba68ab67373e7e2c020a1f85456137832c2f16d2d8e0416ba41031a9391d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL cutesy-1.0rc6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 1.0 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
3c47f1d73f00812482cc8eb920a02da086a32dd4da0af065db20c701e6e922a1
BLAKE2b-256 checksum
How to use checksums
ab1681d54bcd5fd7111a2fa7f19f0983c6b4c5043c938b9d42513c422aa00a71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release files / cutesy-1.0rc6-cp312-cp312-macosx_11_0_arm64.whl

Download URL cutesy-1.0rc6-cp312-cp312-macosx_11_0_arm64.whl
Size 611.7 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
aeaa06c627b01bc5ab5de706286ba218e28fca24ff2fb2adc7046b32b2c57529
BLAKE2b-256 checksum
How to use checksums
a36b485058425b1467a321819023ae1a0712c5330e808ac83f6fca1c099dc430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Security for cutesy 1.0rc6

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 11 files in this release have been uploaded with provenance metadata.

Select from 11 files

Attestation for cutesy-1.0rc6.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 Apr 27, 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.

Release history Release notifications | RSS feed

This release
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