feat(cli): rework developer CLI with non-blocking tasks and GitHub CI checks

Rebuild the developer CLI and interactive TUI from the ground up using
Bubble Tea v2, Lip Gloss v2, and non-blocking background workers. Adds
support for background docker pulls with live per-layer byte progress,
build log streaming, interactive container shells, dynamic sidebar
tabs (logs / build / ci), and gh cli integration to view or watch CI checks.
This commit is contained in:
Thomas Camlong committed 2026-08-21 15:40:04 +02:00
1 parent 4c475b8c0a
commit 7710abcf26
50 files changed
+7228 -2520

No files matched your search

+31 -17
View File
@@ -378,27 +378,29 @@ func IsPortConflict(err error) bool {
strings.Contains(message, "failed programming external connectivity")
}
func Stop(name string) error {
cmd := exec.Command("docker", "stop", name)
out, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("%w: %s", err, strings.TrimSpace(string(out)))
}
return nil
func Stop(name string) error { return StopContext(context.Background(), name) }
func Restart(name string) error { return RestartContext(context.Background(), name) }
func Remove(name string) error { return RemoveContext(context.Background(), name) }
// The context-aware variants let a background job be cancelled while the daemon
// is still thinking, which matters when Docker is wedged and the user wants the
// interface back.
func StopContext(ctx context.Context, name string) error {
return runContainerCommand(ctx, "stop", name)
}
func Restart(name string) error {
cmd := exec.Command("docker", "restart", name)
out, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("%w: %s", err, strings.TrimSpace(string(out)))
}
return nil
func RestartContext(ctx context.Context, name string) error {
return runContainerCommand(ctx, "restart", name)
}
func Remove(name string) error {
cmd := exec.Command("docker", "rm", "-f", name)
out, err := cmd.CombinedOutput()
func RemoveContext(ctx context.Context, name string) error {
return runContainerCommand(ctx, "rm", "-f", name)
}
func runContainerCommand(ctx context.Context, args ...string) error {
out, err := exec.CommandContext(ctx, "docker", args...).CombinedOutput()
if err != nil {
return fmt.Errorf("%w: %s", err, strings.TrimSpace(string(out)))
}
@@ -425,3 +427,15 @@ func FollowLogs(name string) error {
cmd.Stderr = os.Stderr
return cmd.Run()
}
func ExecInteractive(ctx context.Context, name string, command ...string) error {
if len(command) == 0 {
command = []string{"sh"}
}
args := append([]string{"exec", "-it", name}, command...)
cmd := exec.CommandContext(ctx, "docker", args...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
}