Kestractl
A production-grade CLI for managing Kestra workflows — designed from command architecture to release pipeline, and built end-to-end through agentic coding in Go.
Overview
kestractl is the official command-line interface for Kestra — the open-source workflow orchestration platform. It lets engineers deploy flows, trigger executions, manage namespaces, and synchronize files directly from the terminal, without touching the UI.
I owned this project end-to-end: from defining which commands to expose, how they should behave, and how the configuration system should work, to the overall Go architecture and the release pipeline. The implementation itself is a fully agent-coded project — I designed every interface and decision, while AI wrote the code under my direction.
My Role
Command Design
Defined the full command surface: which verbs to expose, how flags should compose, how errors surface to users, and what the output format should look like for both humans and scripts.
Architecture
Designed the Go package structure, the configuration resolution strategy (flags → env vars → config file → defaults), and the multi-context system that lets engineers switch between development, staging, and production instances.
Agentic Implementation
Directed AI agents to write all Go code — from Cobra command definitions and Viper config wiring to the Kestra Go SDK integration and e2e test suite. Every architectural decision was mine; every line of code was generated under that direction.
Release Pipeline
Set up the full CI/CD pipeline with GoReleaser — cross-platform binaries for macOS, Linux, and Windows, a convenience install script, and automated GitHub Releases with changelogs.
Architecture
The CLI is built around a single principle: minimal abstraction, maximum predictability. Operators shouldn't have to guess what a command will do or why it behaves differently in different environments.
Configuration Resolution Order
- 1CLI flags — highest priority, always wins
- 2Environment variables —
KESTRACTL_*prefix - 3Config file —
~/.kestractl/config.yaml - 4Defaults — sensible fallbacks for local development
The multi-context system mirrors how kubectl works: engineers maintain named profiles for each Kestra environment and switch between them with a single command. No more copy-pasting URLs and tokens.
Command Surface
Flows
List, retrieve, deploy, and validate workflow definitions. Deploy supports namespace override and continues-on-error flags for CI pipelines where partial failures are acceptable.
Executions
Trigger flow executions with inputs and optional wait-for-completion. Useful for scripted workflows that need to block until a pipeline finishes before the next step runs.
Namespaces
List and query namespaces with filtering — a fast way to inspect how workflows are organized across a Kestra instance without opening the UI.
Namespace Files
Upload, download, and delete files within namespaces — including recursive directory operations. Critical for teams that manage shared SQL, Python scripts, or config files alongside their workflows.
Config & Contexts
Add, list, switch, and remove named contexts. Each context holds a Kestra API endpoint and credentials, making environment switching a one-liner.
On Agentic Coding
kestractl is an experiment in what it means to be an engineer when AI writes the code. The answer, at least for this project, is that the engineering work shifts — but doesn't shrink.
The hard thinking happened before any code was written: what commands does an operator actually need? What's the right configuration model? Where does the CLI fit in a GitOps workflow? How should errors be structured so they're useful in both interactive and scripted contexts?
Those decisions shaped a project that feels intentional rather than assembled. The AI handled the Go plumbing — Cobra wiring, Viper bindings, HTTP client setup, test scaffolding. I handled the product thinking. The result is a tool I'd actually reach for.
Tech Stack
- •Go — chosen for its single-binary distribution, fast startup, and excellent CLI ecosystem
- •Cobra — the standard Go CLI framework, used by kubectl and Docker
- •Viper — hierarchical configuration management with env var and file support
- •Kestra Go SDK — official API client for interacting with Kestra's REST API
- •GoReleaser — cross-platform binary builds and automated GitHub Releases
Try kestractl
Open source. One install command.