@prexress/cli
v0.0.12
Published
A command-line tool for creating pxr projects
Readme
Prexress CLI
🚀 Overview
Prexress is a powerful, TypeScript-based backend framework tailored for scalability and modularity. Built on top of Express.js, it now features Drizzle ORM, and a modular folder structure, with separated core and db components packaged independently.
This documentation outlines how to use the Prexress CLI (@prexress/cli) to generate project scaffolding and key components with ease.
The Prexress CLI (@prexress/cli) offers a streamlined interface to scaffold and manage your project components efficiently.
🛠️ Installation
Install the CLI tool globally via pnpm:
pnpm add -g @prexress/cliVerify the installation:
pxr --help📦 Project Initialization
To create a new Prexress project:
pxr initN:B: For continuous flow
initcommand make your machine have already running docker. more precisely needdocker compose
This sets up the initial project structure with a basic configuration, default modules, and dependencies.
🚀 Available CLI Commands
| Command | Description |
| --------------------- | ------------------------------------------------------------------------ |
| pxr init | Scaffold a new Prexress project |
| pxr make:module | Generate a full module (controller, service, schema, middleware) |
| pxr make:controller | Create a basic controller inside a module |
| pxr make:service | Generate a service class for business logic |
| pxr make:schema | Define a new schema using Drizzle ORM |
| pxr make:middleware | Generate a middleware class |
| pxr make:repository | Create a repository class for data access |
Each command is interactive and prompts you to enter relevant names and configuration options during generation.
pxr init
Initializes a new Prexress project with boilerplate structure.
pxr init- Sets up a modular folder structure
- Installs dependencies
- Prepares
.envand configuration files
pxr make:module
Generates an entire feature module, including:
- Controller
- Service
- Repository
- Schema
- Middleware
pxr make:moduleExample:
pxr make:module userpxr make:controller
Creates a controller file for an existing or new module.
pxr make:controllerExample:
pxr make:controllerpxr make:service
Generates a service class for a module, containing the business logic.
pxr make:servicepxr make:schema
Creates a Drizzle ORM schema file for a specific model.
pxr make:schemapxr make:middleware
Generates a basic middleware class.
pxr make:middlewarepxr make:repository
Creates a repository for managing database operations.
pxr make:repository🔄 Updating the CLI
To upgrade the CLI to the latest version:
pnpm update -g @prexress/cli💡 Tips
- Always run
pxr initinside an empty directory. - Follow consistent naming conventions (e.g., lowercase module names).
- Use version control (
git) to track scaffolding changes.
📬 Contributing
We welcome contributions! Follow these steps:
- Fork the repo
- Create a feature branch:
git checkout -b feature/awesome-feature - Commit and push:
git commit -am "Add awesome feature" git push origin feature/awesome-feature - Submit a pull request
📄 License
MIT License. See LICENSE file for details.
