Skip to main content

Standalone Tailwind CSS CLI, installable via pip

Use Tailwind CSS without Node.js — install it via pip.

Why

Tailwind CSS is notoriously dependent on Node.js. If you're a Python developer, this dependency may not be welcome in your team, your Docker container, or your inner circle.

The Tailwind CSS team recently announced a new standalone CLI build that gives you the full power of Tailwind CLI in a self-contained executable — no Node.js or npm required.

However, installing the standalone CLI isn't as easy as running npm install.

That's why I created this package to make it as simple as running the pip install command. Now you can install the standalone Tailwind CLI via pip by running:

pip install pytailwindcss

Now you can run tailwindcss in your terminal:

tailwindcss -i input.css -o output.css --minify

Voilà!

Get started

  1. Install pytailwindcss via pip:

    pip install pytailwindcss
    
  2. [Recommended] Preinstall the tailwindcss binary:

    tailwindcss_install
    

    By default, the latest binary version will be downloaded. To pin to a specific Tailwind CSS version, set the TAILWINDCSS_VERSION environment variable before running the command:

    # In a Dockerfile
    ENV TAILWINDCSS_VERSION=v4.1.16
    RUN tailwindcss_install
    
    # On Linux/macOS
    export TAILWINDCSS_VERSION=v4.1.16
    tailwindcss_install
    
    # On Windows (cmd)
    set TAILWINDCSS_VERSION=v4.1.16
    tailwindcss_install
    
    # On Windows (PowerShell)
    $env:TAILWINDCSS_VERSION="v4.1.16"
    tailwindcss_install
    

    To see a list of available Tailwind CSS releases, visit: https://github.com/tailwindlabs/tailwindcss/releases

    If you skip this step, the binary will be downloaded automatically on the first run of the tailwindcss command.

  3. The tailwindcss command should now be available in your terminal. Try running it:

    tailwindcss
    

    You should see the help output for the tailwindcss command. If you skipped step 2, the binary will be downloaded automatically on this first run. Use tailwindcss to create a new project or work with an existing Tailwind CSS project.

  4. Create a new Tailwind CSS project by navigating to your project directory and initializing it:

    tailwindcss init
    

    This command creates the default tailwind.config.js file.

  5. Start a watcher to compile CSS automatically during development:

    tailwindcss -i input.css -o output.css --watch
    
  6. Compile and minify your CSS for production:

    tailwindcss -i input.css -o output.css --minify
    

That's it! For more information on using Tailwind CSS and its CLI, refer to the official Tailwind CSS documentation.

Caveats

While this approach simplifies your setup, there are some trade-offs. Without Node.js, you won't be able to install third-party plugins or additional dependencies for your Tailwind CSS setup. However, this might not be a dealbreaker for most use cases.

You can still customize Tailwind CSS via the tailwind.config.js file, and the standalone build includes all official Tailwind CSS plugins: @tailwindcss/aspect-ratio, @tailwindcss/forms, @tailwindcss/line-clamp, and @tailwindcss/typography. This covers approximately 90% of typical Tailwind CSS usage scenarios.

Here's what the Tailwind CSS team says about the standalone build:

If you're working on a project where you don't otherwise need Node.js or npm, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.

Bugs and Suggestions

Found a bug or have a suggestion? Please use the issue tracker on GitHub:

https://github.com/timonweb/pytailwindcss/issues

2021 - 2025 (c) Tim Kamanin — A Full-Stack Django and Wagtail Developer

Release files for pytailwindcss 0.3.1

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

Source distribution (sdist)

Source distribution for pytailwindcss 0.3.1
File Size Uploaded
pytailwindcss-0.3.1.tar.gz 18.7 kB Details

Built distribution (wheel)

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

Total release size:26.2 kB

Release files / pytailwindcss-0.3.1.tar.gz

Download URL pytailwindcss-0.3.1.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e83c65985f078ff91500f74bca595f615e54059d5afc90b233382e118b509b4d
BLAKE2b-256 checksum
How to use checksums
278a5ba4a60c6a2f235c9ad93a5e9f29d202ad9e8038e8ea293be31057085cee
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 Jun 12, 2026.

Transparency log

Release files / pytailwindcss-0.3.1-py3-none-any.whl

Download URL pytailwindcss-0.3.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31583c5bb7fac66c6e6535992e51630e36788cf6e569f4d294e98962fa034535
BLAKE2b-256 checksum
How to use checksums
959b362cd1ae308a2fd8a9a58ff089cefd2e49976540765afa4e9a2c013876af
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 Jun 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 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