Using the Developer Toolkit CLI
Administration
This topic covers Developer Toolkit command structure, help, and usage.
Command Structure
The following example shows the basic structure for the Developer Toolkit CLI commands:
cpq-toolkit <command> [options] [parameters]
The following table lists the Developer Toolkit command that support the "--help" parameter to show command details and their options.
Command Options |
Command Actions |
---|---|
cpq-toolkit --help |
This command displays Developer Toolkit commands, available options, and settings. |
cpq-toolkit init --help |
This command displays int command, available options, and settings. |
cpq-toolkit pull --help |
This command displays pull command, available options, and settings. |
cpq-toolkit push --help |
This command displays push command, available options, and settings. |
cpq-toolkit status --help |
This command displays status command, available options, and settings. |
cpq-toolkit site --help |
This command displays site command, available options, and settings. |
cpq-toolkit package --help |
This command displays package command, available options, and settings. |
cpq-toolkit migration --help |
This command displays migration command, available options, and settings. |
Description: Use the init command to initialize the OAuth properties configuration file for OAuth flow.
Aliases: init, client
Syntax:
-
This command displays init command options and settings.
cpq-toolkit init --help
-
This command prompts the user for all the OAuth configuration properties.
cpq-toolkit init
-
This command configures OAuth properties using the specified configuration file.
cpq-toolkit init <configFilePath>
-
This command dynamically registers the client and configures OAuth properties.
cpq-toolkit init [-r] [--host=<hostName>]
-
This command configures OAuth properties using the specified Port and Host name and prompts the user for Client details.
cpq-toolkit init [--port=<port>] [--host=<hostName>] [-f]
-
This command configures OAuth properties using the specified configuration file, but the specified Port and Host name will override the configuration file settings.
cpq-toolkit init [--port=<port>] [--host=<hostName>] [-f] [<configFilePath>]
Arguments:
<configFilePath>
: The path of file containing the OAuth configuration properties.
The configuration file should be a text file with following syntax.
client.id=<your_client_id> client.secret=<your_client_secret> endpoint.redirection.port=<port> host.name=<your_host_name> scope=<scopes separated by spaces>
Notes
- The host name value should not include protocol.(e.g.
--host=abcd.com
) - Each property should be on a new line.
Command Options:
Command Options | Description |
---|---|
cpq-toolkit init --help |
This command prompts the user for all the OAuth configuration properties. |
cpq-toolkit init -p, --port |
This option is used to change or override the port. |
cpq-toolkit init -h, --host |
This option is used to change or override the host name. Note: The value should not include protocol.(e.g. |
cpq-toolkit init -f,--force-update |
This option is used to override an existing OAuth configuration. |
cpq-toolkit init -r, --register |
This option is used to create a new client on the site specified by Note: This option cannot be combined with |
cpq-toolkit init -u, --update |
This option is used to update an existing client on the authentication server. The OAuth configurations stored locally will be overridden. Note: This option cannot be combined with |
cpq-toolkit init -n, --name |
This option is used to change your client name. |
cpq-toolkit init -s, --scope |
This option is used to set additional scope options. Acceptable values: |
Description:Use the pull command to download the Util and Commerce Libraries to your local system.
Aliases: pull, cpq-pull-tool
Syntax:
cpq-toolkit pull [-options...] <source_dir>
cpq-toolkit pull --help
Arguments:
<source_dir>
: The directory into which the downloaded metadata will be copied.
Note: The source directory can only be an absolute path to the current working directory.
Command Options:
Command Options |
Command Actions |
---|---|
cpq-toolkit pull --help |
This command displays pull command, available options, and settings. |
cpq-toolkit pull --host=<host_url> |
The hostname of the CPQ server. Overrides the remote.host setting. |
cpq-toolkit pull --remote-protocol=[https|https] |
The protocol for connecting to the remote host. The default is https. Overrides the remote.protocol setting. |
cpq-toolkit pull --basic-auth |
Specifies basic authentication as the primary auth method. With basic auth, you will supply your CPQ username and password directly to the console. |
cpq-toolkit pull -u=<user_name> |
The username of your CPQ user. Only used when --basic-auth is enabled. Overrides the remote.user.name setting. |
Example
cpq-toolkit pull /users/jsmith/cpq-dev/
Description: Use the push command to validate, save, or deploy your Util and Commerce Libraries to the CPQ Server.
Aliases: push, cpq-push-tool
Syntax:
cpq-toolkit push [-options...] [<push_specs>]
cpq-toolkit push --help
Arguments:
<push_specs>
: Files and folders to upload.
-
Refer to Push Specifications File for push_specs file information.
-
To support granular deployment, Developer Toolkit Command Line Interface (CLI) supports <push_specs>.
-
Push specs are used to determine a set of files to upload from the local file system to the remote CPQ server as part of the push operation.
-
Users can specify the path of individual files or folders to upload, OR, they can create a file with .push as the file extension to define a set of files and folders to upload.
-
If the push spec or a push spec file are not defined, the entire source directory containing the current directory is uploaded.
Note: All files to be uploaded must be inside a source directory. Source directories are designated by the presence of a .cpqtoolkit sub-folder.
Command Options:
Command Options |
Command Actions |
---|---|
cpq-toolkit push --help |
This command displays push command options and settings. |
cpq-toolkit push --no-test |
Do not run unit tests on the CPQ site. |
cpq-toolkit push --no-save |
Do not save any data to the CPQ site. The files are still validated. |
cpq-toolkit push -d |
Deploy related objects on the CPQ site after saving. Overrides the --no-save option. |
cpq-toolkit push --host=<host_url> |
The hostname of the CPQ server. Overrides the remote.host setting. |
cpq-toolkit push --remote-protocol=[https|https] |
The protocol for connecting to the remote host. The default is https. Overrides the remote.protocol setting. |
cpq-toolkit push --basic-auth |
Specifies basic authentication as the primary auth method. With basic auth, you will supply your CPQ username and password directly to the console. |
cpq-toolkit push -u=<user_name> |
The username of your CPQ user. Only used when --basic-auth is enabled. Overrides the remote.user.name setting. |
In addition to specifying files/folders to upload, you can specify push spec files as args.The following rules apply to push spec files:
-
The push spec file name must end with the special file extension “.push”
-
Push spec files must be encoded in UTF-8
-
The push spec file must contain one push spec on each line. The lines can end with an LF, CR, or CRLF.
-
File and folder paths inside the spec file must be relative paths. The paths are interpreted relative to the parent folder of the push spec file.
-
Push spec paths inside the push spec file are interpreted according to the underlying operating system.
-
While you can specify individual files in the spec, you must include both the .bml and the -meta.json file when pushing BML.
-
Push spec files are not recursively parsed
-
Push spec files that are not specified on the command line will not be parsed, even if they are present inside a directory.
Examples
The following command validates BML code to your CPQ Server, it specifies the absolute path for spec.push file.
cpq-toolkit push --no-save --no-test /users/username/<source_dir>/spec.push
The following command saves and validates the getTransactionStatus BML function to your CPQ server, it specifies the file path in the command itself.
cpq-toolkit push /users/username/<source_dir>/commerceAndDocuments/processDefinition/oraclecpqo
/transaction/libraries/gettransactionStatus/gettransactionStatus-meta.json /users/username/<source_dir>/
commerceAndDocuments/processDefinition/oraclecpqo/transaction/libraries/gettransactionStatus/gettransactionStatus.bml
Description: Use the status command to retrieve status for deployment tasks identified by task IDs provided in the input.
Aliases: cpq-status-tool, status
Syntax:
cpq-toolkit status [-options...] --file <inputFilePath>
cpq-toolkit status [-options...] <taskId1> <taskId2> ...
cpq-toolkit status --help
Arguments:
<taskId>
One or more Task IDs separated by spaces.
<inputFilePath>
Path of the file containing task details. Should follow structure of 'deploymentTasks.json' created as result of push tool execution.
Command Options |
Command Actions |
---|---|
cpq-toolkit status --help |
This command displays status command, available options, and settings. |
cpq-toolkit status -file |
Only if inputs are provided through file. |
cpq-toolkit status --host=<host_url> |
The hostname of the CPQ server. Overrides the remote.host setting. |
cpq-toolkit status --remote-protocol=[https|https] |
The protocol for connecting to the remote host. The default is https. Overrides the remote.protocol setting. |
cpq-toolkit status --basic-auth |
Specifies basic authentication as the primary auth method. With basic auth, you will supply your CPQ username and password directly to the console. |
cpq-toolkit status -u=<user_name> |
The username of your CPQ user. Only used when --basic-auth is enabled. Overrides the remote.user.name setting. |
Description: Use the site command to list sites, register or deregister the site with provided host and name.
Aliases: site, cpq-site-tool
Syntax:
-
This command displays site command options and settings.
cpq-toolkit site --help
-
This command registers the site and configures OAuth properties with the given name and host.
cpq-toolkit site [-n=<site_name> --host=<hostName> -r]
-
This command overrides the existing site property file with given host and name. Registers a new site if the site with the given name doesn't exist.
cpq-toolkit site [-n=<site_name> --host=<hostName> -f -r]
-
This command deregisters the site and removes the OAuth properties file for the given site.
cpq-toolkit site [-n=<site_name> -d]
-
This command lists all the registered sites.
cpq-toolkit site -l
Command Options:
Command Options | Description |
---|---|
cpq-toolkit site --help |
This command displays site command, available options, and settings. |
cpq-toolkit site -h, --host |
This option is used to register or override the host name. Note: The value should not include protocol.(e.g. |
cpq-toolkit site -f,--force-update |
This option is used to override an existing registered site. |
cpq-toolkit site -r, --register |
This option is used to register the site specified by Note: This option cannot be combined with |
cpq-toolkit site -n, --name |
This option is used to specify the name of the site. If the name is not provided, the package name is taken from the Note: This option cannot be combined with |
cpq-toolkit site -d, --deregister |
This option is used to deregister an existing site as specified with the Note: This option cannot be combined with |
cpq-toolkit site -l, --list |
This option is used to list all registered sites. |
Description: Executes the package commands with given resources.
Aliases: package, cpq-package-tool
Syntax:
-
This command displays package command options and settings.
cpq-toolkit package --help
-
This command creates a package with the given name and payload definition on a given site.
cpq-toolkit package [--name=<package_name> --definition-file=<request_payload_file> --site=<site_name>] create
-
This command downloads the package with the given identifier as a zip file.
cpq-toolkit package [--identifier=<package_identifier> --site=<site_name>] download
-
This command lists all the packages on the given site.
cpq-toolkit package [--site=<site_name>] list
Arguments:
create
Create a package with given name.
list
List all packages on the given site.
download
Downloads the specified package on the given site.
Command Options:
Command Options | Description |
---|---|
cpq-toolkit package --help |
This command displays package command, available options, and settings. |
cpq-toolkit package --host=<host_url> |
This option is the hostname of the CPQ server and is used to override the remote.host setting. Note: The value should not include protocol.(e.g. |
cpq-toolkit package --remote-protocol=<protocol> |
This option is the protocol for connecting to the remote host and is used to override the remote.protocol setting. Note: The default for this option is https.
|
cpq-toolkit package --basic-auth |
This option specifies basic authentication as the primary authentication method. With |
cpq-toolkit package -u=<user_name> |
This option is used to specify the username of the CPQ user and is used to override the This option is only used when
--basic-auth is enabled. |
cpq-toolkit package --name |
This option is used to specify the name of the package. This is optional. If not specified, the package name is taken from definition-file. |
cpq-toolkit package --definition-file |
This option is the Definition file or Request payload file. This is a mandatory value for the
create command. The file must be JSON, YML, or YAML format. |
cpq-toolkit package --identifier |
This option is the package identifier. This is a mandatory value for the
download argument. |
cpq-toolkit package --site |
This option is the name of a site and is required if you want to perform an action on a specific site. If a site is not provided in the command, the default site is used. |
Settings
The following are package-related settings from <workspace_location>\settings\workspace.properties
.
-
remote.host
The hostname of the default CPQ server. This can be overridden by the--host
option. -
remote.timeout.connect
The network connection timeout in milliseconds. -
remote.timeout.read
The network read timeout in milliseconds. -
remote.protocol
The protocol for connecting to the remote host. The default is https. This can be overridden by the--remote-protocol
option. -
remote.user.name
The username of your CPQ user. Only used when--basic-auth
is enabled. This can be overridden by the-u
option.
Description: Use the migration command to perform migration action on site with a specified source.
Aliases: migrate, cpq-migrate-tool
Syntax:
-
This command displays migration command options and settings.
cpq-toolkit migration --help
-
This command migrates the package with a given identifier from source to target site.
cpq-toolkit migration [--identifier=<package_identifier> --source=<source_name> --target=<target_name>] package
-
This command migrates the specified package to target site.
cpq-toolkit migration [--packageZip=<packageZip> --target=<target_name>] package
-
This command migrates the given resources specified in the file from source to target site.
cpq-toolkit migration [--file=<resource_file_name> --source=<source_name> --target=<target_name>] resources
Arguments:
package
Package migration.
resources
Perform migration using resource file.
Command Options:
Command Options | Description |
---|---|
cpq-toolkit migration --help |
This command displays migration command, available options, and settings. |
cpq-toolkit migration --file |
This option is the resource file. This is a mandatory value for the
resources command. The file must be JSON, YML, or YAML format. |
cpq-toolkit migration --identifier |
This option is the package identifier. This is a mandatory value when performing a package migration from a source site. |
cpq-toolkit migration --source |
This option is the source site name. This is a mandatory value. |
cpq-toolkit migration --target |
This option is the target site name. This is a mandatory value. |
cpq-toolkit migration --packageZip |
This option is the name of the package zip file to be migrated. |
cpq-toolkit migration --basic-auth |
This option specifies basic authentication as the primary authentication method. With |
Notes
Oracle CPQ does not support translations for the Developer Toolkit CLI.
Developer Toolkit REST APIs
All commands in the Developer Toolkit CLI correspond to requests made to an adminMeta REST APIs. Each action with a REST endpoint has an API reference that can be found under the Web Services Section in OLH. Refer to the Developer Toolkit REST APIs for more information.