DocsCLIOverview

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-cli
❗️

This 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:

remodel

This opens a menu with four options:

  1. Initialize Project — set up a new ReModel project with config, providers, and models directory
  2. Create Model — generate a new model with actions, reducer, epics, selectors, and index
  3. Create Component — scaffold a React or React Native component
  4. 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:

remodel

Non-interactive:

remodel init --ts --platform react --dir ./src/models
remodel generate model --name user --ts --dir ./src/models
remodel component --name UserProfile --ts --platform react

Commands

CommandAliasDescription
remodelLaunch interactive UI
remodel initInitialize a new ReModel project
remodel generate <type>remodel g <type>Generate a model or component
remodel componentremodel cGenerate a component
remodel --helpremodel -hShow help
remodel --versionremodel -vShow 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:

FlagDescription
--tsUse TypeScript
--jsUse 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.