• Beta
CLI Commands
  • 09 Sep 2020
  • 5 Minutes To Read
  • Share
  • Dark
    Light

CLI Commands

  • Share
  • Dark
    Light

The Ops Platform includes a command-line interface (called "the CLI") that 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 Op, manage your teams, or publish Ops to the CTO.ai registry. 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 update

Update the Ops 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 an account to use with The Ops Platform.

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

Op Commands

▶️ ops add [OPNAME]

Add an Op to your team. ops add is favoriting an Op from another team. When you ops add a public Op, you will see it in the list of your team's Ops.

USAGE
$ ops add [OPNAME]

ARGUMENTS
OPNAME  Name of the public Op 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 Op for sharing or testing.

USAGE
$ ops build [PATH]

ARGUMENTS
PATH Path to the Op you want to build.

OPTIONS
-h, --help show CLI help

▶️ ops cleanup [OPNAME]

Clean up locally cached docker images.

USAGE
$ ops cleanup [OPNAME]

ARGUMENTS
OPNAME Name of the Op to be cleaned up

OPTIONS
-h, --help show CLI help

▶️ ops help [COMMAND]

Display help for The Ops CLI.

USAGE
$ ops help [COMMAND]

ARGUMENTS
COMMAND command to show help for

OPTIONS
--all see all commands in CLI

▶️ ops init

Easily create a new Op. 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 Ops you have in your team.

USAGE
$ ops list

OPTIONS
-h, --help  show CLI help

▶️ ops publish [PATH]

Publish an Op to the team you are currently on.

USAGE
$ ops publish [PATH]

ARGUMENTS
PATH Path to the Op you want to publish.

OPTIONS
-h, --help show CLI help

▶️ ops remove [OPNAME]

Remove an Op 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 Op from your team or the registry.

USAGE
$ ops run [NAMEORPATH]

ARGUMENTS
NAMEORPATH Name or path of the Op you want to run.

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 search [FILTER]

Search for Ops in your workspaces and publically shared Ops.

USAGE
$ ops search [FILTER]

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

OPTIONS
-h, --help show CLI help

Team Commands

▶️ 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 other Ops Platform users to join your team workspace.

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.

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?

Was This Article Helpful?