Standalone CLI: Use Tailwind CSS v4 without Node.js

Zoltán Rózsa

Tailwind CSS is written in JavaScript and distributed as an npm package, which means you've always had to have Node.js and npm installed to use it.

This has made it harder to integrate into projects where using npm isn't always common, and with tools like Rails and Phoenix both moving away from npm by default, we needed to find a way for people to use Tailwind in these projects without forcing them to adopt an entirely separate ecosystem of tooling.

Since 2021, you can use Tailwind CSS without requiring Node.js or npm via the standalone CLI build. We're now updating the documentation related to that announcement for v4.


Get started

To install it, grab the executable for your platform from the latest release on GitHub, making sure to give it executable permissions:

# Example for macOS arm64
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64
chmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 tailwindcss

At the top of your main CSS file (e.g., input.css), add the Tailwind CSS imports as you can see in the Tailwind CLI installation steps:

@import "tailwindcss";

Now you can use it just like our npm-distributed CLI tool:

# Start a watcher
./tailwindcss -i input.css -o output.css --watch
# Compile and minify your CSS for production
./tailwindcss -i input.css -o output.css --minify

We've even bundled the latest versions of all of our first-party plugins, so if you want to use them in your project, just @plugin them in your input.css file like you would in a Node-based project:

@plugin "@tailwindcss/forms";
@plugin "@tailwindcss/typography";

Note: Starting from Tailwind CSS v4, the init process has been removed, and there is no need for a tailwind.config.js file. For configuration, follow our CSS-first configuration guide.

You get all the power of our standard npm-distributed CLI in a convenient, portable package — no dependencies required.


Which CLI should I use?

If you are already using npm in your project, use the npm-distributed version of our CLI that we've always provided. It's simpler to update, the file size is smaller, and you're already in the ecosystem anyways — there's no benefit at all to using the standalone build.

If on the other hand 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.

Get all of our updates directly to your inbox.
Sign up for our newsletter.

Copyright © 2025 Tailwind Labs Inc.·Trademark Policy