CLI Reference

The cdktr command-line interface provides commands for managing principals, agents, workflows, and logs.

Command Structure

cdktr <command> [subcommand] [options]

Available Commands

ui

Launch the Terminal User Interface.

cdktr ui [--principal-host HOST] [--principal-port PORT]

See TUI Chapter for details.

start

Start a principal or agent instance.

cdktr start <principal|agent> [OPTIONS]

See Start Commands for details.

task

Manage and trigger workflows.

cdktr task <run|list> [OPTIONS]

See Task Commands for details.

logs

Query execution logs.

cdktr logs query [OPTIONS]

See Logs Commands for details.

init

Initialize a new cdktr project.

cdktr init [PATH]

See Init Command for details.

Global Options

--help, -h

Show help information.

cdktr --help
cdktr start --help
cdktr task run --help

--version, -V

Show version information.

cdktr --version

Environment Variables

Many CLI options can be set via environment variables:

  • CDKTR_PRINCIPAL_HOST - Default principal host
  • CDKTR_PRINCIPAL_PORT - Default principal port
  • CDKTR_LOG_LEVEL - Log verbosity (DEBUG, INFO, WARN, ERROR)
  • CDKTR_WORKFLOW_DIR - Workflow directory path
  • CDKTR_DB_PATH - Database file path

Examples

Start a complete setup

# Terminal 1: Start principal
cdktr start principal

# Terminal 2: Start agent
cdktr start agent

# Terminal 3: Open TUI
cdktr ui

Trigger a workflow

cdktr task run my-workflow

Query logs

cdktr logs query --workflow my-workflow --status FAILED

Next Steps