Skip to content

feat: v0.2.0 — K9s-style navigation, resource tree, fullscreen graph, pod logs/shell - #2

Open
shanisma wants to merge 52 commits into
vvrnv:masterfrom
shanisma:master
Open

shanisma wants to merge 52 commits into
vvrnv:masterfrom
shanisma:master

Conversation

@shanisma

@shanisma shanisma commented Nov 6, 2026

Copy link
Copy Markdown

Summary

This PR turns argo9s into a K9s-style navigator for Argo CD: applications are the home screen, ApplicationSets / projects / clusters are views you drill through to reach their apps, and every app opens onto the objects it manages — down to pod logs and a shell. It also adds a fullscreen resource graph with search, a richer describe (last sync errors, sync history), colored YAML, version info in the header, and a full README with a screenshot per view.

Everything below was recorded with argo9s --demo (offline sample data) — make screenshots regenerates all of it.

argo9s tour

What changes for users

Layout (K9s-style)

  • Header: context, read-only state, Argo CD / Kubernetes / argo9s versions, object counts, a per-view key menu, the logo.
  • Body in a titled frame — applications(argocd)[77] </filter> — and a footer pinned to the bottom with crumbs (<appsets> <applications>).
  • / and : prompts open in a box above the table.
  • Applications are the default view.

Applications

Drill-down navigation

enter on… opens
an application the tree of resources it manages
an ApplicationSet the applications it generated (owner references)
a project its applications
a cluster (:clusters) the applications deployed there
a context (:ctx) that connection — switch Argo CD instance / cluster without restarting

d always describes, esc goes back (after clearing the filter). Each view has its own columns (cluster / appset for apps, app counts for appsets / projects / clusters); KIND only appears in :all, NAMESPACE only when a list spans several.

ApplicationSets Apps of an ApplicationSet
Projects Clusters

Managed resources tree, logs and shell

  • enter on an app lists every managed object; Deployment ▸ ReplicaSet ▸ Pod expand in place.
  • Old ReplicaSets left by previous rollouts (0/0, no pods) are hidden by default; o toggles them.
  • l streams pod logs, s opens a shell (bash, falls back to sh). Multi-container pods now get a container picker — logs used to fail with a container name must be specified.
  • The shell uses the exec subresource like kubectl exec (websocket with SPDY fallback, raw TTY, resize forwarding) and hands the terminal over with tea.Exec.
Tree Container picker Logs

Fullscreen resource graph

g opens the graph fullscreen, laid out left → right like the Argo CD UI. The previous renderer truncated boxes, left floating connector fragments and scrolled poorly; it is replaced by a layered layout from nulab/autog drawn on a cell canvas.

  • The path from the selected object up to the app is drawn in bold.
  • h/l/j/k follow the drawing; pgup/pgdn/home/end jump within a column.
  • / searches objects, n/N cycle matches; tab jumps to the next unhealthy or out-of-sync object.
  • d / y / e / l / s / o act on the selected node.
  • Under 100 columns g falls back to the tree.
Graph Graph search

