Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Summary: Information about ExtendCli, a command line tool to create and manage bundles for CAST Extend local serverCAST Extend Offline.

What is ExtendCli?

CAST Extend local server and CAST Extend Offline (in v. ≥ 1.1.0) are delivered "empty" without any preconfigured extensions - you will therefore need to populate them with extensions before you can use them. In addition, you may want to update CAST Extend local server/Offline to add new extensions or to include more recent releases of extensions. The ExtendCli tool is designed to perform this job and will allow the integration of the following (see Contributor types for more information about the types of extensions that are available):

...

Info
  • ExtendCli does not replace CAST Extension Downloader - a tool used to download Extensions from CAST Extend (live or offline).
  • All dependent extensions of a given extension will be included when using ExtendCli.

What's new

See ExtendCli - Release Notes for more information.

Prerequisites

To use ExtendCli, the following is required:

Supported Operating Systems

...

Where can you find ExtendCli?

ExtendCli is provided in two ways:

Code Block
Console ≥ 2.x Node
%PROGRAMFILES%\CAST\AIP-Node\bin\ExtendCli\ExtendCli.exe

Console 1.x Node
%PROGRAMFILES%\CAST\AipConsole\AipNode\bin\ExtendCli\ExtendCli.exe

What's new

See ExtendCli - Release Notes for more information.

Prerequisites

To use ExtendCli, the following is required:

Supported Operating Systems

Operating SystemSupportedSupported by reference
Microsoft Windows 8 64-bit
(tick)
Microsoft Windows 8.1 64-bit(tick)
Microsoft Windows 10 64-bit(tick)
Microsoft Windows Server 2012 2008 R2 SP1 64-bit (Standard edition)
(tick)
Microsoft Windows Server 2016(tick)2012 64-bit (Standard edition)
(tick)
Microsoft Windows Server 2012 R2 64-bit (Standard edition)
(tick)

Microsoft Windows Server 2016

(tick)
Microsoft Windows Server 2019(tick)
Microsoft Windows Server 2022(tick)

Using ExtendCli

ExtendCli is provided as an executable (ExtendCli.exe) and must be used in command line mode. To do so, either:

...

Info

You can determine the <extension id> of a given extension using the CAST Extend website:


Option

Description

Command line

Comment

Example of command line

set

Setup the CAST Extend (online) connection parameters.

ExtendCli.exe config set <api-key>

<api-key> is specific to a login for CAST Extend (online). You can find this in your profile.

Info
Note that this command only needs to be used once (unless you decide to use a different api-key for an alternative CAST Extend (online) login).

extendCli.exe config set api-key w9876xyz-d999-32ii-9fb0-0123cde45

ExtendCli.exe config set [extend-url]

[extend-url] is optional. It refers to the URL to use for CAST Extend (online). When no option is provided, the default value is used: https://extend.castsoftware.com.

Info
Note that this command only needs to be used once (unless you decide to use a different URL).
extendCli.exe config set extend-url "your URL"ExtendCli.exe config set [proxy]

[proxy] is optional. It should be used:

  • when your network environment uses a proxy for internet access.
  • when the machine you are running ExtendCli on does not have operating system level proxy settings enabled.

The syntax is as follows:

Code BlockExtendCli.exe config set proxy <protocol://[user:password@]host[:port]>]

Option

Description

Command line

Comment

Example of command line

add

Add extensions to the active bundle.

ExtendCli.exe bundle add <extension id> [options]

When no option is provided, the most recent stable release of the extension is taken.

Info
Note that [options] can be cumulative.


ExtendCli.exe bundle add com.castsoftware.reactjs

ExtendCli.exe bundle add <extension id> -D

ExtendCli.exe bundle add <extension id> --skip-dependencies


Skip extension dependencies.

ExtendCli.exe bundle add com.castsoftware.reactjs -D

ExtendCli.exe bundle add <extension id> -S

ExtendCli.exe bundle add <extension id> --latest-stable

Add most recent stable version (LTS or Funcrel).

ExtendCli.exe bundle add com.castsoftware.reactjs -S

ExtendCli.exe bundle add <extension id> -a

ExtendCli.exe bundle add <extension id> --absolute-latest

Add absolute latest version (including alpha and beta releases).

ExtendCli.exe bundle add com.castsoftware.reactjs -a

ExtendCli.exe bundle add <extension id> -f

ExtendCli.exe bundle add <extension id> --latest-funcrel

Add latest funcrel release.

ExtendCli.exe bundle add com.castsoftware.reactjs --latest-funcrel

ExtendCli.exe bundle add <extension id> -l

ExtendCli.exe bundle add <extension id> --latest-lts

Add latest LTS release.

ExtendCli.exe bundle add com.castsoftware.reactjs --latest-lts

ExtendCli.exe bundle add <extension id> -v

ExtendCli.exe bundle add <extension id> --version

Add a specific release of the extension.

