CLI

Installation Command

RoostGPT binary is available at https://github.com/roost-io/roost-support/releases

Add the "roostgpt-<linux|macos|win.exe>" binary to your PATH environment variable

For Linux/MacOS,  you can execute the below command to install roostgpt

curl https://raw.githubusercontent.com/roost-io/roost-support/master/roostgpt.sh | bash -

CLI Commands

./roostGPT-macos   (for mac) &  ./roostGPT-win.exe (for windows)

This command is used to run the RoostGPT CLI on your operating system.

Instructions for creating .env file

An easy way to download the .env file is to use https://app.roost.ai/gptCLIForm

The .env file should be in the same folder path as RoostGPT binary.

Here is what the content of your .env file will look like:

# GIT env vars
GIT_TYPE=                    # Default is github; Supports [github, gitlab, azure, bitbucket, local]
HOSTED_TYPE=                 # Default is cloud; Supports [cloud, hosted]
GIT_HOSTED_URL=              # Required if HOSTED_TYPE=hosted
USE_SSH=                     # Optional; Default is false; Supports [true, false]; SSH based auth for Git
LOCAL_PROJECT_PATH=          # Required if GIT_TYPE is local, Path to your workspace.
SOURCE_GIT_CLONE_URL=        # Optional; the source repo clone URL
SOURCE_GIT_TOKEN=            # Required
SOURCE_OWNER_NAME=           # Required
SOURCE_REPO_NAME=            # Required
SOURCE_REPO_ID=              # Required for GIT_TYPE=gitlab
SOURCE_PROJECT_NAME=         # Required for GIT_TYPE=azure
SOURCE_PROJECT_ID=           # Required for GIT_TYPE=bitbucket
SOURCE_BASE_BRANCH=          # Required
SOURCE_RELATIVE_DIRECTORY=   # Optional; the relative path of the repository
SAME_TARGET_DETAIL=          # Optional; Default true, Supports [true, false]
DESTINATION_GIT_CLONE_URL=   # Optional; the destination repo clone URL
DESTINATION_GIT_TOKEN=       # Required if SAME_TARGET_DETAIL=false
DESTINATION_OWNER_NAME=      # Required if SAME_TARGET_DETAIL=false
DESTINATION_REPO_NAME=       # Required if SAME_TARGET_DETAIL=false
DESTINATION_REPO_ID=         # Required if SAME_TARGET_DETAIL=false and GIT_TYPE=gitlab
DESTINATION_PROJECT_NAME=    # Required for GIT_TYPE=azure
DESTINATION_PROJECT_ID=      # Required if SAME_TARGET_DETAIL=false and GIT_TYPE=bitbucket
DESTINATION_BASE_BRANCH=     # Required if SAME_TARGET_DETAIL=false

# Open AI env vars
OPENAI_API_MODEL=            # Optional; Default is gpt-4
OPENAI_API_KEY=              # Required if AI_TYPE=openai
AI_TEMPERATURE=              # Required if AI_TYPE=openai; Default value is 0.6

# Vertex AI env vars
VERTEX_FINE_TUNE=            # Optional; Default is false, Supports [true, false]
VERTEX_PROJECT_ID=           # Required if AI_TYPE=vertexai
VERTEX_REGION=               # Required if AI_TYPE=vertexai and VERTEX_FINE_TUNE=true
VERTEX_BEARER_TOKEN=         # Required if AI_TYPE=vertexai
VERTEX_MODEL=                # Required if AI_TYPE=vertexai; Supports [text-bison, code-bison, codechat-bison]

# Azure Open AI env vars
AZURE_OPENAI_ENDPOINT=       # Required if AI_TYPE=azure_open_ai
AZURE_DEPLOYMENT_NAME=       # Required if AI_TYPE=azure_open_ai
AZURE_OPENAI_KEY=            # Required if AI_TYPE=azure_open_ai
AZURE_OPENAI_VERSION=        # Optional Default is 2023-12-01-preview

# Open source env vars
OPEN_SOURCE_MODEL_ENDPOINT=  # Required if AI_TYPE=open_source_ai
OPEN_SOURCE_MODEL=           # Optional; Supports [meta-llama/Llama-2-13b-chat, HuggingFaceH4/starchat-beta]

# Jira board env vars
JIRA_HOST_NAME=              # Required if TEST_TYPE=functional and BOARD_TYPE=jira
JIRA_EMAIL=                  # Required if TEST_TYPE=functional and BOARD_TYPE=jira
JIRA_TOKEN=                  # Required if TEST_TYPE=functional and BOARD_TYPE=jira
JIRA_ID=                     # Optional if TEST_TYPE=functional and BOARD_TYPE=jira

