A CLI tool for converting TailwindCSS to SCSS or plain CSS
MIT License
Tailwind Killer is a powerful CLI tool designed to remove Tailwind CSS from your project and migrate to regular CSS. It automates the process of converting Tailwind classes to standard CSS, making it easier to transition away from Tailwind or to refactor your existing codebase.
To install Tailwind Killer, build from source. The library will be published to NPM later, and this section will be updated.
pnpm i -g tailwind-killer
or
npm i -g tailwind-killer
To use Tailwind Killer, run the following command in your project directory:
tailwind-killer [options]
When useLLM
is set to true
, Tailwind Killer uses a Language Model to generate meaningful class names based on the Tailwind classes. This can result in more readable and maintainable CSS. The openaiApiUrl
option specifies the endpoint for the LLM service.
The lockfile (default: tailwind-killer-lockfile.json
) keeps track of processed files and their hash values. This ensures that only modified files are processed in subsequent runs, improving performance.
rootDir
: The starting point for file scanning. Set this to target a specific directory in your project.lockfilePath
: Location of the lockfile. Customize this if you want to store the lockfile in a different location.orderMatters
: Set to true
if the order of Tailwind classes is significant in your project.scannedFileTypes
: Add or remove file extensions to control which files are processed.maxLLMInvocations
: Limits the number of times the LLM is called, useful for controlling API usage.prefix
: Customize the prefix for generated class names to avoid conflicts with existing classes.openaiApiUrl
: Set this to your OpenAI API endpoint or a compatible service.excludedDirectories
: Add directories you want to skip during processing.useLLM
: Disable this if you prefer not to use LLM for class name generation.maxLLMInvocations
based on your API usage limits and project size.prefix
to align with your project's naming conventions.excludedDirectories
list as your project structure evolves.Contributions to Tailwind Killer are welcome! Please refer to the CONTRIBUTING.md file for guidelines on how to contribute to this project.
Tailwind Killer is released under the MIT License. See the LICENSE file for more details.
If you encounter any issues or have questions, please file an issue on the GitHub repository.