Skip to main content
The KDX CLI (kdx) is a modern, kubectl-style command-line interface for the Kodexa AI Platform. It provides a powerful and familiar interface for managing Kodexa resources directly from the terminal.

Why KDX CLI?

  • Kubectl-Style Interface: Familiar commands like get, describe, create, apply, and delete
  • Dynamic Resource Discovery: Automatically discovers resources from your platform’s OpenAPI specification
  • Profile-Based Authentication: Manage multiple environments with ease
  • Production Safety: Confirmation prompts prevent accidental changes to production
  • GitOps Ready: Built-in metadata sync for version-controlled infrastructure
  • Multiple Output Formats: Interactive tables, JSON, and YAML for any workflow

Installation

Pre-release Builds

To try the latest development build before it’s officially released, install kdx-dev. It installs as a separate binary so it can coexist with the stable kdx:
Pre-release builds are updated automatically from the develop branch and may contain features or fixes not yet in the stable release. Use brew upgrade kdx-dev to get the latest dev build.

Scoop (Windows)

Pre-release Builds (Windows)

To try the latest development build on Windows, install kdx-dev via Scoop. It installs as a separate binary so it can coexist with the stable kdx:
Pre-release builds are updated automatically from the develop branch and may contain features or fixes not yet in the stable release. Use scoop update kdx-dev to get the latest dev build.

Other Installation Methods

See the full installation guide for Docker, direct binary downloads, and building from source.

Quick Start

1. Configure Authentication

Recommended: Environment Variables Set environment variables for your Kodexa environments:
Add these to your shell profile (~/.bashrc, ~/.zshrc) to make them permanent. Alternative: Profiles You can also use profiles for managing multiple environments:
For production (with safety prompts):
The --production flag enables confirmation prompts before destructive operations to prevent accidental changes.

2. Discover Resources

See what resources are available in your environment:

3. List Resources

Use the get command to list resources:

4. Get Specific Resources

Retrieve details about a specific resource:

5. Create Resources

Create resources declaratively using YAML files:
workspace.yaml
Apply the configuration:

Working with Multiple Environments

Switch between profiles easily:

Output Formats

KDX CLI supports multiple output formats:

Getting Help

KDX CLI has built-in help for every command:

Configuration

All KDX CLI configuration is stored in ~/.kodexa/config.yaml. The CLI now enforces secure defaults (config directory 0700, file 0600) so API keys are readable only by your user. Keep keys out of shell history and prefer profiles or environment variables over inlining secrets in commands.

Validation & Safety

  • Requests sent via apply and run are validated against the live OpenAPI schema before they reach the API, catching missing/invalid fields early.
  • Production-marked profiles prompt before destructive actions; use --skip-production-confirm only for trusted automation.
  • Module applies package implementation files into a temporary ZIP (unique per run) to avoid overwriting local files; the archive is cleaned up automatically.

Plugins

Resource-specific plugins are registered automatically—no separate kdx plugins command is required. Current built-ins:
  • kdx project create --template <tpl> --org <org> --name <name> to spin up projects from templates.

Next Steps

Full KDX CLI Guide

Learn about all KDX CLI capabilities and features

Installation Guide

Comprehensive installation options for all platforms

Profile Configuration

Deep dive into profile management

Resource Operations

Learn advanced CRUD operations