CLI Overview and Command Reference¶
Table of Contents¶
Basic workflow¶
To create, build, and serve a new, basic CPL project on a development server, go to the parent directory of your new workspace use the following commands:
cpl new console my-first-project
cd my-first-project
cpl start
In the terminal you will the output of the app.
CLI command-language syntax¶
cpl
commandNameOrAlias requiredArg [optionalsArgs]
Most commands, and some options, have aliases. Aliases are shown in the syntax statement for each command.
Arguments are not prefixed.
Relative paths¶
Options that specify files can be given as absolute paths, or as paths relative to the current working directory, which is generally either the workspace or project root.
Schematics¶
The cpl generate command takes as an argument the artifact to be generated. In addition to any general options, each artifact defines its own options in a schematic. Schematic options are supplied to the command in the same format as immediate command options.
Command overview¶
Command |
Alias |
Description |
---|---|---|
a or a |
Adds a project reference to given project. |
|
b or B |
Prepares files for publish into an output directory named dist/ at the given output path. Must be executed from within a workspace directory. |
|
g or G |
Generate a new file. |
|
h or H |
Lists available command and their short descriptions. |
|
i or I |
With argument installs packages to project, without argument installs project dependencies. |
|
n or N |
Creates new CPL project. |
|
p or P |
Prepares files for publish into an output directory named dist/ at the given output path and executes |
|
r or R |
Removes a project from workspace. |
|
s or S |
Starts CPL project, restarting on file changes. |
|
ui or UI |
Uninstalls packages from project. |
|
u or U |
Update CPL and project dependencies. |
|
v or V |
Outputs CPL CLI version. |