Files
kctl-tui/CONTRIBUTING.md
T
stefankoelle fed2b44c28 fix: upgrade CI to Go 1.25 and document self-update feature
- 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
2026-08-22 09:50:27 +02:00

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/kctl or internal/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 --verbose is active.

Commits

  • One logical change per commit.
  • Imperative mood in commit messages ("Add ...", "Fix ...", "Remove ...").
  • No co-authors in commits.

Pull Requests

  1. Fork the repo and create a feature branch.
  2. Make your changes following the style guide above.
  3. Run go vet and go test.
  4. Open a PR against main with a clear description of what changed and why.
  5. 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.