• Beta
CLI Commands
  • 12 Feb 2021
  • 6 Minutes To Read
  • Share
  • Dark
    Light

CLI Commands

  • Share
  • Dark
    Light

The CTO.ai CLI allows terminal users to perform a wide variety of tasks. The CLI is currently supported on MacOS and Linux (Windows is not yet supported).

For example, using the CLI, you can initialize a new Command, Pipelines, or Service, manage your teams, or publish workflows to which allows the to run remotely. Here is a list of commands that the CLI currently supports.

General Commands

▶️ ops help

Display information about the versions of the CLI and dependencies that are installed.

USAGE
$ ops help

▶️ ops status

See a short status of running Services.

USAGE
$ ops status

OPTIONS
-h, --help show CLI help

▶️ ops update

Update the CTO.ai CLI.

USAGE
$ ops update

OPTIONS
-h, --help show CLI help

▶️ ops whoami

Display your user information.

USAGE
$ ops whoami

OPTIONS
-h, --help show CLI help

Account Commands

▶️ ops account:reset

Reset your password.

USAGE
$ ops account:reset

▶️ ops account:signin

Log in to your account. This triggers a browser based signin/signup form that allows you to continue with OAuth providers or a username password set on signup.

USAGE
$ ops account:signin

OPTIONS
-h, --help               show CLI help
-i, --interactive        Interactive Mode
-p, --password=password  Password
-u, --user=user          Username or email

▶️ ops account:signout

Log out from your account.

USAGE
$ ops account:signout

OPTIONS
-h, --help show CLI help

▶️ ops account:signup

Create a CTO.ai account

USAGE
$ ops account:signup

OPTIONS
-h, --help show CLI help

▶️ ops account:support

Display ways to contact our support team with questions.

USAGE
$ ops account:support

OPTIONS
-h, --help show CLI help

** Commands**

▶️ ops add [OPNAME]

Add an Pipeline, Service, or Command to your team. ops add is copying from another team. When you ops add an item from our registry, it will be added to your team.

USAGE
$ ops add [OPNAME]

ARGUMENTS
OPNAME  Name of the public Command to be added to your team. It should be of the format - @teamname/opName:versionName

OPTIONS
-h, --help show CLI help

▶️ ops build [PATH]

Build your Pipline, Service, or Command locally.

USAGE
$ ops build [PATH]

ARGUMENTS
PATH Path to the Workflow you want to build.

OPTIONS
-h, --help show CLI help

▶️ ops cert [CERTIFICATETYPE] [NAMEORPATH]

Save an SSL certificate and key to your Service. Allows HTTPS with your CNAME.

$ ops certs [CERTIFICATETYPE] [NAMEORPATH]

ARGUMENTS
  CERTIFICATETYPE  (ssl) The type of certificate to store
  NAMEORPATH       Name or path of the ops.yml to save SSL for.

OPTIONS
  -h, --help             Show help screen
  --cert-file=cert-file  Path to your certificate file
  --key-file=key-file    Path to your key file

▶️ ops cleanup [OPNAME]

Clean up locally cached docker images.

USAGE
$ ops cleanup [OPNAME]

ARGUMENTS
OPNAME Name of the workflow to be cleaned up

OPTIONS
-h, --help show CLI help

▶️ ops help [COMMAND]

Display help for CTO.ai.

USAGE
$ ops help [COMMAND]

ARGUMENTS
COMMAND command to show help for

OPTIONS
--all see all commands in CLI

▶️ ops init

Easily create a new Pipeline, Service, or Command. When you run this command, a series of interactive configuration options will be presented. Scaffolded code will then be generated according to the selected options.

USAGE
$ ops init [NAME]

ARGUMENTS
NAME  the name of the op to create

OPTIONS
-h, --help show CLI help

▶️ ops list

List the Workflows you have added to your team.

USAGE
$ ops list

OPTIONS
-h, --help  show CLI help

▶️ ops publish [PATH]

Publish a local workflow to the team you are currently on.

USAGE
$ ops publish [PATH]

ARGUMENTS
PATH Path to the workflow you want to publish.

OPTIONS
-h, --help show CLI help

