Kubiya LogoKubiya Developer Docs

CLI Reference

Command-line interface for the Kubiya Agentic Platform.

Kubiya CLI

Current Version: v1.0.14

Release Notes

Examples

The Kubiya Command-Line Interface (CLI) provides command-line access to the Kubiya Agentic Platform. It allows developers, DevOps engineers, and platform administrators to manage resources, interact with AI agents, and automate workflows directly from the terminal or within CI/CD pipelines.

Quick Start

Install the CLI

# For macOS with Homebrew
brew tap kubiyabot/kubiya && brew install kubiya
 
# For Linux (Debian/Ubuntu)
sudo apt-get update && sudo apt-get install kubiya-cli
 
# Using curl installer (Linux/macOS)
curl -sSL https://get.kubiya.ai | bash
 
# Docker container
docker pull kubiyabot/cli:latest
docker run --rm -it kubiyabot/cli:latest

See installation for more options and detailed instructions.

Authenticate

# Set API token as environment variable
export KUBIYA_API_KEY=YOUR_API_KEY
 
# For persistent configuration, add to your shell profile
echo 'export KUBIYA_API_KEY=YOUR_API_KEY' >> ~/.bashrc  # or ~/.zshrc

See authentication for more options.

Start Using Commands

# Chat with an agent interactively
kubiya chat --interactive
 
# or specify a teammate
kubiya chat --teammate "devops-expert" --interactive
 
# Execute tools
kubiya tools execute deploy-app --args '{"app_name":"my-app"}'
 
# Browse tools interactively
kubiya browse

Core Features

Interactive Chat

# Start an interactive chat session
kubiya chat --interactive
 
# Chat with a specific teammate
kubiya chat --teammate "devops-expert" --interactive
 
# Send message with context files
kubiya chat "Explain this code" --files "main.py,config.yaml"

Tool Execution

# List available tools
kubiya tools list
 
# Execute a specific tool
kubiya tools execute deploy-app --args '{"app_name":"my-app"}'
 
# Browse tools interactively
kubiya browse

Knowledge Management

# List knowledge items
kubiya knowledge list
 
# Create new knowledge
kubiya knowledge create --title "AWS Best Practices" --content "content.md"
 
# Search knowledge
kubiya knowledge search "kubernetes scaling"

Teammate Management

# List all teammates/agents
kubiya teammates list
 
# Create a new teammate
kubiya teammates create --name "devops-expert" --file "teammate-config.yaml"
 
# Chat with a specific teammate
kubiya chat --teammate "devops-expert" --interactive

Multi-Environment Support

# Create environment scripts
cat > dev-env.sh << EOF
#!/bin/bash
export KUBIYA_API_KEY=DEV_TOKEN
export KUBIYA_API_URL=https://dev.kubiya.ai/v1
EOF
 
# Switch between environments
source ./dev-env.sh
 
# Use environment variables for a specific command
KUBIYA_API_KEY=PROD_TOKEN kubiya tools execute deploy-app

CI/CD Integration

# Execute in CI pipeline
kubiya tools execute deploy-service \
  --args '{"service":"api","env":"production","version":"1.2.0"}' \
  --output json
  
# Create notification
kubiya chat "Deployment completed successfully" \
  --teammate "deployment-notifier" \
  --channel "#deployments"

Need Help?

Use kubiya --help or append --help to any command to see detailed usage information and examples.

On this page