Trying to install Tailwind 4.0 full standalone CLI following their own documentation here:
I copy and paste the example for macOS arm64 as those apply to my hardware:
tailwindcss-macos-arm64 from v4.0.3 release - TailwindCSS Release - GitHubchmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 tailwindcss
So far so good. To get the config file I'm instructed to: ./tailwindcss init but I get:
Invalid command: init
What am I missing/doing wrong?
Trying to install Tailwind 4.0 full standalone CLI following their own documentation here:
I copy and paste the example for macOS arm64 as those apply to my hardware:
tailwindcss-macos-arm64 from v4.0.3 release - TailwindCSS Release - GitHubchmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 tailwindcss
So far so good. To get the config file I'm instructed to: ./tailwindcss init but I get:
Invalid command: init
What am I missing/doing wrong?
The article you are referring to was written in 2021. TailwindCSS v4 only debuted this January 2025, so the article's content is outdated and was written for v3. Follow the new documentation; here are some important changes for you.
init processIn v4, the installation process has changed. It's now simpler. The init command has become obsolete and is no longer usable from v4 onwards because it's not needed anymore.
init process not available - GitHubnpx tailwindcss to npx @tailwindcss/cliThe command to run is now no longer npx tailwindcss but npx @tailwindcss/cli.
PostCSS plugin and CLI are separate packages — the main
tailwindcsspackage doesn't include these anymore since not everyone needs them, instead they should be installed separately using@tailwindcss/postcssand@tailwindcss/cli.
Source: Open-sourcing our progress on Tailwind CSS v4.0 - Whats changed
This is basically only necessary if you're not using it with a framework and want to run it from the command line. For this, a standalone @tailwindcss/cli package will help from v4 onwards.
npm install tailwindcss @tailwindcss/cli
