Skip to main content
The Kubiya CLI is available for multiple platforms and can be installed using package managers or direct download.

Automated Installation Script

The easiest way to install Kubiya CLI with support for worker setup:
# Basic installation
curl -fsSL https://raw.githubusercontent.com/kubiyabot/cli/main/install.sh | bash

# With worker setup (recommended for production)
curl -fsSL https://raw.githubusercontent.com/kubiyabot/cli/main/install.sh | bash -s -- --worker --queue-id=my-queue

# Interactive configuration
curl -fsSL https://raw.githubusercontent.com/kubiyabot/cli/main/install.sh | bash -s -- --config

# Install and start worker in daemon mode
curl -fsSL https://raw.githubusercontent.com/kubiyabot/cli/main/install.sh | bash -s -- --worker --queue-id=prod-queue --mode=daemon --start

Installation Script Options

OptionDescription
--verbose or -vEnable verbose output
--worker or -wSetup worker after installation
--queue-id <id> or -q <id>Worker queue ID (required with —worker)
--mode <mode> or -m <mode>Worker mode: local, docker, or daemon
--start or -sStart worker immediately after installation
--config or -cInteractive configuration setup
--force-binary or -fForce binary installation (skip package managers)
--help or -hShow help message

Platform-Specific Installation

macOS

brew update
brew tap kubiyabot/kubiya
brew install kubiya

Direct Download

VERSION=v2.5.5
curl -LO "https://github.com/kubiyabot/cli/releases/download/${VERSION}/kubiya-cli-darwin-arm64"
chmod +x kubiya-cli-darwin-arm64
sudo mv kubiya-cli-darwin-arm64 /usr/local/bin/kubiya

Linux

Automated Installation

curl -fsSL https://raw.githubusercontent.com/kubiyabot/cli/main/install.sh | bash

Manual Installation

  • x86_64
  • ARM64
VERSION=v2.5.5
curl -LO "https://github.com/kubiyabot/cli/releases/download/${VERSION}/kubiya-cli-linux-amd64"
chmod +x kubiya-cli-linux-amd64
sudo mv kubiya-cli-linux-amd64 /usr/local/bin/kubiya

APT Repository (Debian/Ubuntu)

The APT repository provides automatic updates and better integration with your system package manager.
# Add Kubiya repository
curl -fsSL https://apt.kubiya.ai/gpg.key | sudo apt-key add -
echo "deb https://apt.kubiya.ai stable main" | sudo tee /etc/apt/sources.list.d/kubiya.list

# Install CLI
sudo apt-get update
sudo apt-get install kubiya-cli

Build from Source

Prerequisites

  • Go 1.21 or later
  • Git
  • Make

Build Steps

# Clone the repository
git clone https://github.com/kubiyabot/cli.git
cd cli

# Build the binary
make build

# Install locally
make install

# Verify installation
kubiya version

Development Build

# Build with race detection
make build-race

# Run tests
make test

# Build for multiple platforms
make build-all

Verify Installation

After installation, verify that the CLI is working correctly:
# Check version
kubiya version

# Verify help is accessible
kubiya --help

# Test with a simple command (requires API key)
export KUBIYA_API_KEY="your-api-key"
kubiya agent list
Expected output:
Kubiya CLI v2.5.5
Build: 2024-11-21
Commit: abc123def

Post-Installation Setup

Enable Shell Completion

  • Bash
  • Zsh
  • Fish
# Add to ~/.bashrc
echo 'source <(kubiya completion bash)' >> ~/.bashrc
source ~/.bashrc

Configure Environment Variables

# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export KUBIYA_API_KEY="your-api-key"
export KUBIYA_BASE_URL="https://api.kubiya.ai/api/v1"
See Authentication for detailed configuration options.

Docker Installation

For containerized environments, you can use the official Docker image:
# Pull the latest image
docker pull ghcr.io/kubiyabot/kubiya-cli:latest

# Run CLI commands
docker run --rm \
  -e KUBIYA_API_KEY="your-api-key" \
  ghcr.io/kubiyabot/kubiya-cli:latest \
  agent list

# Create an alias for convenience
alias kubiya='docker run --rm -e KUBIYA_API_KEY="$KUBIYA_API_KEY" ghcr.io/kubiyabot/kubiya-cli:latest'

Kubernetes Installation

Deploy the CLI as a pod in your Kubernetes cluster:
apiVersion: v1
kind: Pod
metadata:
  name: kubiya-cli
  namespace: kubiya
spec:
  containers:
  - name: cli
    image: ghcr.io/kubiyabot/kubiya-cli:latest
    command: ["sleep", "infinity"]
    env:
    - name: KUBIYA_API_KEY
      valueFrom:
        secretKeyRef:
          name: kubiya-secrets
          key: api-key
Execute commands:
kubectl exec -it kubiya-cli -n kubiya -- kubiya agent list

Upgrade

Homebrew

brew update
brew upgrade kubiya

Linux Script

curl -fsSL https://raw.githubusercontent.com/kubiyabot/cli/main/install.sh | bash

Manual Upgrade

Download and replace the binary with the latest version from the releases page.

Troubleshooting

Permission Denied

If you encounter permission errors:
# Make binary executable
chmod +x /path/to/kubiya

# Move to a directory in PATH
sudo mv kubiya /usr/local/bin/

Command Not Found

Ensure /usr/local/bin is in your PATH:
# Add to ~/.bashrc or ~/.zshrc
export PATH="/usr/local/bin:$PATH"

# Reload shell
source ~/.bashrc  # or source ~/.zshrc

SSL/TLS Errors

If you encounter certificate errors:
# Update CA certificates
# Ubuntu/Debian
sudo apt-get update && sudo apt-get install ca-certificates

# macOS
brew install ca-certificates

Next Steps