@codeweavrs/cli
v1.0.0
Published
An CLI tool to generate and manage CodeWeavers projects.
Readme
CodeWeavers CLI
A command-line interface tool for scaffolding and managing React projects with pre-built modules. This CLI helps you quickly bootstrap new projects and add modular components to existing ones.
Features
- 🚀 Quick Project Initialization - Create new projects from a pre-configured template
- 📦 Module System - Add pre-built modules (components, routes, and server logic) to your project
- 🔧 Dependency Management - Automatically tracks and suggests required dependencies
- 💡 Interactive Prompts - User-friendly interface with confirmation prompts
- 🎨 Beautiful Output - Colored terminal output with progress indicators
Installation
Install the CLI globally using pnpm:
pnpm install -g codeweavers-cliOr use it directly with npx:
npx codeweavers-cliCommands
init - Create a New Project
Create a new project based on the default template:
codeweavers-cli init [project-name]Examples:
# Create project in current directory
codeweavers-cli init
# Create project in a new directory
codeweavers-cli init my-awesome-appWhat it includes:
- React + TypeScript setup
- Vite configuration
- TanStack Router for routing
- Authentication setup
- UI components with Tailwind CSS
- tRPC for type-safe APIs
- Database setup with Drizzle ORM
- Docker configuration
add - Add Modules
Add one or more pre-built modules to your existing project:
codeweavers-cli add <module1> [module2] [module3] ...Examples:
# Add a single module
codeweavers-cli add overview
# Add multiple modules
codeweavers-cli add users agenda financeAvailable Modules
| Module | Description | Key Features |
|--------|-------------|--------------|
| overview | Dashboard overview with analytics | Admin/User views, charts, statistics |
| users | User management system | CRUD operations, scheduling, technical info |
| agenda | Appointment scheduling | Calendar, booking forms, doctor selection |
| finance | Financial management | Analytics, reports, transactions, metrics |
| payment | Payment processing | Payment forms, patient lists, billing |
| profile | User profile management | Settings, privacy, schedule configuration |
Project Structure
The CLI works with projects that follow this structure:
your-project/
├── src/
│ ├── components/
│ │ └── ui/ # Reusable UI components
│ ├── routes/ # Page routes and components
│ │ ├── overview/
│ │ ├── users/
│ │ ├── agenda/
│ │ └── ...
│ └── server/
│ └── routers/ # tRPC router definitions
├── package.json
└── ...Requirements
- Node.js 18+
- pnpm (recommended) or npm
- A React/TypeScript project (for adding modules)
Development
To contribute to this CLI:
- Clone the repository:
git clone https://github.com/flaviohsprado/codeweavers-cli.git
cd codeweavers-cli- Install dependencies:
pnpm install- Build the project:
pnpm build- Run in development mode:
pnpm devDependencies
The CLI uses the following key dependencies:
- Commander.js - Command-line interface framework
- Inquirer.js - Interactive command line prompts
- Chalk - Terminal string styling
- Ora - Terminal spinners
- fs-extra - Enhanced file system utilities
Template Stack
The default template includes:
- Frontend: React 18, TypeScript, Vite
- Routing: TanStack Router
- Styling: Tailwind CSS
- UI Components: Custom component library
- State Management: TanStack Query
- API: tRPC for type-safe APIs
- Database: Drizzle ORM
- Authentication: Custom auth system
- Development: Biome for linting/formatting
Module System
Each module contains:
- Components: React components and UI elements
- Routes: Page-level components with routing
- Server Logic: tRPC routers and API endpoints
- Dependencies: Required npm packages
- Types: TypeScript definitions
Modules are self-contained and can be added independently, though some may have overlapping dependencies.
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-module - Add your changes
- Commit your changes:
git commit -am 'Add new module' - Push to the branch:
git push origin feature/new-module - Submit a pull request
License
This project is licensed under the ISC License.
Support
If you encounter any issues or have questions:
- Check the existing issues
- Create a new issue if needed
- Provide details about your environment and the problem
Built with ❤️ for the CodeWeavers community.
