Kubiya CLI Reference
The Kubiya CLI is a comprehensive command-line interface for managing the full Kubiya platform, including Serverless Agents, Serverless Tools, Local Runners, Policy Management, and MCP Server functionality.🚀 Installation
🎯 Global Options
These options work with all commands:| Option | Description |
|---|---|
--help, -h | Show help message |
--version | Show version information |
--config | Custom config file path |
--api-key | Override API key |
--api-url | Override API endpoint |
🤖 Agent Management
Manage serverless AI agents with conversational capabilities.kubiya agent list
List all available agents in your organization.--output, -o: Output format (text,json,yaml)--limit: Maximum number of results (default: 50)
kubiya agent describe
Get detailed information about a specific agent.🛠️ Tool Management
Execute and manage serverless container-based tools.kubiya tool list
List available tools from all sources.--source: Filter by source UUID--output, -o: Output format (text,json,yaml)
kubiya tool exec
Execute a tool with live streaming output.--name: Tool name (required)--runner: Runner to use (auto,default, or specific runner)--content: Tool content/script--type: Tool type (docker,python,bash, etc.)--image: Docker image--args: Tool arguments inKEY=VALUEformat--env: Environment variables inKEY=VALUEformat--integration: Integration templates to apply--with-file: File mappings insource:destinationformat--with-volume: Volume mappings--timeout: Execution timeout in seconds--skip-policy-check: Skip policy validation--json: Tool definition as JSON--json-file: Tool definition from JSON file
kubiya tool search
Search for tools across all sources.kubiya tool describe
Get detailed information about a specific tool.🏃 Runner Management
Manage execution infrastructure and monitor health.kubiya runner list
List all available runners.--output, -o: Output format--health: Filter by health status
kubiya runner describe
Get detailed runner information including health metrics.kubiya runner create
Create a new runner deployment.--name: Runner name (required)--type: Runner type--description: Runner description
🔄 Workflow Management
Execute workflows from YAML or JSON files with comprehensive control.kubiya workflow execute
Execute a workflow from a file (supports both YAML and JSON with auto-detection).--runner: Runner to use for execution--var: Workflow variables inKEY=VALUEformat--watch, -w: Watch execution output (default: true)--skip-policy-check: Skip policy validation
kubiya workflow test
Test a workflow by executing it with validation.--runner: Runner for testing--var: Test variables
kubiya workflow generate
Generate workflows from natural language descriptions.kubiya workflow compose
Compose and execute workflows from natural language.🛡️ Policy Management (OPA)
Comprehensive Open Policy Agent (OPA) integration for access control.kubiya policy list
List all OPA policies.--output, -o: Output format (text,json)
kubiya policy create
Create a new OPA policy.--name, -n: Policy name (required)--env, -e: Target environments (comma-separated)--file, -f: Policy file path--policy, -p: Policy content directly--validate: Validate policy before creating (default: true)
kubiya policy get
Get details of a specific policy.kubiya policy update
Update an existing policy.kubiya policy delete
Delete a policy.--confirm: Confirm deletion
kubiya policy validate
Validate a policy without creating it.kubiya policy test-tool
Test tool execution permissions.--tool, -t: Tool name (required)--args: Tool arguments as JSON--args-file: Tool arguments from file--runner, -r: Runner name
kubiya policy test-workflow
Test workflow execution permissions.--file, -f: Workflow definition file (required)--params: Workflow parameters as JSON--runner, -r: Runner name
🔧 MCP Server
Model Context Protocol server for AI integration.kubiya mcp serve
Start the MCP server for AI assistant integration.--allow-platform-apis: Enable platform management tools--config: Configuration file path--port: Server port (for HTTP mode)--host: Server host (for HTTP mode)
kubiya mcp setup
Setup MCP integration for various AI assistants.claude: Claude Desktopcursor: Cursor IDEvscode: VS Code (Continue extension)custom: Custom integration
📚 Knowledge Management
Manage and query the organizational knowledge base.kubiya knowledge query
Query the knowledge base with intelligent search.--limit: Maximum results--output, -o: Output format
🔗 Source Management
Manage tool sources and repositories.kubiya source list
List all tool sources.kubiya source add
Add a new tool source.kubiya source discover
Discover tools in a source without adding it.🔑 Secrets Management
Manage secrets and credentials securely.kubiya secret list
List available secrets.🎮 Interactive Mode
kubiya browse
Interactive browser for sources and tools.kubiya chat
Interactive chat mode with AI agents.--agent: Specific agent to chat with--interactive: Enable interactive mode
🔧 Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
KUBIYA_API_KEY | Required - Your Kubiya API key | None |
KUBIYA_API_URL | Kubiya API endpoint | https://api.kubiya.ai |
KUBIYA_DEFAULT_RUNNER | Default runner for tool execution | auto |
KUBIYA_OPA_ENFORCE | Enable policy enforcement | false |
KUBIYA_TOOL_TIMEOUT | Default tool timeout in seconds | 300 |
KUBIYA_TOOL_OUTPUT_FORMAT | Default output format | text |
KUBIYA_SKIP_HEALTH_CHECK | Skip runner health checks | false |
Configuration File
The CLI stores configuration in~/.kubiya/config.yaml:
MCP Server Configuration
MCP server configuration in~/.kubiya/mcp-server.json:
🚀 Common Workflows
1. Setting up MCP for Claude Desktop
2. Tool Development and Testing
3. Workflow Deployment Pipeline
4. Policy-Based Access Control
🔍 Troubleshooting
Common Issues
-
API Key Not Set
-
Runner Health Issues
-
Policy Errors
-
MCP Connection Issues
Debug Mode
Enable detailed logging for troubleshooting:🆘 Getting Help
📚 Additional Resources
- Documentation: https://docs.kubiya.ai
- GitHub: https://github.com/kubiyabot/cli
- API Keys: Get your API key
- Examples: GitHub Examples
The Kubiya CLI provides enterprise-grade automation capabilities with comprehensive policy enforcement, making it perfect for production AI applications that need reliable, secure, and auditable execution.