Getting Started

This page explains how to quickly get up and running with The Ops Platform.

You can also check out this video tutorial...

1. Create an account for The Ops Platform

To run any Op, you will need an account for The Ops Platform. Please sign up here.

2. CLI vs Slack

Installing the CLI will allow you to:

  1. Build and Publish new Ops
  2. Create Ops teams
  3. Run Ops in the terminal
  4. Share Ops via our registry

Installing our Slack App will allow you to:

  1. Run Slack Ops
  2. Enable your team members to run Slack Ops

3. CLI

To see the Slack App installation process, click here.

3.1 Prerequisites

You will need:

3.2 Installing the CLI

To install the Ops CLI, run:

npm install -g '@cto.ai/ops'

Once installed, run:

ops

This should display:

Screen-Shot-2020-02-19-at-1.52.56-PM

3.3 Signing in to your Ops account

You can sign in to your Ops account with:

ops account:signin

Once you are signed in, you can now run Ops with:

ops run <op name>

Try our demo Op @cto.ai/hello-world or take a look through our registry.

3.4 Creating an Op

To start a new Op, run:

ops init

Follow the interactive prompts to configure initial properties of your Op:

Language: This is the language you'll write your Op in. Potential language options would be, for example, JavaScript, Bash, Go, or Python.

Name: Your Op's name will be used in URLs, folders, and on the command line. For this reason, it needs to be alphanumeric, lowercase, and all-one-word. You can also include dashes (-) and underscores (_).

Description: Please enter a short description of what your Op does.

Version: You can enter any version identification information here, or press Enter to use the default.

Once you've completed this initial configuration, a folder with scaffold code will be generated. You are now ready to code!

After adding in your own code, build the op with:

ops build <path to op>

and you can now run your new Op locally.

3.5 Sharing Ops

Ops are shared via teams. By default, a team will be created with the same name as your username. You can verify this with:

ops whoami

You may prefer to keep this private for testing. To create a new team, run:

ops team:create

You can switch between active teams freely with:

ops team:switch

teamswitch

You can invite others to the team with:

ops team:invite

Once you are on your preferred team, you will need to publish your Op onto that team. Run:

ops publish <path to op>

allowing them to run your Op.

You can see the public ops with:

ops search

or take a look through our registry.

4. Slack

To see the CLI installation process, click here.

4.1 Installing the Slack beta

You can install our Slack app onto your Workspace here.

Once completed, you will be able to see the CTO.ai app in the lower left hand corner of your Slack workspace under Recent Apps.

4.2 Setting up

While the command to run Ops in the CLI is ops run <op-name>, in Slack the command is /ops run <op-name>.

Prior to running Ops in Slack, you will need to:

  1. Link your Ops account to your Slack account.
    08

  2. Link an Ops team* to a Slack channel.
    09

For simplicity, /ops run will default to getting you set up if you have not yet done so.

*Ops are published onto an Ops team to be shared. By default, the team name is the same name as the account.

Once everything has been linked, you can now run your Ops.

4.3 Joining

For other people to begin running Ops, they will need to link an Ops account to their own Slack account. This can still be done with /ops run.

When there is an Ops team already linked to a Slack channel, /ops run will first check if the user (based on the Ops account) is a member of that Ops team. If they aren't, a prompt will appear allowing them to request an invitation. Simply check the CTO.ai Slack app for notifications.