Remodel CLI
The Remodel CLI is a command-line tool for scaffolding projects and generating boilerplate for @blue-functor/remodel. It provides both an interactive terminal UI and non-interactive flag-based commands.
Installation
npm install -g @blue-functor/remodel-cliThis package is currently private. If you’re interested in gaining access, feel free to contact us for more details.
Quick Start
Run the CLI without arguments to launch the interactive UI:
remodelThis opens a menu with four options:
- Initialize Project — set up a new ReModel project with config, providers, and models directory
- Create Model — generate a new model with actions, reducer, epics, selectors, and index
- Create Component — scaffold a React or React Native component
- Docs — open the ReModel documentation in your browser
Interactive vs Non-Interactive
Every command can be run either interactively (with the terminal UI) or non-interactively (with flags). If a required option is not provided via flags, the CLI defaults to interactive mode.
Interactive:
remodelNon-interactive:
remodel init --ts --platform react --dir ./src/models
remodel generate model --name user --ts --dir ./src/models
remodel component --name UserProfile --ts --platform reactCommands
| Command | Alias | Description |
|---|---|---|
remodel | Launch interactive UI | |
remodel init | Initialize a new ReModel project | |
remodel generate <type> | remodel g <type> | Generate a model or component |
remodel component | remodel c | Generate a component |
remodel --help | remodel -h | Show help |
remodel --version | remodel -v | Show version |
Project Structure
After running remodel init and creating a model, your project will look like this:
- Providers.tsx
- index.ts
- actions.ts
- index.ts
- reducer.ts
- epics.ts
- selectors.ts
- .remodel
Global Flags
These flags are available on all generation commands:
| Flag | Description |
|---|---|
--ts | Use TypeScript |
--js | Use JavaScript |
--dir <path> | Target directory |
--name <name> | Resource name |
--platform <platform> | react or react-native |
If a .remodel config file exists, the CLI reads defaults from it — so you don’t have to pass --ts or --platform every time.