composer-chart-cli

1.0.3 • Public • Published

composer-chart-cli

The composer-chart-cli is a tool designed to help you manage all aspects of the custom chart creation process in Composer. With the CLI you create new custom charts, update existing ones, and import custom charts to other Composer servers.

Installation

Requirements

  • Node.js v10.0.0+

Install with npm

$ npm install -g composer-chart-cli

Usage

Composer CLI Environment Configuration

After installing composer-chart-cli, you may want to use the following command to configure the default Composer environment used by the CLI. While this is not a requirement, it greatly improves your CLI user experience because it sets the server URL and administrative credentials for you so you do not have to enter them with every CLI command.

$ cmp-chart config

After entering this command, follow the prompts to store your default server configuration in an encrypted file. The CLI checks for the presence of this file if you omit the server or credentials when running a command.

Creating a Chart

To create a custom chart locally, run the following command:

$ cmp-chart init <path/to/chart>

Optionally, you can provide a type parameter. For example:

$ cmp-chart init -t multi-group <path/to/chart>

For information about possible chart types, run the following command:

$ cmp-chart help init

Installing dependencies and building the Chart

To install dependencies, run the following command at the root level of the newly created chart:

$ npm install

Then build the chart:

$ npm run build

Editing the Chart

Make sure you are in the chart’s folder and run the following edit command:

$ cmp-chart edit

Alternatively, you can specify the path to the chart in the edit command. For example:

$ cmp-chart edit -d <path/to/chart>

After running the edit command, follow the prompts to update the:

  • Controls
  • Name
  • Variables

Rebuild the chart:

$ npm run build

Pushing the Chart to the Server

To push the chart to the server, run the following command:

$ cmp-chart push

Removing the Chart from the Server

To remove the chart from the server, run the following command:

$ cmp-chart rm

After running the command you will be prompted to select the chart name and confirm its deletion.

Listing All Charts

To list all charts stored on the server, run the following command:

$ cmp-chart ls

Getting Help

Access the CLI help by running the following command:

$ cmp-chart help

Get help for a specific command by running the following command:

$ cmp-chart help <command_name>

Support

Compatibility table

Composer Server composer-chart-cli
>=8.0.0 1.0.0

For supporting previous versions of Composer/Zoomdata server use zoomdata-chart-cli

For more information visit Composer's developer zone

Dependents (0)

Package Sidebar

Install

npm i composer-chart-cli

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

136 kB

Total Files

113

Last publish

Collaborators

  • composer-build-bot