You can connect any AI assistant that can run commands in a terminal on your computer to your Cloudbees CD/RO server. After you connect the assistant, you describe a task in plain language, the assistant builds and runs the matching ectool command, and the result appears in the chat. You don’t need to type the commands yourself.
This page covers AI assistants from other companies that run on your computer. For the AI Assistant built into Cloudbees Unify, refer to Get started with the AI Assistant.
The Cloudbees Tools archive that contains ectool also contains ec-groovy, so the assistant can run Groovy scripts against Cloudbees CD/RO in the same way.
The assistant can only do what your Cloudbees CD/RO user has permission to do.
The steps are the same for every assistant. Only the way you start the assistant and approve the commands it runs differs, so follow your assistant’s own documentation for those two tasks. If your assistant can’t run commands, you can still follow this procedure by running the commands yourself in a terminal.
Prerequisites
Before you connect an AI assistant to Cloudbees CD/RO, make sure you have the following:
-
An AI assistant that can run commands in a terminal, installed and signed in with your work account.
-
The Cloudbees Tools archive, downloaded for the release that matches your Cloudbees CD/RO server and extracted to a directory you can find. For more information, refer to Install Cloudbees CD/RO Tools. If you are not sure which release your server runs, contact your Cloudbees CD/RO administrator.
-
The address of your Cloudbees CD/RO server, without
\https://. For example, if your Cloudbees CD/RO URL ishttps://cdro.example.com, usecdro.example.com. -
An access token for your Cloudbees CD/RO user account. For more information, refer to Create access tokens for your own user account.
Treat your access token like a password. Do not email it, post it in chat channels, or save it in a shared document. If a token is exposed, revoke it and create a new one. Tokens expire, so create a new token when yours expires.
Review the commands the assistant runs
Many assistants ask for approval before they run a command, or restrict network access.
Running ectool is a network call to your Cloudbees CD/RO server, so the assistant might ask you to approve it.
Review each command, and approve it only if it points to your own Cloudbees CD/RO server.
Do not turn off your assistant’s safety settings for all commands.
If you are unsure, contact your security team.
The assistant can run any command that your Cloudbees CD/RO user has permission to run. Asking the assistant to only read data is a request, not a restriction, so review every command before you approve it.
Connect the assistant to Cloudbees CD/RO
| Anything you type into the assistant’s chat is sent to the company that provides the assistant, including your access token. The token also stays in the conversation history. Check your company’s policy on sharing credentials with AI tools before you paste a token into the chat, and revoke the token when you no longer need it. To keep the token out of the chat, refer to Keep the token out of the chat. |
To connect your AI assistant to Cloudbees CD/RO, ask it to sign in with your access token, and then confirm the sign-in succeeded:
-
In your AI assistant, enter a message similar to the following:
Connect to CD/RO server cdro.example.com using ectool. My token is <your-access-token>. Only read data, do not change anything.(1)1 Replace cdro.example.comwith the address of your Cloudbees CD/RO server, and<your-access-token>with your access token.If
ectoolis not in the directory the assistant is working in, include the full path toectoolin your message, for example,/Users/<your-username>/Documents/CloudBeesFlowTools-<version>/bin/ectool.The assistant runs a command similar to the following:
ectool --server cdro.example.com login --token <your-access-token>If your users sign in to Cloudbees CD/RO through an external identity provider, you might need to sign in with ectool loginSsoinstead. For more information, refer to Use access tokens with ectool. -
Review the response. If the assistant is connected, the response includes a
sessionIdand youruserName, similar to the following:<response requestId="1"> <csrfId>...</csrfId> <sessionId>ABC123...</sessionId> <userName>your.name</userName> </response>The assistant stays signed in for its later commands. If you work with more than one Cloudbees CD/RO server, tell the assistant which server to use in each request.
The session belongs to the assistant.
If you sign in with ectool in a separate terminal, the assistant can’t use that session.
| Do not give the assistant your account password. A password typed into the chat is sent to the company that provides the assistant. |
Keep the token out of the chat
If you start your assistant from a terminal on macOS or Linux, you can save your access token in an environment variable and ask the assistant to sign in with the variable. The assistant reads the token from your computer, so the token isn’t sent to the company that provides the assistant.
-
Open a terminal and change to the
bindirectory of your Cloudbees Tools installation. -
Save your access token in an environment variable:
read -s CDRO_TOKEN export CDRO_TOKEN -
Paste your access token, and then press Enter. The terminal doesn’t show the token, and the token isn’t saved in your terminal history.
-
Start your AI assistant from the same terminal.
-
In your AI assistant, enter a message similar to the following:
Connect to CD/RO server cdro.example.com using ectool. Sign in with the access token in the CDRO_TOKEN environment variable, and don't print the token. Only read data, do not change anything.(1)1 Replace cdro.example.comwith the address of your Cloudbees CD/RO server.The assistant runs a command similar to the following:
ectool --server cdro.example.com login --token "$CDRO_TOKEN" -
Check that the response includes a
sessionIdand youruserName.
Example tasks
After you connect, describe the task you want to perform, and the assistant runs the matching command. The following table lists examples of tasks that only read data:
| Ask the assistant to | The assistant runs |
|---|---|
List all releases |
|
List all projects |
|
List the pipelines in the |
|
Get the details of the |
|
List the stages in the |
|
To list every ectool command, ask the assistant to run ectool --help.
To list the options for a single command, run the command with --help, for example, ectool getReleases --help.
For more information, refer to Use the Cloudbees CD/RO ectool API.
Create objects
To let the assistant make changes, remove the instruction to only read data, and then describe what you want to create. The assistant asks for any details it needs, such as names and the project to use.
For example, to create a pipeline with Dev, QA, and Production stages from the service catalog, the assistant runs a command similar to the following:
ectool runCatalogItem "Electric Cloud" "Pipelines" "Multi-stage CD Pipeline" \ --actualParameter pipelineName="MyApp-CD-Pipeline" \ --actualParameter pipelineProjName="Default"
The pipeline is created with placeholder tasks. To configure each task, open it in the Cloudbees CD/RO UI and select Requires Definition. The QA stage ends with an automatic gate that stops the pipeline if tests fail, and the Production stage starts with a manual approval gate.
To plan and track the work as well, create a release instead. A release contains the same Dev, QA, and Production pipeline, plus planned start and end dates. The assistant asks for the release name, the project, a description, and the two dates, and then runs a command similar to the following:
ectool runCatalogItem "Electric Cloud" "Releases" "Multi-stage CD Release" \ --actualParameter releaseName="MyApp-2026-Q3" \ --actualParameter releaseProjectName="Default" \ --actualParameter releaseDescription="Q3 2026 feature release" \ --actualParameter releaseStartDate="2026-07-01" \ --actualParameter releaseEndDate="2026-09-30"
Enter dates in the format YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SSZ to include a time.
Do not use the MM/DD/YYYY format.
Catalog and project names depend on your installation.
To find the catalog items available on your server, ask the assistant to list them first, for example, with ectool getCatalogs "<project-name>" and ectool getCatalogItems "<project-name>" "<catalog-name>".
Review each command before you approve it, especially commands that create, modify, or delete objects.