▶️ ops remove [OPNAME]

Remove an Pipeline, Service, or Command from your team.

USAGE
$ ops remove [OP]

ARGUMENTS
OP The name and version of the command or workflow you want to remove. E.g. my-command:0.1.0

OPTIONS
-h, --help show CLI help

▶️ ops run [NAMEORPATH]

Run an Workflow localy from your team.

If you workflow expects parameters, you can send them when using this command.

USAGE
$ ops run [NAMEORPATH] [PARAMS]

ARGUMENTS
NAMEORPATH Name or local path of the workflow you want to run.
PARAMS Optional params you can send to the workflow

OPTIONS
-B, --batch  Runs the op in non-interactive batch mode.
-b, --build  Builds the op before running. Must provide a path to the op.
-h, --help   show CLI help

▶️ ops start [NAMEORPATH]

Runs a Pipeline, Service, or Command remotely. See run above to run locally.

 $ ops start [NAMEORPATH]

ARGUMENTS
  NAMEORPATH  Name or path of the work you want to run remotely

▶️ ops search [FILTER]

Search for workflows in your Team and publically shared in our Registry

USAGE
$ ops search [FILTER]

ARGUMENTS
FILTER Filters workflow results which include filter text in workflow name or description.

OPTIONS
-h, --help show CLI help

Team Commands

See Teams
## ▶️ ops team:create

Create your team.

USAGE
$ ops team:create

OPTIONS
-h, --help show CLI help
-n, --name=name

▶️ ops team:info

Display details about your team and its members.

USAGE
$ ops team:info

OPTIONS
-h, --help show CLI help

▶️ ops team:invite

Invite users to join your CTO.ai team.

USAGE
$ ops team:invite

OPTIONS
-h, --help show CLI help

-i, -invitees=invitees A comma-separated string of usernames/emails we want to invite. E.g. ("user1,
[email protected], [email protected]")

▶️ ops team:join

Accept an invite to join a team workspace.

USAGE
$ ops team:join

▶️ ops team:remove

Show the selected team members list where you can select them to be removed.

USAGE
$ ops team:remove [MEMBER]

ARGUMENTS
MEMBER  The username of the team member you want to remove from the team.
  
OPTIONS
-h, --help show CLI help

▶️ ops team:switch

Shows the list of your teams that you are on and lets you switch your CLI context to one of them.

USAGE
$ ops team:switch

OPTIONS
-h, --help show CLI help

Secrets Commands

For more information on our Secrets features see the Secrets Management documentation

▶️ ops secrets:list

List secret stored for the active team.

USAGE
$ ops secrets:list

OPTIONS
-h, --help show CLI help

▶️ ops secrets:set

Add a key & value.

USAGE
$ ops secrets:set

OPTIONS
-f, --from-file=from-file  path to a file containing the value of the secret to set
-k, --key=key              the key of the secret to set
-v, --value=value          the value of the secret to set

▶️ ops secrets:delete

Delete a secret stored for the active team.

USAGE
$ ops secrets:delete

OPTIONS
-h, --help     show CLI help
-k, --key=key  Secret Key Name

▶️ ops secrets:register

Register a secrets provider for a team.

USAGE
$ ops secrets:register

OPTIONS
-h, --help     show CLI help

▶️ ops secrets:unregister

Unregister a secrets provider for a team.

USAGE
$ ops secrets:unregister

OPTIONS
-h, --help show CLI help

Configs Commands

For more information on our Configuration settings see the Configuration Managment document.

▶️ ops configs:list

List configs stored for the active team.

USAGE
$ ops configs:list

OPTIONS
-h, --help show CLI help

▶️ ops configs:set

Add a key & value.

USAGE
$ ops configs:set

OPTIONS
-f, --from-file=from-file  path to a file containing the value of the config to set
-k, --key=key              the key of the config to set
-v, --value=value          the value of the config to set

▶️ ops configs:delete

Delete a config stored for the active team.

USAGE
$ ops configs:delete

OPTIONS
-h, --help     show CLI help
-k, --key=key  Secret Key Name

🚀 What's next?

📞 Need help? No problem!


Was This Article Helpful?