# Azure board env vars
AZURE_ORG=                   # Required if TEST_TYPE=functional and BOARD_TYPE=azure
AZURE_PROJECT=               # Required if TEST_TYPE=functional and BOARD_TYPE=azure
AZURE_TOKEN=                 # Required if TEST_TYPE=functional and BOARD_TYPE=azure
AZURE_WORK_ITEM_ID=          # Optional if TEST_TYPE=functional and BOARD_TYPE=azure

# Log env vars
LOG_SOURCE=                  # Optional; Default is elks
LOG_SOURCE_PATH=             # Optional; the log file path
LOG_ELASTICSEARCH_URL=       # Optional; the Elastic search URL
LOG_ELASTICSEARCH_USER=      # Optional; the Elastic search user name
LOG_ELASTICSEARCH_TOKEN=     # Optional; the Elastic search token
LOG_ELASTICSEARCH_API_KEY=   # Optional; the Elastic search api key

# Behavioural test cases env vars
BEHAVIORAL_TEST_TYPE=        # Optional; Supports [gherkin]
BEHAVIORAL_TEST_SOURCE=      # Optional; Supports [file, gitpath, url]
BEHAVIORAL_TEST_FILE_PATH=   # Optional; path of the source file if source is file/gitpath. Relative path in case of gitpath.
BEHAVIORAL_TEST_URL=         # Optional; URL of the source file if source is url

# API Spec env vars
API_SPEC_TYPE=               # Optional; Supports [swagger, postman]
API_SPEC_SOURCE=             # Optional; Supports [file, gitpath, url]
API_SPEC_FILE_PATH=          # Optional; path of the source file if source is file/gitpath. Relative path in case of gitpath.
API_SPEC_URL=                # Optional; URL of the source file if source is url

# API test env vars
HTTP_VERBS_FOR_TESTING=      # Optional; Default is "get,post,put,patch,delete".The specific http methods are to be tested for all APIs. Enter "," separated values here. 
REGEX_HTTP_ENDPOINTS_FOR_TESTING= #Optional; Regex string that matches specific endpoints that need to be tested. If empty, all the endpoints will be tested.

# License env vars
ROOST_DOMAIN=                # Optional; Default is app.roost.ai
ROOST_TOKEN=                 # Required, the Roost token
TELEMETRY=                   # Optional; Default is true, Supports [true, false], send telemetry data to roost, no private information is shared.

# Additional vars
TEST_NAME=                   # Optional; Default is roost-test
ROOST_DIR=                   # Optional; Default is /var/tmp/Roost/RoostGPT
LANGUAGE=                    # Optional; Default is java; Supports [java, go, python, csharp, nodejs]
AI_TYPE=                     # Optional; Default is openai; Supports [openai, vertexai, azure_open_ai, open_source_ai]
PACKAGES_TO_SCAN=            # Required for LANGUAGE=java, the package to scan and generate test for example - com.demo.sample
ITERATION=                   # Optional; Default is 2
TIMEOUT=                     # Optional; Default is 1 hour
TEST_TYPE=                   # Optional; Default is unit Supports [unit, functional, artillery, artillery-api-spec, integration]
RETRIGGER=                   # Optional; Default is false, Supports [true, false]
TRIGGER_ID=                  # Unique id to identify multiple triggers; Default is epoch
BOARD_TYPE=                  # Optional; Default is jira; Supports [jira, azure, none]
GIT_PR_URL=                  # The Git PR URL  of the generated test
MAX_DEPTH=                   # Optional; Default is -1; if MAX_DEPTH is -1, it will traverse all the sub directories else the maximum depth directories to look for
TEST_FRAMEWORK=              # Optional; Default is "pytest" for Python, "gotest" for Golang, "junit" for Java, "nunit" for CSharp and "jest" for Node.js "postman" for Postman test-script. Supports [pytest, unittest] for Python, [gotest] for Golang, [junit] for Java, [nunit] for Csharp and [jest] for Node.js [postman, artillery, rest-assured] for [test_type: api-spec-test]
FUNCTIONS_TO_TEST=           # Optional;  list of function names to be tested, separated by comma. Name to be specified as module.[class.]method OR module.function
USE_ASSISTANT=               # Optional: Use Assistant feature in openai. Default:false


# Improve test env vars
IMPROVE_TEST=                # Optional; Default is false, Supports [true, false]
FILE_PATH=                   # Required if IMPROVE_TEST=true
USER_CONTENT=                # Required if IMPROVE_TEST=true
TESTSCRIPT_ENDPOINT=         # Required if IMPROVE_TEST=true and TEST_FRAMEWORK=postman
Here's a description of each variable:
# Git env vars
# Open AI env vars
# AZURE Open AI env vars
# Vertex AI env vars
# Open Source AI env vars
# Jira board env vars
# Azure board env vars
# Log env vars
# Behavioural Test cases env vars
# API Spec env vars
# API test env vars
# License env vars
# Additional vars
# Improve Test env vars

Revision #22
Created 14 June 2023 08:07:49 by Divyesh
Updated 7 February 2024 04:55:50 by Divyesh