kectl
v1.0.9
Published
Kubeease CLI
Readme
kectl
kectl is a lightweight CLI for Kubeease-style APIs, built with Cobra in a resource-first format:
kectl [resource] [action]
The goal is to provide a simple and consistent command experience for common platform resources such as pipelines, plugins, and runners.
Global Flags
| Flag | Env Var | Description |
|------|---------|-------------|
| --url | KUBEEASE_URL | API target (host:port or http(s)://host:port) |
| --access-token | KUBEEASE_ACCESS_TOKEN | Bearer token for auth |
| --log-level | - | silent|error|warn|info|debug (default: silent) |
| --format | - | json|markdown (default: markdown) |
| --pretty | - | Pretty-print json or render markdown for terminal |
| --data | - | JSON payload string |
| --data-path | - | Path to JSON payload file |
| --data-encode | - | Base64-encoded JSON payload |
Payload flags are mutually exclusive: --data / --data-path / --data-encode can only use one at a time.
Example (PowerShell/cmd friendly):
kectl pipeline create --data-path ./request.json
kectl pipeline create --data-encode eyJpZCI6Inh4eCJ9Basic Architecture
- CLI entrypoint:
cmd/kectl/main.gostarts the command runtime. - Command core:
pkg/core/defines root flags and dynamic resource/action routing. - Resource services:
internal/resources/<resource>/contains per-resource service implementations. - API client layer:
internal/kubeease/handles backend client setup and request context. - Version metadata:
internal/version/stores version information exposed by the CLI.
At runtime, kectl resolves the requested resource and action, maps them to the corresponding service method, and executes the API call through the shared client layer.
