RTPA (Ready Tailwind Project Assistant) is a command-line tool designed to simplify the creation of new web projects with Tailwind CSS already setup. It supports setting up both simple HTML/CSS projects, modern Vite.js based projects such as vanilla Js and Angular based project, with automatic Tailwind CSS integration while offering the option to automatically publish it directly to your github.
-
Fast Project Creation: Launch a new :
-
Simple HTML/CSS project.
-
Modern project with Vite (Vanilla JS).
-
Project with the Angular framework.
-
-
Tailwind CSS Integration: Automatically configures Tailwind CSS v4 for your project adapted on your choosen type.
-
Automatic configuration of a linter and a formatter (ESLint and Prettier), ensuring code quality and consistency from the start.
-
Command Line Arguments: Specify project type and name directly from the command line.
-
Git Initialization: Automatically initializes a local Git repository.
-
GitHub Integration (Optional): Initializes a GitHub repository and pushes your code (requires a GitHub PAT).
To use RTPA, you need Node.js and npm (or Yarn/pnpm) installed on your machine.
Using npm : you can install it globally:
npm install -g rtpayarn global add rtpapnpm install -g rtpaYou can use RTPA in several ways:
- interactive mode Run the command without any arguments to choose the project type and name via interactive prompts:
rtpa- Direct project creation
Use the
--jsor--angularflags to directly specify the project type. You can also provide the project name immediately after the flag.
- Create a simple html/css project:
rtpa --simple project-name- Create a Vite Vanilla Js project:
rtpa --js project-name- Create an Angular project
rtpa --angular project-nameif project-name is omitted, the tool will prompt you for it.
Exemple rtpa --js my-vite-app
If you prefer not to install the tool globally, you can use npx to run it directly. This will download and execute the tool without installing it permanently on your system.
To use npx, simply prepend npx to the command:
npx rtpaThe interactive shell will then guide you through the project creation process. You can also use the command-line arguments with npx:
npx rtpa --simple [project-name]npx rtpa --js [project-name]npx rtpa --angular [project-name]After your project is created, the tool will ask if you want to integrate a linter and a formatter. If you choose to, it will automatically install ESLint and Prettier and set up their basic configuration files (.eslintrc.js and .prettierrc.json). This ensures code consistency and helps catch errors early in the development process.
When prompted by the tool, you can choose to link your project to a new GitHub repository. You will need to provide a GitHub Personal Access Token (PAT) with repo permission for the tool to create and push the repository on your behalf.
-
clic here personal token settings.
-
clic on "Generate new token".
-
Choose token(classic)
-
give an explicit name to the token (
ex: cli-tailwind-tool). -
give
repopermission by checking the repo option. -
Clic on "Generate token" and copy and paste your token somewhere accessible because you'll not see it again (save it wisely in a personal file).
Once your project is created, follow the instructions displayed in your terminal.
- Navigate to your project folder: cd [project-name]
- Launch the Tailwind CSS compiler in watch mode: npm run start
- Open your index.html file in a web browser to see your live changes.
- Navigate to your project folder: cd [project-name]
- Launch the Vite development server: npm run dev
- Open your browser to the local address indicated by Vite (usually http://localhost:5173/).
Contributions are welcome! Feel free to open issues or submit pull requests.
your token is not saved in the code or send somewhere, in order to keep your github account secure.
coded with love by @likeur