Getting Started

View as Markdown

Install and set up the bdy command-line interface.

Prerequisites

  • A Buddy account (buddy.works)
  • For npm installation: Node.js 14 or higher

Installation

macOS / Linux:

bash
sudo npm i -g bdy
$

Windows:

powershell
npm i -g bdy

Homebrew (macOS)

bash
brew tap buddy/bdy
brew install bdy
$$

APT (Linux x64 / ARM64)

bash
sudo apt-get update && sudo apt-get install -y curl
sudo curl -fsSL -o /usr/share/keyrings/buddy.asc https://es.buddy.works/bdy/apt-repo/buddy.asc
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/buddy.asc] https://es.buddy.works/bdy/apt-repo prod main" | sudo tee /etc/apt/sources.list.d/buddy.list > /dev/null
sudo apt-get update && sudo apt-get install -y bdy
$$$$

For ARM64, replace arch=amd64 with arch=arm64.

Chocolatey (Windows)

powershell
choco install bdy --pre

Direct Download

macOS (Apple Silicon):

bash
sudo mkdir -p -m 755 /usr/local/bin
curl https://es.buddy.works/bdy/prod/1.15.6/darwin-arm64.tar.gz -o bdy.tar.gz
sudo tar -zxf bdy.tar.gz -C /usr/local/bin/
$$$

Linux x64:

bash
curl https://es.buddy.works/bdy/prod/1.15.6/linux-x64.tar.gz -o bdy.tar.gz
sudo tar -zxf bdy.tar.gz -C /usr/local/bin/
$$

Linux ARM64:

bash
curl https://es.buddy.works/bdy/prod/1.15.6/linux-arm64.tar.gz -o bdy.tar.gz
sudo tar -zxf bdy.tar.gz -C /usr/local/bin/
$$

Windows x64:

powershell
curl https://es.buddy.works/bdy/prod/1.15.6/win-x64.zip -o bdy.zip
tar -xf bdy.zip

Verify Installation

bash
bdy version
$

Sign Up & Log In

Create an account from the CLI

Create a Buddy account from the CLI:

bash
bdy register
$

The command prompts you to select a region (us, eu, or as) and enter the account details. You can also provide them as command options:

bash
bdy register --region eu --email you@example.com --name "Your Name"
$

After registration, the CLI authenticates the new account automatically. A separate bdy login command is not required.

Log in to an existing account

bash
bdy login
$

To skip the interactive prompts, authenticate with a personal access token:

bash
bdy login --token <your-token> --workspace <workspace-handle>
$
Option Description
--region <us|eu|as> Region where the workspace is hosted
-w, --workspace <handle> Workspace URL handle
--token <token> Personal access token (skips interactive login)
--api <url> API URL for On-Premises installations

Both --region and --api can also be set via the BUDDY_REGION and BUDDY_API_ENDPOINT variables.

Log out

bash
bdy logout
$

Using bdy in pipelines

To run bdy commands inside a pipeline, add the Buddy CLI action. It runs your commands in a container with bdy preinstalled and logged in, so there is no installation or bdy login step.

The action authenticates with a Buddy integration. To add one, go to Integrations, click New integration, and select Buddy. Choose the scope (workspace, project, or environment) and authorize with OAuth or a personal access token:

Image loading...Buddy integration settings

Then add the Buddy CLI action to the pipeline, select the integration, and enter the commands:

Image loading...Buddy CLI action settings

Buddy injects the token, the API endpoint, and the current workspace and project into the container, so commands work without -w and -p flags:

yaml
- action: Smoke test in a sandbox
  type: BDY_CLI
  integration: buddy-cli
  commands: |-
    SB="smoke-$BUDDY_RUN_ID"
    bdy sb create -i "$SB" -n "Smoke test #$BUDDY_RUN_ID" --fetch --app-command "npm start" --timeout 900 --wait-for-apps 180
    bdy sb exec command "$SB" "curl -fsS localhost:3000/health" --wait
    bdy sb destroy "$SB" -f
Field Description
integration Buddy integration used to authenticate bdy (required)
commands Commands to run (required)
shell SH (default) or BASH (needed for Bash syntax like [[ ]])
setup_commands Commands that prepare the action image, for example by installing additional tools. The prepared image is cached and reused in subsequent runs
Warning
The Buddy CLI action has the same access as the selected integration. Its access is not limited to the project containing the pipeline. Depending on the integration configuration, commands may access other projects, pipelines, and sandboxes in the workspace or in other authorized workspaces. Limit the integration to the workspaces and permissions required by the pipeline.
Info
The action image is a minimal Ubuntu with bdy. Tools like git, jq, or Node.js are not included - install them with setup_commands if your script needs them.

A common use case is handing files over to another pipeline: prepare them in the action and start the other pipeline with --payload. The target pipeline can react to them with payload conditions:

bash
bdy pipeline run start deploy -b main --payload ./release
$

Updating

npm:

bash
sudo npm update -g bdy
sudo npm install -g bdy@latest
$$

Homebrew:

bash
brew upgrade bdy
$

APT:

bash
sudo apt-get update && sudo apt-get upgrade bdy
$

Chocolatey:

powershell
choco upgrade bdy

Last modified on Oct 26, 2026