Custom visualizations tools and commands

With IBM® Cognos Analytics custom visualizations tools you can create, compile, run, clean, and pack visualizations from a command-line interface (CLI).

In addition to compiling a visualization, you can use the custom visualizations to host a custom visualization locally to test the visualization in Cognos Analytics before you deploy it.

You use the Cognos Analytics custom visualization tools from commands in a command-line interface (CLI). You run these commands from Microsoft Windows PowerShell or CMD on Windows or from Terminal on Apple OSX.

For installation of the Cognos Analytics custom visualization tools, see Setting up the development environment.

Help

Prints a help dialogue of all available commands and any additional options that can be used.

customvis --help

or

customvis

Create

Creates a visualization within a folder called name.

customvis create [options] <name>

or

customvis c [options] <name>

Options:

  • -t, --template <template> Creates a project from template (default: Basic). This flag determines the initial template that the visualization is generated from. To list all available templates, see the List command.
    customvis c -t BarChart <name>
  • -f, --force Forces folder creation with name. Note: If you specify an existing name for the folder, the existing folder is deleted .
    customvis c -f <name>
  • -h, --help Output usage information

List

Lists all the available templates that can be used for a new custom visualization during the Create command.

customvis list

or

customvis l

Start

Builds and starts a local server that hosts the current visualization.

  • The CLI tool builds the sources.
  • A local server starts to host the custom visualization.
customvis start [options]

or

customvis s [options]

Options:

  • -p, --port

    Starts a server on a specific port (default 8585).

    customvis start -p 8585
  • -h, --help

    Output usage information

    customvis start -h

Pack

Creates a package of the visualization in the current root directory, <folder-name>.packed.zip. You can upload this .zip file to Cognos Analytics.

customvis pack

or

customvis p

Build

Builds and compiles the visualization in the current directory. Use this to test the deployment version locally.

customvis build

or

customvis b

Clean

Cleans the current visualization and removes all the files that are generated by the command-line tool. Use this when you need to share a development version of the visualization.

customvis clean

or

customvis cl

Upgrade

Upgrades the customvis-lib in the current visualization. Replaces the customvis-lib dependency with the latest one in the current CLI tool. Also triggers the Clean command.

customvis upgrade

or

customvis up

Info

Get information about the CLI tool and the current visualization. Shows the Cognos Analytics extensible information about the CLI tool and the current visualization.

customvis info

or

customvis i

Version

Shows the current Cognos Analytics custom visualization CLI tool version.

customvis --version

or

customvis -V