Using the SDK

SDK Features and Usage

The CTO.ai workflow SDKs are available in a number of different languages. CTO.ai understands your workflow and provides different SDKs to handle events, track deployment state, seamless deploy of your applications, prompts objects, and ux functions.

Each language comes with a managed base image that enables the workflow to run across different contexts in the control plane such as the CLI, Slack or Event driven workflows.

We maintain consistency across each of the SDKS, you can choose the SDK you’d like to use based on the features that are important to you.

The matrix below covers most of the critical SDK features that are available and their compatibility in each runtime. The chart explains which feature is available to eash language.

You can build workflows, run different methods and functions using our SDK.

Each SDK framework and configuration is opensource and we would love your feedback and ideas to make it better!

We suport the following methods for our SDK:

  • GetHostOS
  • GetInterfaceType
  • GetSecret
  • GetStatePath
  • HomeDir
  • SetSecret
  • Track
  • GetState
  • SetState
  • GetConfig
  • GetAllConfig
  • SetConfig
  • user
  • team
FeatureNode.jsPythonGolangShell
sdk.getHostOS
sdk.getInterfaceType
sdk.getConfigPath
sdk.homeDir
sdk.(get/set)Config
sdk.(get/set)Secret
sdk.track
sdk.events
ux.print
ux.(start/stop)Spinner
ux.(start/advance/stop)ProgressBar
ux.table
ux.tree
ux.url
input prompt
number prompt
confirm prompt
list prompt
autocomplete prompt
checkbox prompt
secret prompt
password prompt
datetime prompt

We support the following UX elements:

  • Format
  • Print
  • ProgressBars
  • Spinners

We support the following Prompts

  • Checkbox
  • Confirm
  • Datetime
  • Editor
  • Input
  • List
  • Number
  • Password
  • Secret

Legend

  • Available as an environment variable
  • Only works with local
  • Option on list type in Golang and Shell