CLI Manual
This is the manual for the ops CLI.
Name
ops - interact with the CTO.ai platform from your terminal
Synopsis
ops COMMAND [arguments]
Description
ops is the CLI that allows you to interactively run CTO.ai workflows,
configure environment variables, and manage your team from the command line.
General Commands
This section highlights some important utility subcommands available
through the CTO.ai ops CLI.
opshelpopshelpCOMMANDList all available commands and usage instructions.
Arguments COMMANDname of the command to get help for
opsupdateUpdate your local CLI to the latest version.
opswhoamiDisplay basic information about the current user, including the email and username associated with this account, as well as the name of the current active team.
opsgenerate:tokenGenerate a long live access token.
opscleanupopscleanupWORKFLOWClean up locally cached docker images.
Arguments WORKFLOWthe workflow to be cleaned up
Workflow Commands
Here is a short summary of the subcommands available through the CTO.ai
ops CLI that can be used to manage and run your workflows.
Managing Workflows
opsinitopsinitNAMECreate a new Workflow.
This command allows you to create new Commands, Pipelines, or Services workflows interactively from your command line. It will generate scaffolding code according to the options you select.
Arguments NAMEname of the workflow to create or the GitHub URL of a template
Options - -j
- --jobs
generate local template files for Pipeline jobs
- -k
- --kind =KIND
specify a
command,pipeline, orserviceworkflow- -t
- --template =TEMPLATE
specify the name of the template to use
opslistLists the Workflows you have in your team.
opssearchopssearchFILTERSearch for available workflows.
Search for workflows that have been published to your team or shared publicly in our Registry. Running this command without the optional
FILTERargument will allow you to search for workflows interactively.Arguments FILTERfilters workflow results to include results with the
FILTERin their name
opsaddopsaddWORKFLOW_NAMEAdd a Commands, Pipelines, or Services workflow to your team.
Use this command when you want to add a workflow to your team that is available through another team or our public registry. This will add the command from the public registry to your team.
Running this command without a
WORKFLOW_NAMEallows you to select a workflow to add interactively.Arguments WORKFLOW_NAMEname of the public workflow to add to your team
opsbuildopsbuildPATHBuild your Commands, Pipelines, or Services workflows locally, to run or publish.
Arguments PATHpath to the workflow to be built
Options - --nocache
don’t use cache when building image
- --ops =WORKFLOWS
list of workflows from the
ops.ymlfile to build
Usage Examples - ops build ./ops.yml --ops commandName pipelineName serviceName
This command will build the workflows named
commandName,pipelineName, andserviceNamefrom theops.ymlfile in the local directory.
opspublishopspublishPATHPublish a local workflow to your current CTO.ai team.
Arguments PATHpath to the workflow to be published
Options - -c
- --changelog =MSG
provide a changelog message describing the changes being published
- -o
- --ops =WORKFLOWS
provide the list of workflows you wish to publish
- --nocache
do not use cache when building the image
opscertsopscertsCERTIFICATE_TYPEopscertsCERTIFICATE_TYPENAME_OR_PATHSave an SSL certificate and key for your service. This is used to configure HTTPS for your CNAME.
Arguments CERTIFICATE_TYPEthe type of certificate to save
NAME_OR_PATHthe name or path of the
ops.ymlwhich shold be used to save the certificate
Options - --cert-file =FILE
path to your certificate file
- --key-file =FILE
path to your key file
opsremoveopsremoveWORKFLOWRemove a workflow from your CTO.ai team.
Arguments WORKFLOWname and version of the workflow to remove from your team (e.g.
my-command:0.1.0). Do not pass a workflow version to this argument if using the--allflag.
Options - --all =ALL
remove all versions of a workflow from your current team
Running Workflows
opsrunopsrunNAME_OR_PATHopsrunNAME_OR_PATHPARAMSRun a workflow from your team or the registry.
If the workflow being run expects parameters, you can send them with this command.
Arguments NAME_OR_PATHname or local path of the workflow to run
PARAMSoptional parameters to send to the workflow
Options - -B
- --batch
runs your workflow in non-interactive batch mode
- -b
- --build
build the workflow before running it
- --nocache
do not use cache when building the image
opsstartopsstartNAME_OR_PATHStart a service, pipeline or command on our cloud.
Arguments NAME_OR_PATHname or local path of the workflow to run
opsstatusSee the status of currently running cloud services.
opsstopopsstopRUNIDStop a Command, Pipeline, or Service running on the CTO.ai platform.
Arguments RUNIDthe Run ID of the Command, Pipeline, or Service to stop
Account Commands
Here is a short summary of the subcommands available for managing your account on the CTO.ai platform.
opsaccount:resetReset your account password.
opsaccount:signinLog in to your account.
Running this command triggers a browser-based signin flow that allows you to log in to your account as your would on the web, as well as sign in with OAuth providers like GitHub.
Options - -i
- --interactive =INTERACTIVE
run in interactive mode
- -p
- --password =PASS
send your password as an optional argument
- -u
- --user =USER
send your username as an optional argument
- -t
- --team =TEAM
specify which team to sign in to
opsaccount:signoutLog out from your account.
opsaccount:signupCreates an account from the CLI.
Running this command triggers a browser-based signup flow that allows you to create an account as your would on the web, as well as sign in with OAuth providers like GitHub.
opsaccount:supportDisplays the methods you can use to contact our support team with questions.
Configs Commands
Here is a short summary of the subcommands available for managing your Configs Store on the CTO.ai platform.
opsconfigs:listList all the keys that are in the Configs Store for the active team.
opsconfigs:setAdd a key-value pair to the Configs Store for the active team.
When this command is run without any arguments, it will interactively prompt you for a key. Then, it opens an editor to specify the value for this key-value pair, allowing you to specify values with complex content, like JSON objects.
The optional
--keyargument allows you to specify the key to set directly on the command line, without being prompted interactively.The
--from-fileand--valuearguments allow you to specify the value to set, from either an existing plaintext file containing the value (using--from-file) or directly on the command line (using--value).Options - -f
- --from-file =FILE
specify a file containing a value for this Config
- -k
- --key =KEY
the
KEYrepresenting the Config you wish to set- -v
- --value =VALUE
directly specify a value to be set for this Config
opsconfigs:deleteDelete a Config stored for the active team
When this command is run without any arguments, it will interactively prompt you for the key of the Config to delete.
Options - -k
- --key =KEY
specify the
KEYof the Config to be deleted
Secrets Commands
Here is a short summary of the subcommands available for managing your Secrets Store on the CTO.ai platform.
opssecrets:listList all the keys that are in the Secret Store for the active team.
The values of Secrets are kept hidden for security reasons.
opssecrets:setAdd a key-value pair to the Secret Store for the active team.
When this command is run without any arguments, it will interactively prompt you for a key. Then, it opens an editor to specify the value for this key-value pair, allowing you to specify values with complex content, like JSON objects.
The optional
--keyargument allows you to specify the key to set directly on the command line, without being prompted interactively.The
--from-fileand--valuearguments allow you to specify the value to set, from either an existing plaintext file containing the value (using--from-file) or directly on the command line (using--value).Using the
--valueparameter isn’t recommended, as the value you specify will be visible in your shell history. Instead, use the--from-fileparameter to specify the contents of a file as the Secret’s value.Options - -f
- --from-file =FILE
specify a file containing a value for this Secret
- -k
- --key =KEY
the
KEYrepresenting the Secret you wish to set- -v
- --value =VAL
directly specify a value to be set for this Secret
opssecrets:deleteDelete a secret stored for the active team
When this command is run without any arguments, it will interactively prompt you for the key of the Secret to delete.
Options - -k
- --key =KEY
specify the
KEYof the secret to be deleted
opssecrets:registerRegister a secrets provider for the active team.
This feature allows you to register your own HashiCorp Vault, which we will then use to manage Secrets for your team.
opssecrets:unregisterUnregister a secrets provider for the active team.
This feature allows you to unregister the custom Secrets provider from your active team.
Team Commands
Here is a short summary of the subcommands available for managing your team on the CTO.ai platform.
opsteam:infoShows basic team information for the current active team.
opsteam:switchopsteam:switchTEAMNAMESwitch which team is currently active in your CLI context.
If you don’t pass the optional TEAMNAME argument, this command will present a list of teams you belong to and allow you to choose which one to switch to interactively.
Arguments TEAMNAMEoptionally pass the name of the team to switch to
opsteam:createCreate a new team on the CTO.ai platform.
Options - -n
- --name =NAME
the name of the team to be created
opsteam:inviteInvite users to join your CTO.ai team.
Options - -i
- --invitees =INVITEES
A comma-separated string of usernames or emails to invite to the team. We recommend surrounding the value in quotes.
opsteam:joinAccept an invite to join a team.
opsteam:leaveRemove yourself from the current active team.
opsteam:listShows the list of your teams.
opsteam:removeopsteam:removeMEMBERRemove a user from your team.
Arguments MEMBERoptionally pass the username of the team member to be removed