1.3.0 • Published 7 months ago
@fluentity/cli v1.3.0
Fluentity CLI
A command-line interface tool for generating Fluentity models. This tool helps streamline the process of creating and managing Fluentity models in your project.
Installation
# Using npm
npm install -g @fluentity/cli
# Using pnpm
pnpm add -g @fluentity/cli
# Using yarn
yarn global add @fluentity/cliUsage
The CLI provides a simple interface for generating Fluentity models:
# Generate a new model
fluentity generate:model [name]
# Generate a model with specific options
fluentity generate:model [name] --path ./custom/path --forceCommands
generate:model [name]
Generates a new Fluentity model with the specified name.
Arguments:
[name]- Name of the model to generate (optional)
Options:
-p, --path <path>- Path where the model should be generated (default: './src/models')-f, --force- Overwrite existing model file if it exists
parse:openapi [filename]
Generates all Fluentity models from a JSON OpenAPI file.
Arguments:
[filename]- Name of the JSON file to parse
Options:
-p, --path <path>- Path where the model should be generated (default: './src/models')-f, --force- Overwrite existing model file if it exists
Development
Prerequisites
- Node.js (Latest LTS version recommended)
- pnpm 8.0.0 or later
Setup
- Clone the repository
- Install dependencies:
pnpm install
Available Scripts
pnpm build- Build the projectpnpm start- Run the CLI locallypnpm dev- Build and watch for changespnpm test- Run testspnpm test:coverage- Run tests with coveragepnpm test:ui- Run tests with UI
License
MIT © Cedric Pierre
Author
- Cedric Pierre (jirotoh@gmail.com)