TWS remote CLI for a personal PC advantages:
Once the remote CLI software was deployed (it also can be copied from an already installed source, installation is not mandatory) perform the following tasks for a better view and easier access:
X. To take full advantage of the remote CLI I recommend to use Windows PowerShell rather the default command line.
- You can skip using the TDWC which in is slow and hard to use for big / massive changes.
- No need to connect to any host.
- Configure and personalize the editor (which for local CLI is the OS default one).
Once the remote CLI software was deployed (it also can be copied from an already installed source, installation is not mandatory) perform the following tasks for a better view and easier access:
1. Create a *.cmd (e.g. TWS_CLI_Start.cmd) file that is setting up the global variables before launching the composer, and use it to start the remote CLI (more details can be found HERE):
@echo off
set MAESTRO_OUTPUT_STYLE=LONG
set MAESTROLINES=0
set MAESTROCOLUMNS=520
"%CD%\bin\composer.exe"
2. Adjust the localopts file, personalize tp make sure there wont be any confusions to which TWS environment are you connected / working on (all the lines can be removed except the below ones):
e.g. TWS1 env.
############## Attributes of this Workstation: ##############
composer prompt =TWS1>
############## Attributes for CLI connection ##############
HOST   =   TWS1.company.com 
PROTOCOL   =   https
PORT   =   31116
TIMEOUT   =   3600
IS REMOTE CLI = yes
e.g. TWS2 env.
############## Attributes of this Workstation: ##############
composer prompt =TWS2>
############## Attributes for CLI connection ##############
HOST   =   TWS2.company.com 
PROTOCOL   =   https
PORT   =   31116
TIMEOUT   =   3600
IS REMOTE CLI = yes
I personally have multiple versions of localopts files and i'm overwriting the localopts file based on the needs. (e.g. localopts_TWS1, localopts_TWS2 and based on which TWS env. i want to connect i'm copying its localopts_XXX file over localopts)
3. Once the user password expired you need to re-add it (as per first use), the first step that needs to be performed is to remove the useropt file from the user profile home and this can be automated by creating a *.cmd, file using the below commands:
@echo off
del "%USERPROFILE%\.TWS\useropts"
"%CD%\TWS_CLI_Start.cmd"
4. You can adjust the default Windows editor which will be used in editing composer modify commands: