UNPKG

@pradyumn-el/pollycli

Version:

pollycli lets users access the functionalities of Polly over a command line interface

269 lines (197 loc) 11.3 kB
import chalk from 'chalk'; //--------------------------------------------------------- export const main = `${chalk.bold('Options:')} usage: polly login or polly logout or polly whoami or polly jobs [options] or polly workspaces [options] or polly files [options] or polly dockers [options] run ${chalk.green.italic('polly [options] --help')} for more information about each of the options.` //----------------------------------------------------------- export const jobs = `${chalk.bold('Options:')} usage: polly jobs submit [arguments] or polly jobs status [arguments] or polly jobs logs [arguments] or polly jobs cancel [arguments] run ${chalk.green.italic('polly jobs [options] --help')} for more information about each of the options.` //----------------------------------------------------------- export const job_cancel = `${chalk.bold('Options:')} usage: polly jobs cancel [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace where the job should be created --job-file : Path to the .json file which contains the job description example ${chalk.green.italic('polly jobs cancel --workspace-id 1234 --job-id abcf5tdghhdfy')}` //----------------------------------------------------------- export const job_submit = `${chalk.bold('Options:')} usage: polly jobs submit [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace where the job should be created --job-file : Path to the .json file which contains the job description example ${chalk.green.italic('polly jobs submit --workspace-id 1234 --job-file /path/to/json/file')}` //----------------------------------------------------------- export const job_status = `${chalk.bold('Options:')} usage: polly jobs status [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace where the job is created --job-id : ID of the job created example ${chalk.green.italic('polly jobs status --workspace-id 1234 --job-id abcf5tdghhdfy')}.` //-------------------------------------------------------------- export const job_logs = `${chalk.bold('Options:')} usage: polly jobs logs [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace where the job is created --job-id : ID of the job created example ${chalk.green.italic('polly jobs logs --workspace-id 1234 --job-id abcf5tdghhdfy')}.` //----------------------------------------------------------- export const login = `${chalk.bold('Options:')} usage: polly login [arguments] ${chalk.bold('Arguments:')} --auto : automatically login to Polly if the right system environment variables are present. If --auto argument is not passed it will ask for Polly credentials to login.` //----------------------------------------------------------- export const logout = `${chalk.bold('No options:')} We will log you out.` //----------------------------------------------------------- export const whoami = `${chalk.bold('No options:')} Will display the user currently logged in.` //------------------------------------------------------------ export const unknown = `${chalk.bold('Options:')} If you want this feature we will build it for you. Get in touch with our customer success team and start discussing the feature.` //----------------------------------------------------------- export const workspaces = `${chalk.bold('Options:')} usage: polly workspaces list [arguments] or polly workspaces create [arguments] run ${chalk.green.italic('polly workspaces [options] --help')} for more information about each of the options.` //------------------------------------------------------------ export const workspaces_list = `${chalk.bold('Options:')} usage: polly workspaces list [arguments] ${chalk.bold('Arguments:')} --all : Lists all the workspaces you have in Polly or --latest : Takes in a number as input and lists the latest n workspaces or --oldest : Takes in a number as input and lists the oldest n workspaces example ${chalk.green.italic('polly workspaces list --all')}` //------------------------------------------------------------- export const workspaces_create = `${chalk.bold('Options:')} usage: polly workspaces create [arguments] ${chalk.bold('Arguments:')} --workspace-name : Name by which you want to identify the workspace. If the name has more than one words use quotes to wrap the name. --workspace-description : Description of the workspace. Use quotes to wrap the description. example ${chalk.green.italic('polly workspaces create --workspace-name "My Workspace" --workspace-description "My description"')}` //-------------------------------------------------------------- export const files = `${chalk.bold('Options:')} usage: polly files sync [arguments] or polly files list [arguments] or polly files copy [arguments] run ${chalk.green.italic('polly files [options] --help')} for more information about each of the options.` //-------------------------------------------------------------- export const files_list = `List the files and folder in a given directory ${chalk.bold('Options:')} usage: polly files list [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace --workspace-path : Path on the given workspace. Workspace path should start with polly:// example ${chalk.green.italic('polly files list --workspace-id 1234 --workspace-path polly://directory1/')}.` //-------------------------------------------------------------- export const files_sync = `To sync directories from local to polly or from polly to local ${chalk.bold('Options:')} usage: polly files sync [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace --source : Source can be polly workspace path or local path. Polly workspace path should start with polly:// --destination : Destination can be polly workspace path or local path. Polly workspace path should start with polly:// examples: from polly to local : ${chalk.green.italic('polly files sync --workspace-id 1234 --source polly://directory1/ --destination ./')}. from local to polly : ${chalk.green.italic('polly files sync --workspace-id 1234 --source ./ --destination polly://directory1/')}.` //-------------------------------------------------------------- export const files_copy = `To sync files from local to polly or from polly to local ${chalk.bold('Options:')} usage: polly files copy [arguments] ${chalk.bold('Arguments:')} --workspace-id : ID of the workspace --source : Source can be polly workspace path or local path. Polly workspace path should start with polly:// --destination : Destination can be polly workspace path or local path. Polly workspace path should start with polly:// examples: from polly to local : ${chalk.green.italic('polly files copy --workspace-id 1234 --source polly://directory1/file.xzy --destination ./file.xzy')}. from local to polly : ${chalk.green.italic('polly files copy --workspace-id 1234 --source ./file.xzy --destination polly://directory1/file.xzy')}.` //-------------------------------------------------------------- export const dockers = `${chalk.bold('Options:')} usage: polly dockers login or polly dockers logout or polly dockers create [arguments] or polly dockers list [arguments] or polly dockers commit-list [arguments] or polly dockers update [arguments] or polly dockers build [arguments] or polly dockers build-status [arguments] run ${chalk.green.italic('polly dockers [options] --help')} for more information about each of the options.` //-------------------------------------------------------------- export const docker_logout = `${chalk.bold('No options:')} Copy the output of this Polly command and run it on the terminal. Add sudo before the command if required.` //----------------------------------------------------------- export const docker_create = `To create a docker repository ${chalk.bold('Options:')} usage: polly dockers create [arguments] ${chalk.bold('Arguments:')} --name : Name of the docker repository to be created --description : Description for the docker repository. Use quotes to wrap the description --public : To make a public docker. If private docker pass -y without passing --public examples: for making public docker repository ${chalk.green.italic('polly dockers create --name abcd --description "This is the repository description"')}. for making private docker repository ${chalk.green.italic('polly dockers create --name abcd --description "This is the repository description" --public')}.` //-------------------------------------------------------------- export const docker_update = `To update a docker repository ${chalk.bold('Options:')} usage: polly dockers update [arguments] ${chalk.bold('Arguments:')} --name : Name of the docker repository to be created --public : To make a public docker. If not passed user will be asked to make a choice examples: for making docker repository public ${chalk.green.italic('polly dockers create --name abcd --public')}.` //-------------------------------------------------------------- export const docker_list = `To list all the docker repositories ${chalk.bold('Options:')} usage: polly dockers list [arguments] ${chalk.bold('Arguments:')} --all : List all the docker repositories example ${chalk.green.italic('polly dockers list --all')}.` //-------------------------------------------------------------- export const docker_commit_list = `To list all the docker commits for a given repository ${chalk.bold('Options:')} usage: polly dockers commit-list [arguments] ${chalk.bold('Arguments:')} --name : Name of the dockers repository --all : List all the docker repositories example ${chalk.green.italic('polly dockers commit-list --name abcd --all')}.` //-------------------------------------------------------------- export const docker_build = `To build the docker in a given directory ${chalk.bold('Options:')} usage: polly dockers build [arguments] ${chalk.bold('Arguments:')} --name : Name of the dockers repository with tag --path : Path to the directory in which Docker file is present or path to the Dockerfile example ${chalk.green.italic('polly dockers build --name polly.elucidata.io/elucidata/ml:latests --path path/to/Dockerfile')}.` //-------------------------------------------------------------- export const docker_build_status = `To list the status of build(s) ${chalk.bold('Options:')} usage: polly dockers build-status [arguments] ${chalk.bold('Arguments:')} --id : (Optional) Id for a given build example ${chalk.green.italic('polly dockers build-status --id <id-for-the-build>')}.` //-------------------------------------------------------------- export const apps = `${chalk.bold('Options:')} usage: polly apps logs [arguments] run ${chalk.green.italic('polly apps [options] --help')} for more information about each of the options.` //----------------------------------------------------------- export const apps_logs = `To access the logs for a shiny/desktop/dockerized application run ${chalk.bold('Options:')} usage: polly apps logs [arguments] ${chalk.bold('Arguments:')} --run-id : Unique run ID for an analysis --log-id : Unique Id for a log (Optional) example ${chalk.green.italic('polly apps logs --run-id 1234 --log-id <log-id>')}.`