Get Free Trial
  1. API reference
Connecting to Data Source
Configuring the component
  • Documentation for older versions
  • Table of contents

    Overview

    Flexmonster CLI is a command-line interface tool for Flexmonster.

    The CLI can:

    • Download Flexmonster Pivot or its framework wrappers.
    • Create sample projects with Flexmonster.
    • Get Flexmonster Data Server or Flexmonster Accelerator.
    • Update all of the above.

    This guide contains the following sections:

    1. Flexmonster CLI installation 
    2. CLI command syntax
    3. Available commands
    4. Basic usage:
    5. Troubleshooting

    Flexmonster CLI installation

    To install Flexmonster CLI, you will need Node.js and npm. Get it here if it’s not already installed on your machine.

    Then install Flexmonster CLI globally to use its commands on your computer:

    npm install -g flexmonster-cli

    Now a new flexmonster command is available in the console. If needed, see troubleshooting.

    CLI command syntax

    flexmonster command syntax:

    flexmonster commandNameOrAlias requiredArg optionalArg [options]

    For example:

    flexmonster create react es6 --install

    This command creates a simple React + ES6 project with Flexmonster and installs all the npm dependencies. The command consists of the following parts:

    • flexmonster — the executable used to run all the CLI commands.
    • create — the command name.
    • react — the required argument.
    • es6 — the required argument.
    • --install (or -i) — the option.

    Option names have the -- prefix (e.g., --install), and option aliases are prefixed with - (e.g, -i). Command arguments are not prefixed (e.g., react).

    Available commands

    Flexmonster CLI has the following commands:

    Command Alias Description
    create c Creates a sample project with Flexmonster based on a chosen language and framework
    add a Downloads Flexmonster Pivot, framework wrappers, Flexmonster Data Server, Theme Builder, or Flexmonster Accelerator
    update u Updates Flexmonster Pivot, framework wrappers, Flexmonster Data Server, or Flexmonster Accelerator
    version v Outputs the Flexmonster CLI version and notifies about CLI updates if any.
    help h Provides help on the available commands and options

    Basic usage

    This section will help you get started with the CLI. If you have any issues when running the CLI commands, visit our troubleshooting page.

    See Flexmonster CLI version

    To see the CLI version, run the following command:

    flexmonster version

    Get help on commands

    Get the list of all the available commands and options with the help command:

    flexmonster help

    To see the description, options, and usage examples for a particular CLI command, run the following command:

    flexmonster commandNameOrAlias --help

    Create a sample project with Flexmonster

    To create and run a sample JavaScript project with Flexmonster, use the following CLI command:

    flexmonster create javascript -r

    The create command also allows setting up sample projects based on TypeScript or different front-end frameworks. See more details about the create command.

    Add Flexmonster to a project

    Install Flexmonster Pivot from npm with the add command. Run this command from the project folder containing package.json:

    flexmonster add js-flexmonster

    The add command can also download Flexmonster Data Server, Flexmonster Accelerator, or framework wrappers. Learn more about the add command in the documentation.

    Update Flexmonster

    Update Flexmonster Pivot with the update command:

    flexmonster update js-flexmonster

    Framework wrappers and our additional tools (the Data Server and the Accelerator) can also be updated with the update command. See the full description of this command.

    Troubleshooting

    If you have any issues when running the CLI commands, visit our troubleshooting page.

    What’s next?

    You may be interested in the following articles: