Kubiya LogoKubiya Developer Docs

Commands Reference

Complete reference for all Kubiya CLI commands, subcommands, flags and interactive modes.

CLI Commands Reference

The Kubiya CLI organizes commands into logical groups based on the resources they manage or the actions they perform. This page provides a comprehensive overview of all available commands, subcommands, flags, and interactive modes.

Command Help

For detailed usage information, use the --help flag with any command:

kubiya --help
kubiya teammates --help
kubiya tools execute --help

Command Structure

All Kubiya CLI commands follow a consistent pattern:

kubiya <command-group> <command> [subcommand] [options] [arguments]

For example:

kubiya teammates create --file teammate-config.yaml
kubiya tools execute deploy-app --args '{"app_name":"my-app"}' --output json

Global Flags

These flags work with most commands:

FlagDescription
--help, -hShow help for a command
--output, -oOutput format (json, yaml, table)
--verbose, -vEnable verbose output for debugging
--quiet, -qSuppress all output except errors
--configSpecify a custom config file path
--profileUse a specific profile from your config file

Commands by Group

General Commands

Basic CLI operations:

# Get CLI version
kubiya version
 
# Get environment information
kubiya env
 
# Check for and install updates
kubiya update
 
# Show config settings
kubiya config view
 
# Set config values
kubiya config set output-format json
 
# Create and manage profiles
kubiya config create-profile development
kubiya config use-profile production

Authentication:

# Interactive login
kubiya auth login
 
# Check auth status
kubiya auth status
 
# Log out
kubiya auth logout

Interactive Modes

Many commands support interactive mode where the CLI prompts for required inputs:

Interactive Chat

kubiya chat --interactive

In interactive chat, you can:

  • Type messages directly to the AI teammate
  • Use special commands like /file, /tools, /help
  • End the session with /exit or Ctrl+D

Interactive Tool Execution

kubiya tools execute deploy-app --interactive

This mode:

  • Prompts for each required tool parameter
  • Displays parameter descriptions and defaults
  • Validates input before submission

Interactive Teammate Creation

kubiya teammates create --interactive

This prompts for:

  • Basic teammate information
  • Instructions/system prompt
  • Tool selections
  • Knowledge source connections
  • And more

Development Workflows

Tool Development

1. Create a tool using the Python SDK:

from kubiya import tool
 
@tool
def aws_s3_list_buckets(region: str = "us-east-1"):
    """
    Lists all S3 buckets in the specified AWS region.
    
    Args:
        region: AWS region to check (default: us-east-1)
        
    Returns:
        List of S3 bucket names
    """
    import boto3
    client = boto3.client('s3', region_name=region)
    response = client.list_buckets()
    return [bucket['Name'] for bucket in response['Buckets']]

2. Package and deploy:

kubiya tools bundle my_tool.py --output s3-tool.yaml
kubiya tools apply --file s3-tool.yaml

Tool Source Management

For managing collections of tools in a repository:

# Add a Git repository as a tool source
kubiya source add --name "infra-tools" --url "https://github.com/org/infra-tools"
 
# List all tool sources
kubiya source list
 
# Sync changes from a tool source
kubiya source sync infra-tools
 
# Remove a tool source
kubiya source remove infra-tools

CI/CD Integration

Example GitLab CI pipeline for deploying tools:

stages:
  - validate
  - test
  - deploy
 
validate-tools:
  stage: validate
  script:
    - kubiya tools validate --dir ./tools/
 
test-tools:
  stage: test
  script:
    - for tool in tools/*/; do
        kubiya tools test --local --dir $tool --input $tool/tests/input.json;
      done
 
deploy-tools:
  stage: deploy
  script:
    - for tool in tools/*/; do
        kubiya tools apply --file $tool/kubiya.yaml;
      done
  only:
    - main

Environment Management

Managing multiple environments (dev, staging, prod):

# Set up environment profiles
kubiya config create-profile development
kubiya config create-profile staging
kubiya config create-profile production
 
# Configure each environment
kubiya config set api-key DEV_KEY --profile development
kubiya config set api-url https://dev.kubiya.ai/v1 --profile development
 
kubiya config set api-key STAGING_KEY --profile staging
kubiya config set api-url https://staging.kubiya.ai/v1 --profile staging
 
kubiya config set api-key PROD_KEY --profile production
 
# Switch active environment
kubiya config use-profile development
 
# Run commands against specific environment
kubiya tools execute deploy-app --args '{"env":"test"}' --profile staging

See individual command pages for more details on specific commands and subcommands.