ExtendCli.exe bundle add com.castsoftware.reactjs --version 1.1.0-funcrel

clear

Clear your bundle.

ExtendCli.exe bundle clear

-

ExtendCli.exe bundle clear

downloadDownload extensions in the current bundle as .nupkg files

ExtendCli.exe bundle download [options]

-ExtendCli.exe bundle download
ExtendCli.exe bundle download -o | --outdir "<path>"In < 1.1.0-funcrel, the specified folder must already exist. In ≥ 1.1.0-funcrel, the folder will be created if it does not exist.ExtendCli.exe bundle download -o "C:\temp"
exportExport the content of the bundle into another .json file.ExtendCli.exe bundle export <file path>-ExtendCli.exe bundle export "C:\mybundle.json"
importImport the content of an existing exported .json file into your bundle.ExtendCli.exe bundle import <file path>-ExtendCli.exe bundle import "C:\mybundle.json"

list

List the extension versions/releases in your bundle.

ExtendCli.exe bundle list

-

ExtendCli.exe bundle list

pack

Create an .extarchive file from your bundle that can be imported into CAST Extend Offline.

ExtendCli.exe bundle pack [options]

-

ExtendCli.exe bundle pack

ExtendCli.exe bundle pack -o "<path>"Target folder where the archive will be saved. This folder must already exist.ExtendCli.exe bundle pack -o "C:\Temp\Bundles"
ExtendCli.exe bundle pack -dOnly downloads missing extensions, will not create an archive.ExtendCli.exe bundle pack -d
templateManage predefined bundles.ExtendCli.exe bundle template <command><options>Manage predefined templates available in CAST Extend and include them in your extension.-
ExtendCli.exe bundle template add product | community | labs | <template id>Allows the addition of all production extensions the absolute latest version (including alpha and beta releases) of all official / community / labs / or specific predefined bundle of extensions into a template bundle. Available in ≥ 1.1.0-funcrel. 

ExtendCli.exe bundle template add product

ExtendCli.exe bundle template add

<template id>

The template id refers to one of the predefined bundles available in CAST Extend.community

ExtendCli.exe bundle template add labs

ExtendCli.exe bundle template add 14

ExtendCli.exe bundle template

list

Lists the seven predefined bundles:

  • Id = 1 → All product extensions (note that this is deprecated from ≥ 1.1.0-funcrel - you should use "product" instead)
  • Id = 4 → Microsoft .NET
  • Id= 5 → Mobile
  • Id = 6 → Web
  • Id = 14 → Data
  • Id = 16 → Java / JEE
  • Id = 17 → Security (this bundle provides support for Security analysis for all technologies)
  • Id = product (from ≥ 1.1.0-funcrel)
  • Id = labs (from ≥ 1.1.0-funcrel)
  • Id = community (from ≥ 1.1.0-funcrel)
ExtendCli.exe bundle template list
ExtendCli.exe bundle template content <template Id>Displays the content of one predefined bundle.ExtendCli.exe bundle template content 17

config

The config command configures the parameters to allow the tool to connect to CAST Extend over the internet to fetch the required extensions (extensions) for the bundle:

add product | community | labs | <template id> -s | --latest-stable

ExtendCli.exe bundle template add product | community | labs | <template id>  -a | --absolute-latest

ExtendCli.exe bundle template add product | community | labs | <template id>  -f | --latest-funcrel

ExtendCli.exe bundle template add product | community | labs | <template id> -l | --latest-lts

Allows the addition of all official / community / labs / or specific predefined bundle of extensions into a template bundle AND allows you to specify the release of extensions you require:

  • -s | --latest-stableAdd most recent stable version (LTS or Funcrel) - equivalent to not passing any version option at all.
  • -a | --absolute-latest - Add absolute latest version (including alpha and beta releases).
  • -f | --latest-funcrel - Add latest funcrel release.
  • -l | --latest-lts - Add latest LTS release.

Available in ≥ 3.0.0-funcrel. 

ExtendCli.exe bundle template add product --latest-stable

ExtendCli.exe bundle template add community --absolute-latest

ExtendCli.exe bundle template add labs --latest-funcrel

ExtendCli.exe bundle template add 14  --latest-lts

ExtendCli.exe bundle template list

Lists the seven predefined bundles:

  • Id = 1 → All product extensions (note that this is deprecated from ≥ 1.1.0-funcrel - you should use "product" instead)
  • Id = 4 → Microsoft .NET
  • Id= 5 → Mobile
  • Id = 6 → Web
  • Id = 14 → Data
  • Id = 16 → Java / JEE
  • Id = 17 → Security (this bundle provides support for Security analysis for all technologies)
  • Id = product (from ≥ 1.1.0-funcrel)
  • Id = labs (from ≥ 1.1.0-funcrel)
  • Id = community (from ≥ 1.1.0-funcrel)
