Bash SDK: ux

Supported methods

The following UX elements are supported by the Bash SDK:

  • Format
  • Print
  • ProgressBars
  • Spinners

Different from the other CTO.ai SDKs, Bash has the UX elements at the top level to improve usability of these elements. For example, print is accessed by cto-ai print instead of cto-ai ux print.

Format

Formats text with rich styling

USAGE:

SUBCOMMANDS:

Bold:

Formats the provided text as boldface

USAGE:

EXAMPLE:

Italic:

Formats the provided text as italics. Note: italic support in terminals is limited.

USAGE:

EXAMPLE:

Print

Displays text to the user.

USAGE:

ARGS:

Example:

Output:

Progressbar

Displays progress bars to the user.

USAGE:

SUBCOMMAND:

Advance:

USAGE:

ARGS:

Start:

USAGE:

OPTIONS:

Stop:

USAGE:

OPTIONS:

Example:

Output:

Spinner

Displays spinners to the user

USAGE:

SUBCOMMAND:

Start:

USAGE:

OPTIONS:

Stop:

USAGE:

OPTIONS:

Example:

Output: