PHPackages                             jtsternberg/buddy-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jtsternberg/buddy-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

jtsternberg/buddy-cli
=====================

CLI tool for interacting with Buddy.works CI/CD pipelines

v1.4.0(1mo ago)013MITPHPPHP ^8.0

Since Jan 23Pushed 1mo agoCompare

[ Source](https://github.com/jtsternberg/buddy-cli)[ Packagist](https://packagist.org/packages/jtsternberg/buddy-cli)[ Docs](https://github.com/jtsternberg/buddy-cli)[ RSS](/packages/jtsternberg-buddy-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (12)Versions (9)Used By (0)

The (Un)official Buddy Works CLI
================================

[](#the-unofficial-buddy-works-cli)

[![buddy-cli](.github/buddy-cli-splash.jpg)](.github/buddy-cli-splash.jpg)

A PHP CLI tool for managing [Buddy.works](https://buddy.works) CI/CD pipelines from the command line. Run pipelines, inspect executions, view logs, manage variables, and export/import pipeline configurations as YAML—all without leaving your terminal.

Works great with LLM assistants for iterative debugging workflows. See [Debugging Pipeline Executions](docs/Debugging-Pipeline-Executions.md) for a real-world example.

Note

The official [buddy-works/buddy-cli](https://github.com/buddy-works/buddy-cli) has been abandoned. This project provides a maintained alternative.

Installation
------------

[](#installation)

### As a Project Dependency

[](#as-a-project-dependency)

```
composer require jtsternberg/buddy-cli --dev
```

The `buddy` command is available via `vendor/bin/buddy`.

### Global Installation

[](#global-installation)

```
composer global require jtsternberg/buddy-cli
```

Ensure `~/.composer/vendor/bin` is in your PATH, then run `buddy` from anywhere.

### From Source

[](#from-source)

```
git clone https://github.com/jtsternberg/buddy-cli.git
cd buddy-cli
composer install
./bin/buddy self:install
```

This creates a symlink in `~/.local/bin/buddy` (or similar) for pathless execution.

Shell Completion
----------------

[](#shell-completion)

Enable tab-completion for commands, options, and arguments. Supports bash, zsh, and fish.

### Bash (`~/.bashrc`):

[](#bash-bashrc)

```
# buddy-cli completions
eval "$(buddy completion bash)"
```

### Zsh (`~/.zshrc`):

[](#zsh-zshrc)

First generate the completion file:

```
mkdir -p ~/.buddy-cli/completions
buddy completion zsh > ~/.buddy-cli/completions/_buddy
```

Then add to `~/.zshrc` (before `compinit` if you call it manually):

```
# buddy-cli completions
fpath=(~/.buddy-cli/completions $fpath)
```

### Fish (`~/.config/fish/config.fish`):

[](#fish-configfishconfigfish)

```
# buddy-cli completions
buddy completion fish | source
```

Authentication
--------------

[](#authentication)

### Personal Access Token (Recommended)

[](#personal-access-token-recommended)

Set the `BUDDY_TOKEN` environment variable, or run:

```
buddy config:set token
```

### OAuth Login

[](#oauth-login)

#### 1. Create OAuth Application

[](#1-create-oauth-application)

Create an OAuth app at [buddy.works/api/apps](https://app.buddy.works/my-apps).

For the callback URL, run `buddy login --test` to start the callback server and verify it works:

```
buddy login --test
# Outputs: http://127.0.0.1:8085/callback
# Hit the URL in browser or curl to confirm, then register it in Buddy
```

#### 2. Configure Credentials &amp; Login

[](#2-configure-credentials--login)

Provide your OAuth client ID and secret via one of:

```
# Option A: Store in config (recommended)
buddy config:set client_id
buddy config:set client_secret

# Option B: Environment variables
export BUDDY_CLIENT_ID=
export BUDDY_CLIENT_SECRET=
```

Then login:

```
buddy login
```

Or pass directly to login command:

```
buddy login --client-id= --client-secret=
```

This opens your browser to authenticate with Buddy and saves your token automatically.

Configuration
-------------

[](#configuration)

Configuration can be set via environment variables, config files, or command-line flags.

### Environment Variables

[](#environment-variables)

```
BUDDY_TOKEN=
BUDDY_WORKSPACE=
BUDDY_PROJECT=
```

### Config Files

[](#config-files)

- User config: `~/.config/buddy-cli/config.json`
- Project config: `.buddy-cli.json` (in project root)

```
{
  "workspace": "my-workspace",
  "project": "my-project"
}
```

### Precedence

[](#precedence)

1. Command-line flags (`--workspace`, `--project`)
2. Environment variables
3. Project config (`.buddy-cli.json`)
4. User config (`~/.config/buddy-cli/config.json`)

Commands
--------

[](#commands)

Tip

Run `buddy  --help` for detailed documentation including all options, supported fields, and examples.

### Pipelines

[](#pipelines)

```
buddy pipelines:list                      # List all pipelines
buddy pipelines:show                  # Show pipeline details
buddy pipelines:show  --yaml          # Output native Buddy YAML configuration
buddy pipelines:run                   # Run a pipeline
buddy pipelines:run  --branch=main    # Run with specific branch
buddy pipelines:run  --wait           # Run and wait for completion
buddy pipelines:retry                 # Retry last failed execution
buddy pipelines:cancel                # Cancel running execution
buddy pipelines:get                   # Get pipeline config as native YAML file
buddy pipelines:create              # Create new pipeline from native YAML file
buddy pipelines:update          # Update pipeline from native YAML
buddy pipelines:settings              # Show pipeline settings (metadata + variables)
buddy pipelines:settings  --update   # Update pipeline settings from YAML
```

### Executions

[](#executions)

```
buddy executions:list --pipeline=              # List recent executions
buddy executions:show  --pipeline=    # Show execution details
buddy executions:show  --pipeline= --logs     # Include action logs
buddy executions:show  --pipeline= --summary  # Compact status overview
buddy executions:failed  --pipeline=           # Show failed action details
buddy executions:failed  --pipeline= --analyze # Categorize error patterns
buddy executions:actions  --pipeline=          # List actions with execution IDs
buddy executions:action-logs   --pipeline=  # Logs for one action
```

### Actions

[](#actions)

```
buddy actions:list --pipeline=                 # List actions in a pipeline
buddy actions:show  --pipeline=     # Show action details
buddy actions:show  --pipeline= --yaml  # Output as YAML configuration
buddy actions:create  --pipeline=        # Create new action from YAML file
buddy actions:update   --pipeline=  # Update action from YAML
buddy actions:delete  --pipeline=   # Delete action (with confirmation)
buddy actions:delete  --pipeline= --force  # Delete without confirmation
```

### Projects

[](#projects)

```
buddy projects:list                       # List projects in workspace
buddy projects:show                 # Show project details
```

### Variables

[](#variables)

```
buddy vars:list                           # List environment variables
buddy vars:list --project=          # Filter by project
buddy vars:list --pipeline=           # Filter by pipeline
buddy vars:show                       # Show variable details
buddy vars:set                # Create or update variable
buddy vars:set   -p  # Scope to project
buddy vars:set   --encrypted  # Encrypt the value
buddy vars:delete                     # Delete variable (with confirmation)
buddy vars:delete  --force            # Delete without confirmation
```

### Configuration

[](#configuration-1)

```
buddy config:show                         # Show current configuration
buddy config:set              # Set configuration value
buddy config:clear                        # Clear all configuration
buddy config:validate                     # Validate config is complete
buddy config:validate --test-api          # Also test API connectivity
```

Documentation
-------------

[](#documentation)

- [Ask questions in NotebookLM](https://notebooklm.google.com/notebook/c4d8bcb1-2333-490c-9885-667be4d0ef22) - Interactive Q&amp;A about buddy-cli
- [Debugging Pipeline Executions](docs/Debugging-Pipeline-Executions.md) - Real-world walkthrough of diagnosing and fixing a failed pipeline run

Options
-------

[](#options)

All commands support:

- `--workspace`, `-w` - Workspace name
- `--project`, `-p` - Project name
- `--json` - Output as JSON

Claude Code Plugin
------------------

[](#claude-code-plugin)

This repository includes a [Claude Code plugin](claude-plugin/.claude-plugin/README.md) for AI-assisted CI/CD management. Control deployments and debug pipelines using natural language.

### Quick Example

[](#quick-example)

```
You: "Deploy to production and wait for it to finish"
You: "Why did my last build fail?"
You: "Show me what's currently running"

```

### Installation

[](#installation-1)

In Claude Code:

```
/plugin marketplace add jtsternberg/buddy-cli
/plugin install buddy-cli

```

Or point to your existing copy of the buddy-cli repository:

```
/plugin marketplace add ./buddy-cli
/plugin install buddy-cli

```

### Features

[](#features)

- **Skills**: Auto-invoked when discussing pipelines, deployments, or build failures
- **Commands**: `/buddy-cli:deploy`, `/buddy-cli:status`, `/buddy-cli:logs`
- **Agent**: CI/CD specialist for complex multi-step workflows

See [claude-plugin/.claude-plugin/README.md](claude-plugin/.claude-plugin/README.md) for full documentation.

Development
-----------

[](#development)

This repository uses [Beads](https://github.com/steveyegge/beads) for issue tracking—an AI-native system that stores issues directly in the repo. See [.beads/README.md](.beads/README.md) for details.

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Total

5

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/204f41ec695703a1363f27b8e65667efbb491e78a15f5dba772bfce88a7a277b?d=identicon)[jtsternberg](/maintainers/jtsternberg)

---

Top Contributors

[![jtsternberg](https://avatars.githubusercontent.com/u/1098900?v=4)](https://github.com/jtsternberg "jtsternberg (137 commits)")[![tjdsneto](https://avatars.githubusercontent.com/u/10434886?v=4)](https://github.com/tjdsneto "tjdsneto (2 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (1 commits)")

---

Tags

clidevopsbuddypipelinescicdbuddy works

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jtsternberg-buddy-cli/health.svg)

```
[![Health](https://phpackages.com/badges/jtsternberg-buddy-cli/health.svg)](https://phpackages.com/packages/jtsternberg-buddy-cli)
```

###  Alternatives

[acmephp/acmephp

Let's Encrypt client written in PHP

649155.1k](/packages/acmephp-acmephp)[laminas/laminas-cli

Command-line interface for Laminas projects

563.7M54](/packages/laminas-laminas-cli)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[spresnac/laravel-create-user-cli

Create a user-entry from cli with artisan

2354.8k1](/packages/spresnac-laravel-create-user-cli)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