ExtendCli.exe bundle template list
ExtendCli.exe bundle template content <template Id>Displays the content of one predefined bundle.ExtendCli.exe bundle template content 17

config

The config command configures the parameters to allow the tool to connect to CAST Extend over the internet to fetch the required extensions (extensions) for the bundle:

Option

Description

Command line

Comment

Example of command line

set

Setup the CAST Extend (online) connection parameters.

ExtendCli.exe config set <api-key>

<api-key> is specific to a login for CAST Extend (online). You can find this in your profile.


Info
Note that this command only needs to be used once (unless you decide to use a different api-key for an alternative CAST Extend (online) login).


extendCli.exe config set api-key w9876xyz-d999-32ii-9fb0-0123cde45

ExtendCli.exe config set [extend-url]

[extend-url] is optional. It refers to the URL to use for CAST Extend (online). When no option is provided, the default value is used: https://extend.castsoftware.com.

Info
Note that this command only needs to be used once (unless you decide to use a different URL).


extendCli.exe config set extend-url "your URL"
ExtendCli.exe config set [proxy] <proxy_address>


Info

Where possible ExtendCli.exe config proxy <proxy_address> [-options] introduced in 3.0.0 should be used instead.

[proxy] is optional. It should be used:

  • when your network environment uses a proxy for internet access.
  • when the machine you are running ExtendCli on does not have operating system level proxy settings enabled.

The syntax is as follows:

Code Block
ExtendCli.exe config set proxy <protocol://[user:password@]host[:port]>

Note that if you are using the Use setup script option (1), CAST also recommends enabling the Automatically detect settings option (2):

Image Added

extendCli.exe config set proxy http://proxy_user:proxy_password@proxy.corp.com:3128
proxyConfigure a connection via a proxy (available in ≥ 3.0.0)ExtendCli.exe config proxy <proxy_address> [-options]

This option should be used instead of ExtendCli.exe config set [proxy] where possible.

  • when your network environment uses a proxy for internet access.
  • and when the machine you are running ExtendCli on does not have operating system level proxy settings enabled.

The syntax is as follows:

Code Block
ExtendCli.exe config proxy <protocol://host[:port]> [-options]

The following options are available:

  • -b | --bypass-on-local > Do not use the configured proxy settings for local requests.
  • -c | --default-credentials > Use the current Microsoft Windows account to authenticate with the proxy server.
  • -i | --bypass > Specifies one single address that will not use the proxy. Can be used multiple times in a command.
  • -u | --username > Specifies the username to authenticate with the proxy server if authentication is required.
  • -p | --password > Specifies the password for the username used to authenticate with the proxy server if authentication is required.
  • -d | --domain > Specifies the domain for domain restricted proxy servers.
  • -r | --reset > Will reset any previously configured proxy settings, i.e. when using ExtendCli commands in a batch file or consecutively in a CMD window.

Note that if you are using the Use setup script option (1), CAST also recommends enabling the Automatically detect settings option (2):

Image Removed

extendCli.exe config set proxy

2):

Image Added

ExtendCli.exe config proxy http://proxy.corp.com:3128

ExtendCli.exe config proxy http://proxy.corp.com:3128 -c

ExtendCli.exe config proxy http://proxy.corp.com:3128 -u my_user -p my_password

ExtendCli.exe config proxy http://proxy.corp.com:3128 -u my_user

:proxy_password@proxy.corp.com:8080

-p my_password -i http://some.address.com -i http://some.other.address.com -i *:8080 -i https://*:*

download

This option allows you to download an extension in .nupkg format:

...

Some additional advanced settings can be configured using the following file which can be edited with a text editor:

...

can be edited with a text editor:

Code Block
Downloadable tool
<extend_cli_unzip_folder>\appsettings.json

Console ≥ 2.x Node
%PROGRAMFILES%\CAST\AIP-Node\bin\ExtendCli\appsettings.json

Console 1.x Node
%PROGRAMFILES%\CAST\AipConsole\AipNode\bin\ExtendCli\appsettings.json

Timeout

Code Block
"Timeout": 10800

This setting is (available in ≥ 2.1.1-funcrel) is specifically for those with very slow network connections. The default value is in seconds (the default value is 10800, or 3 hrs) and should only be increased if you are facing timeouts when fetching data from CAST Extend, i.e. when the total time required for CAST Extend to build the bundle and then for ExtendCli to download it exceeds 3 hrs. CAST does NOT recommend decreasing this value.

...

Code Block
"SettingsPath": null

This setting (available in ≥ 2.1.1-funcrelis set by default to %PROGRAMDATA%\CAST\ExtendCLI and defines where the current instance of ExtendCli will store configuration settings and cache files. If you need to run multiple instances of ExtendCli on one machine, and you want to ensure clear separation of data between each instance, you can define a custom path for the configuration data using this option. For example to set the path to D:\CAST\temp\ExtendCli:

...