Skip to content

Kubiya CLI Reference

This page contains the complete reference for the Kubiya CLI, a standalone binary tool for managing sources, tools, and testing in your Kubiya environment.

Global Options

These options are available for all Kubiya CLI commands:

Option Description
--help Show help message and exit
--version Show version and exit
--verbose Enable verbose output
--quiet Suppress non-error output
--color Control colored output (auto, always, never)
--output Output format (text, json)
--config Path to config file
--profile Profile to use from config file
--api-key API key for authentication
--token Authentication token
--url Base URL for Kubiya API

Source Commands

kubiya source list

List all sources in your environment.

Option Description
--full Show detailed information
--output Output format (text, json)

kubiya source add

Add a new source.

Option Description
--name, -n Source name
--inline File containing inline tool definitions
--inline-stdin Read inline tool definitions from stdin
--runner Runner name for the source
--config Path to dynamic configuration file
--yes Skip confirmation prompts
--branch Branch to use (for Git repositories)

kubiya source scan

Scan a directory or repository for tools.

Option Description
--interactive Enable interactive mode
--output Output format (text, json)
--config Path to dynamic configuration file
--local Scan local directory instead of remote URL
--repo Repository URL to scan
--branch Branch to scan
--path Relative path within repository
--remote Git remote name (default: origin)
--force Force scan even with uncommitted changes
--add Stage changes after scan (can specify patterns)
--push Push changes after scan
--commit-msg Commit message for changes
--runner Runner name for source

kubiya source update

Update an existing source.

Option Description
--name, -n New source name
--inline File containing inline tool definitions
--inline-stdin Read inline tool definitions from stdin
--runner Runner name for the source
--config Path to dynamic configuration file
--yes Skip confirmation prompts

kubiya source sync

Synchronize a source to get the latest tools.

Option Description
--mode, -m Sync mode (interactive, non-interactive, ci)
--branch, -b Branch to sync
--force, -f Force sync
--auto-commit Automatically commit changes

kubiya source delete

Remove a source.

Option Description
--force, -f Force delete without confirmation
--yes Skip confirmation prompts

kubiya source debug

Debug source-related issues.

Option Description
--full Show full debug information
--output Output format (text, json)
--raw Show raw API response

kubiya source load

Load a source temporarily without creating it permanently.

Option Description
--name, -n Source name
--inline File containing inline tool definitions
--inline-stdin Read inline tool definitions from stdin
--runner Runner name for the source
--branch Branch to use (for Git repositories)

kubiya source describe

Get detailed information about a specific source.

Option Description
--output Output format (text, json)

Tool Commands

kubiya tool list

List all tools or tools from a specific source.

Option Description
--source Source ID to list tools from
--full Show detailed information
--output Output format (text, json)

Search for tools.

Option Description
--source Source ID to search in
--output Output format (text, json)

kubiya tool describe

Show detailed information about a tool.

Option Description
--output Output format (text, json)
--source Source ID containing the tool

kubiya tool test

Test a specific tool.

Option Description
--param Parameter for the tool (can be used multiple times)
--source Source ID containing the tool
--output Output format (text, json)
--interactive Enable interactive mode

Test Commands

kubiya test run

Run tests from a directory.

Option Description
--output Output format (text, json)
--fail-fast Stop on first failure
--pattern File pattern to match test files
--tags Filter tests by tags
--parallel Run tests in parallel
--jobs Number of parallel jobs

kubiya test report

Generate a test report.

Option Description
--format Report format (text, json, html)
--output Output file path
--title Report title

Environment Variables

The Kubiya CLI supports the following environment variables:

Variable Description
KUBIYA_API_KEY API key for authentication
KUBIYA_TOKEN Authentication token
KUBIYA_URL Base URL for Kubiya API
KUBIYA_CONFIG Path to config file
KUBIYA_PROFILE Profile to use from config file
KUBIYA_COLOR Control colored output (auto, always, never)
KUBIYA_OUTPUT Default output format (text, json)
KUBIYA_VERBOSE Enable verbose output (1=true, 0=false)
KUBIYA_QUIET Suppress non-error output (1=true, 0=false)

Configuration File

The Kubiya CLI supports a configuration file to store frequently used options. By default, it looks for .kubiya/config.yaml in your home directory.

Example configuration file:

YAML
profiles:
  default:
    api_key: "your-api-key"
    url: "https://api.kubiya.ai"
  development:
    api_key: "dev-api-key"
    url: "https://dev-api.kubiya.ai"
    color: "always"
    verbose: true

To use a specific profile:

Bash
kubiya --profile development source list

Exit Codes

The Kubiya CLI uses the following exit codes:

Code Description
0 Success
1 General error
2 Command line usage error
3 Authentication error
4 Communication error
5 Resource not found
6 Permission denied
7 Configuration error
8 Validation error
9 Test failure
10 Timeout error