Need a special offer?Find out if your project fits.
+
All documentation
  • Introduction
  • Connecting to Data Source
  • Browser compatibility
  • Documentation for older versions
  • 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.

    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 [args] [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 first argument.
    • es6 — the second 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:

    CommandAliasDescription
    createcCreates a sample project with Flexmonster based on a chosen language and framework.
    addaDownloads Flexmonster Pivot, framework wrappers, Flexmonster Data Server, Theme Builder, or Flexmonster Accelerator.
    updateuUpdates Flexmonster Pivot, framework wrappers, Flexmonster Data Server, or Flexmonster Accelerator.
    versionvOutputs the Flexmonster CLI version and notifies about CLI updates if any.
    helphProvides 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 inside your project:

    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: