mirror of
https://github.com/skoelle/kctl-tui.git
synced 2026-09-17 20:10:24 +00:00
- Upgrade go-version from 1.24 to 1.25 in build.yml (required by go-selfupdate v1.6.0) - Add kctl-tui update command and interactive startup check to README.md - Document new features in CHANGELOG.md - Update Go version requirement to 1.25+ in README.md and CONTRIBUTING.md - Add Phase 5 (Self-update) to PLAN.md roadmap
2.3 KiB
2.3 KiB
Contributing to kctl-tui
Thanks for your interest in contributing! This document explains how to get started.
Development Setup
git clone https://github.com/skoelle/kctl-tui.git
cd kctl-tui
go mod download
Prerequisites
- Go 1.25+
- kubectl, k9s, tmux (or psmux on Windows)
- An active Kubernetes cluster for integration testing
Running Locally
go run ./cmd/kctl-tui
Building
go build -o kctl-tui ./cmd/kctl-tui
With Version Tag
go build -ldflags "-X main.version=v0.2.0" -o kctl-tui ./cmd/kctl-tui
Project Structure
cmd/kctl-tui/ Entry points (main, full mode, panel mode)
internal/config/ YAML config loading and template resolution
internal/kctl/ Pure logic (secret diffing, template engine)
internal/kubeexec/ kubectl/aws/tmux wrappers (side effects only)
Architecture Rules
- Pure logic goes into
internal/kctlorinternal/config— no exec, no I/O. - Side effects (running kubectl, aws, tmux) go into
internal/kubeexec. - UI lives in
cmd/kctl-tui/— Bubble Tea models, views, handlers. - Unit tests cover pure logic only. Side-effect packages are tested via integration/manual tests.
Testing
go vet ./... # static analysis
go test ./... # unit tests
There are no integration tests yet. Manual testing against a real cluster is expected for UI and kubeexec changes.
Code Style
- Standard Go formatting (
gofmt). - No comments unless the logic is non-obvious.
- Error messages should be actionable — tell the user what to fix.
- Log commands with
kubeexec.VerboseLog()when--verboseis active.
Commits
- One logical change per commit.
- Imperative mood in commit messages ("Add ...", "Fix ...", "Remove ...").
- No co-authors in commits.
Pull Requests
- Fork the repo and create a feature branch.
- Make your changes following the style guide above.
- Run
go vetandgo test. - Open a PR against
mainwith a clear description of what changed and why. - Reference any related issues.
Issues
- Use the provided issue templates.
- Include your OS, Go version, and kctl-tui version.
- For bugs: steps to reproduce, expected vs actual behavior.
License
By contributing, you agree that your contributions will be licensed under the MIT License.