Add first few commands - #2
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces an experimental kedify Go CLI with local credential storage, an interactive Bubble Tea-based login prompt, and a list clusters command that fetches clusters from the Kedify API and outputs JSON/YAML.
Changes:
- Add CLI entrypoint and command routing for
loginandlist clusters, including global--apiurloverride and-o/--outputformatting. - Implement credential read/write to
~/.config/kedify/credentials.jsonand a Bubble Tea + Lip Gloss interactive (hidden) token prompt. - Add a simple HTTP API client that paginates through
/clustersand aggregates results.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents CLI features, authentication, build, and usage examples. |
| Makefile | Adds a make build target to compile ./cmd/kedify into ./bin/kedify. |
| internal/tui/login.go | Implements Bubble Tea login prompt + stdin fallback for token entry. |
| internal/output/output.go | Adds JSON/YAML encoding helper for command output. |
| internal/config/config.go | Implements credential persistence and env-based API URL override helper. |
| internal/cli/run.go | Adds core CLI routing, global flags parsing, and list clusters flag parsing/help. |
| internal/cli/output.go | Thin wrapper to centralize output writing. |
| internal/cli/login.go | Implements kedify login command and help text. |
| internal/api/client.go | Implements HTTP client + pagination logic for listing clusters. |
| go.mod | Defines module and dependencies (Bubble Tea, Lip Gloss, YAML). |
| go.sum | Adds dependency checksums. |
| cmd/kedify/main.go | Adds program entrypoint wiring stdin/stdout/stderr into the CLI runner. |
| .gitignore | Ignores .agents. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Josef Karasek <karasek.jose@gmail.com>
Signed-off-by: Josef Karasek <karasek.jose@gmail.com>
Signed-off-by: Josef Karasek <karasek.jose@gmail.com>
Signed-off-by: Josef Karasek <karasek.jose@gmail.com>
Signed-off-by: Josef Karasek <karasek.jose@gmail.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
list clustersSigned-off-by: Josef Karasek <karasek.jose@gmail.com>
zroubalik
left a comment
There was a problem hiding this comment.
blgtm
please also add this workflow: https://github.com/kedify/agent/blob/main/.github/workflows/repo-backup.yml
This PR introduces the first working version of the
kedifyCLI with a small but solid command surface, reusable internal structure, interactive terminal UX where it helps, and CI/release scaffolding.The CLI now supports:
kedify loginkedify list clusterskedify get clusterIt uses:
kongfor command parsing, flags, and help textbubbleteafor interactive flowslipglossfor stylingCommand Overview
kedify loginstderrsostdoutstays clean for shell usage.https://dashboard.dev.kedify.io/api-keys.~/.config/kedify/credentials.json.kedify list clusters--output/-owith:text(default)jsonyamlkedify get cluster [name-or-id]UUID Behavior in
get clusterThis PR adds explicit UUID-aware behavior to
kedify get cluster.How it works:
kedify get clustercalls:GET /v1/clusters/<uuid>That gives us:
Output Behavior
All resource commands support:
--output-oFormats:
textjsonyamlDesign intent:
textis for humansjson/yamlare for scripts and automationstderr, keepingstdoutsafe for pipingInternal Structure
The repo was organized to keep CLI concerns separated:
internal/cliinternal/apiinternal/configinternal/outputinternal/tuicmd/kedifyThis keeps the command layer testable and makes it easier to grow from
kedify <verb> <noun>over time.Testing
The layout was made unit-test friendly, and tests were added around:
CI and Release Work
This PR also adds supporting project automation:
golangci-lintbehavior for better CI reproduction