Describe and YAML

  • Application describe: destination, sources (multi-source aware), sync policy, last sync with every resource that failed, sync history newest first.
  • ApplicationSets show generators / template, projects show repos / destinations; both list their applications.
  • Describe for tree / graph nodes now describes the selected object (it used to show the app under the node's title).
  • YAML and describe get syntax coloring.
Describe YAML

Filters, keys and feedback

  • / is a case-insensitive regex (substring fallback, ! inverts) in lists, and filters lines in logs / YAML / describe.
  • home/end/pgup/pgdn everywhere; ctrl+c quits from any view; a hint shows when Caps Lock seems on (unbound uppercase key).
  • An indeterminate progress bar shows during slow loads; the initial Argo CD listing now runs inside the TUI instead of freezing the terminal for up to 60s.
  • Watch events no longer flash in the footer every few seconds (Argo CD rewrites app status on each reconcile).
  • ? help rewritten.

Filter

Bug fixes

  • Healthy ApplicationSets shown red with !: informational conditions (ErrorOccurred=False, ResourcesUpToDate=True) were treated as errors. Only real problems count now.
  • OutOfSync + Healthy apps shown red when they carried an error condition: rows now follow sync / health like the Argo CD UI (orange), and conditions only color the ! marker.
  • Logs on multi-container pods failed — container picker added.
  • y from the list left / filtering and e editing the previous YAML.
  • "Argo CD v0.1.0" under the logo looked like the Argo CD version; versions now live in the header.
  • Emoji ⏸ (suspended) had a terminal-dependent width that shifted the frame; replaced by ‖.

Under the hood

  • Go 1.27; direct dependencies upgraded (client-go 0.37, bubbletea 1.3.10, bubbles 1.0, cobra 1.10). Only direct deps were bumped: go get -u ./... pulls a kube-openapi incompatible with apimachinery 0.37.
  • New dependency: github.com/nulab/autog (pure Go, MIT) for the graph layout — it requires Go ≥ 1.25.
  • Release workflow builds with Go 1.27.x.
  • Argo CD version: /api/version on API connections, the argocd-server Deployment (app.kubernetes.io/version, else image tag) on Kubernetes connections.
  • --demo gained an ApplicationSet, three clusters, sync history, a failed sync, containers and logs so every view can be shown offline.
  • Version bumped to 0.2.0 (main.version, header, Makefile fallback).
  • Docs: README rewritten (tour of every view, keybinding tables, commands, filters, colors, internals); docs/screenshots/*.tape + make screenshots regenerate every image with VHS.
  • One commit per file, conventional commit messages.

Behaviour changes to note

  • enter on an application opens the resource tree; describe is d only (previously both).
  • The default view is applications instead of "all".
  • Building from source needs Go 1.27.
  • The pod shell needs a Kubernetes connection (not available over the Argo CD API yet).

Testing

  • go vet ./... and go test ./... pass; new unit tests cover owner / cluster extraction, ApplicationSet conditions, describe sections, per-view columns, row colors, filter semantics, tree expand / collapse, graph layout (no overlaps, left → right, every node reachable), graph search and column jumps, old ReplicaSet pruning, pod container parsing, YAML highlighting and the Caps Lock hint.
  • Exercised on a real Kubernetes connection (Argo CD with 77 apps / 15 appsets / 11 projects) and with --demo in tmux.
  • Not exercised against a live Argo CD API connection (--server) in this round — worth a smoke test before tagging.

After merge

Tag v0.2.0 to let GoReleaser publish the release and the Homebrew formula.

🤖 Generated with Claude Code

Shanmugathas Vigneswaran and others added 30 commits November 6, 2026 14:15
- go 1.27 (toolchain line dropped)
- k8s.io/{api,apimachinery,client-go} 0.33.1 -> 0.37.2
- bubbletea 1.3.5 -> 1.3.10, bubbles 0.21 -> 1.0, cobra 1.9 -> 1.10, sigs.k8s.io/yaml 1.6
- add github.com/nulab/autog (layered graph layout for the resource graph)

Only direct dependencies were bumped: `go get -u ./...` drags kube-openapi past
what apimachinery 0.37 supports (structured-merge-diff v6/v7 mismatch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
go.mod now requires Go 1.27 (autog needs >= 1.25).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`make screenshots` replays the VHS tapes in docs/screenshots to regenerate every
README image and the demo GIF from --demo data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Resource.Owner: ApplicationSet name from the Application ownerReferences
- Resource.Cluster: destination name, else server host ("in-cluster" for the local API)
- synthetic kinds Cluster and Context for the :clusters / :ctx views
- ApplicationSets only keep problem conditions (ErrorOccurred=True,
  ResourcesUpToDate=False): healthy appsets always carry informational
  conditions that wrongly painted them red with a "!" marker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Application: destination, sources (multi-source aware), sync policy, last sync
  (phase, message, every resource that failed to sync) and sync history, newest first
- ApplicationSet: generators and template
- AppProject: source repos and destinations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cribe

Adds field-extraction tests for Owner / Cluster, healthy vs broken ApplicationSet
conditions, and the describe sync-error / history sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kubernetes from discovery; Argo CD from the argocd-server Deployment
(app.kubernetes.io/version label, else the image tag). Shown in the header like
k9s' "K8s Rev".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PodShell implements Bubble Tea's ExecCommand so the TUI hands the terminal over
with tea.Exec and gets it back on exit. Same transport as kubectl exec
(websocket, SPDY fallback), raw TTY, bash with sh fallback, terminal size
forwarded to the pod.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SIGWINCH -> remotecommand TerminalSizeQueue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows consoles have no SIGWINCH: the initial size is sent, live resize is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PodContainers: reads the live Pod manifest (both backends), default-container
  annotation first, with state / ready / restarts
- PodShell: kubernetes connections only, on the app's destination cluster
- Versions: Argo CD (+ Kubernetes) version for the header
- demo: fake containers and access logs so --demo can show the picker and logs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An ApplicationSet owning the guestbook apps, three destination clusters, project
repos/destinations, sync history and a failed last sync on api-gateway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ui.Run returns the connection picked in :ctx; main reopens the session with it
and restarts the TUI. The connect context is now only used for the ping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layout
- header: context, type, namespace, Argo CD / K8s / argo9s versions, counts, a
  per-view key menu in columns and the logo; body in a titled frame
  (`applications(argocd)[77] </filter>`); footer pinned to the bottom with crumbs
- prompt (/ and :) in a box above the table, like k9s
- applications are the default view

Navigation
- enter: app -> managed resources tree; appset / project / cluster -> its
  applications (esc goes back); context -> switch connection
- d always describes; g opens the fullscreen graph (tree under 100 columns)
- :clusters and :ctx views; per-view crumbs
- home/end/pgup/pgdn everywhere; esc clears the filter first; ctrl+c quits from
  any view; a hint shows when Caps Lock seems on

Behaviour
- / is a case-insensitive regex (substring fallback, ! inverts) in lists and
  filters lines in logs / yaml / describe
- rows follow sync/health like the Argo CD UI (OutOfSync+Healthy is orange);
  conditions only color the "!" marker
- indeterminate progress bar for slow loads; the initial Argo CD listing runs
  inside the TUI instead of freezing the terminal
- watch events no longer flash in the footer
- describe and YAML get key coloring and the right title for graph/tree nodes
- rewritten ? help

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each view shows what matters for it (apps: cluster / appset / project / rev;
appsets / projects / clusters: app counts; ctx: type / target / active). KIND only
in :all, NAMESPACE only when the list spans several. Columns drop by priority
on narrow terminals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deployment > ReplicaSet > Pod, CRDs, Services... enter/space toggles, left/right
collapse/expand, d/y/e act on the object, l/s pod logs/shell, o old ReplicaSets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- layered layout by nulab/autog with orthogonal edges, transposed to read left ->
  right, drawn on a cell canvas with merged box-drawing junctions
- path from the selection to the app in bold orange, node details at the bottom
- navigation follows the drawing (h/l parent/child, j/k column, page/home/end)
- / search with n/N and match framing, tab / shift-tab to the next unhealthy or
  out-of-sync object
- old ReplicaSets (0/0, no pods) hidden by default, o toggles them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaced by graph_canvas.go (truncated boxes, broken connectors, bad scrolling).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Multi-container pods asked for a container and logs failed with "a container
name must be specified". l / s now list the containers (image, state, ready,
restarts) when there are several and go straight in when there is one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Logs stream the chosen container; logs / yaml / describe honour the / filter;
yaml and describe lines go through the highlighter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keys blue, strings light, numbers/bools orange, comments gray; never changes the
displayed text (URL values are not split as keys).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Argo CD v0.1.0" under the logo read as the Argo CD version; versions now live in
the header (argo9s / Argo CD / K8s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shanmugathas Vigneswaran and others added 22 commits November 6, 2026 14:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
filter -> appset -> its apps -> clusters -> resource tree -> graph + search ->
describe -> YAML, from --demo data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rnals

Contents, features, quick start, connections, one section and screenshot per
view, keybinding tables per view, commands, filters/regex, colors and markers,
read-only mode, CLI, config, how it works, development (make screenshots).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant