UNPKG

codizium-cli

Version:

A CLI tool to scaffold Laravel and Node-based modules with ease.

170 lines (114 loc) โ€ข 3.9 kB
# Codizium CLI ____ _ _ _ / ___| ___ __| | (_) ____ (_) _ _ _ __ ___ | | / _ \ / _` | | | |_ / | | | | | | | '_ ` _ \ | |___ | (_) | | (_| | | | / / | | | |_| | | | | | | | \____| \___/ \__,_| |_| /___| |_| \__,_| |_| |_| |_| Codizium CLI Toolkit <!-- ![Codizium Banner](https://raw.githubusercontent.com/ralphxp/codizium-cli/main/assets/banner.png) --> > A powerful CLI tool to scaffold Laravel, Node.js, or Next.js module structures effortlessly. --- ## โœจ Features - ๐Ÿ”ง Generate Laravel modules with full structure - โš™๏ธ Scaffold classes like Controllers, Models, Enums, Services, Requests, etc. - ๐ŸŽฏ Supports modular and non-modular workspaces - ๐Ÿ“‚ Directory-aware logic for intelligent file placement - ๐Ÿง  Designed for developer speed and productivity --- ## ๐Ÿ“ฆ Installation Install globally via [NPM](https://www.npmjs.com/package/codizium-cli): ```bash npm install -g codizium-cli ``` --- ## ๐Ÿš€ Usage ### 1. Generate a Laravel Module ```bash codizium-cli laravel -t module -n blog ``` ```bash codizium-cli nextjs -t module -n blog ``` ```bash codizium-cli nodejs -t module -n blog ``` ### 2. Generate a Controller Inside a Module ```bash cd blog codizium-cli generate:[laravel|nodejs|nextjs] -t controller -n PostController ``` ### 3. Generate a Model Outside Module (standalone) ```bash codizium-cli generate:[laravel|nodejs|nextjs] -t model -n User --path ./src ``` ### 4. All Supported Types | Type | Flag | Description | |-------------|-------------|------------------------------------| | module | `-t module` | Creates a new Laravel module | | controller | `-t controller` | Creates a controller class | | model | `-t model` | Creates a model class | | enum | `-t enum` | Creates a PHP `enum` class | | service | `-t service`| Creates a service class | | request | `-t request`| Creates a Laravel FormRequest | --- ## ๐Ÿ”ง Command Options ```bash codizium-cli [laravel|nextjs|nodejs] -t <type> -n <name> [--module <moduleName>] [--path <targetPath>] ``` - `-t, --type`: Component type (e.g. module, controller) - `-n, --name`: Component name (e.g. User, PostController) - `--module`: Optional. Uses existing module structure - `--path`: Optional. Overrides default path (defaults to current dir) --- ## ๐Ÿ“ Directory Output Example for `laravel -t module -n blog`: ``` blog/ โ”œโ”€โ”€ composer.json โ”œโ”€โ”€ routes/ โ”‚ โ””โ”€โ”€ web.php โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ Controllers/ โ”‚ โ”œโ”€โ”€ Models/ โ”‚ โ”œโ”€โ”€ Requests/ โ”‚ โ”œโ”€โ”€ Providers/ โ”‚ โ””โ”€โ”€ ... ``` --- ## ๐Ÿงช Testing You can simulate tests using local `npm link`: ```bash npm link codizium-cli generate:[laravel|nodejs|nextjs] -t controller -n TestController ``` ### โœ… Planned Test Automation (coming soon) - Unit tests using `vitest` or `jest` - CLI integration tests - Snapshot testing for file output --- ## ๐Ÿ‘จโ€๐Ÿ’ป Development Clone and run locally: ```bash git clone https://github.com/codizium/codizium-cli.git cd codizium-cli npm install npm link ``` --- ## ๐Ÿ› ๏ธ Dependencies - [commander](https://www.npmjs.com/package/commander) - [chalk](https://www.npmjs.com/package/chalk) - [figlet](https://www.npmjs.com/package/figlet) - [ora](https://www.npmjs.com/package/ora) --- ## ๐Ÿ“ฃ Contributing Contributions are welcome! Please open an issue or submit a pull request. --- ## ๐Ÿ“œ License [ISC](./LICENSE) ยฉ 2025 [Rapha Panchi](https://github.com/ralphxp) Built with โค๏ธ by [Codizium Innovative Technologies](https://github.com/codizium) --- ## ๐Ÿ“Ž Related - [Laravel Module Generator](https://github.com/nWidart/laravel-modules) - [Codizium GitHub](https://github.com/codizium)