Configuring Commands

Configuring Commands

Using CTO.ai Commands lets you configure containerized workflows that your team can use from our CLI or our Slack integration. For more complex development processes, Commands can be integrated with each other, as well as with Pipelines and Services workflows, to build a reliable, interactive DevOps playbooks for your team.

ℹ️
Commands Overview
For a high-level overview of our Commands workflows and their use cases, be sure to have a look at our Commands Overview in the Getting Started section of our docs.

We currently offer Commands SDKs with support for Python, Node, Go, and Bash runtimes. Our SDKs provide a straightforward way to send Lifecycle Event data to your CTO.ai Dashboard, prompt users interactively, and integrate with other systems.

Structure of Commands Workflows

There are three main components that comprise any given workflow:

  • ops.yml
  • Dockerfile (and a corresponding .dockerignore file)
  • Your custom code

For a deeper explanation of the ops init subcommand and the scaffolding generated by our CLI, our Workflows Overview document has you covered.

Commands Workflow Reference

To help you better understand how Commands workflows are structured, we have included an explanation of the scaffolding template generated for each of our SDK languages below. Let’s have a look at what is generated when we create a new Commands workflow with our CLI.

Create a Commands Workflow (ops init)

The CTO.ai ops CLI provides a subcommand to create scaffolding files for your workflow: ops init. You can use the -k flag to specify the kind as a command workflow, as well as pass an optional argument to give the workflow a name (example-command, in this case):

Usage Example: ops init
ops init -k command example-command

After you respond to the CLI’s interactive prompting, it will generate template code for your new Commands workflow.

Workflow Scaffolding Code