Conversation
Removes vendored .claude copies of skills (cli-developer, code-documenter, golang-patterns, golang-pro, kubernetes-specialist) and agents (code-reviewer, docs-lookup) now provided via installed plugins.
- security-reviewer agent: rewrite from npm/node to Go (command/path injection, tar-slip, crypto, govulncheck) with SCRT Docker-wrapper specifics; drop dangling security-review skill reference - go-reviewer agent: add SCRT project conventions (CS-5, CTX-1, ERR-1, CC-1) and Docker-wrapper review notes - README: cut rule-of-three and promotional filler from the intro
Phase 0 — dependency groundwork:
- Adopt charm.land/{lipgloss,bubbletea,bubbles}/v2; Go directive bumped to
1.25.0 (CI tracks go.mod via go-version-file). Port style.go and the
spinner to v2 APIs (Model.View now returns tea.View).
- charmbracelet/log keeps an indirect lipgloss v1 (no v2 logger exists);
project code imports only the v2 charm.land paths.
Phase 1 — CLI ergonomics:
- Wrap the cobra root with charm.land/fang/v2: styled help/errors,
--version, manpage generation, and shell completion.
- Make import --repo a required flag (cobra-enforced).
- Add live container-name tab-completion to enter/stop/destroy.
- Extract buildRoot seam; add cmd/scrt tests (wiring, required flag,
completion guard).
Docs: README "Go 1.24+" -> "1.25+"; libraries.md records the v2 paths and
the approved huh/fang additions. Root help text tightened.
- Replace the destroy y/N fmt.Scanln with tui.Confirm (huh interactive on a TTY, accessible-mode stdin fallback; user abort = cancel). - Rewrite the pull tag dialog with huh Select + conditional Input, removing tview/tcell from pull.go. - Add `config init`: a guided huh form over image/shell/workdir and the host-net/X11/GPU toggles, prefilled from the existing config and saved via config.Save. RunConfigWizard returns a new Config (immutable input). - Add internal/tui tests for stripImageTag and the nonEmpty validator (package previously had none). Adds charm.land/huh/v2; Go directive bumped to 1.25.8.
- Press '/' to open a filter bar that live-filters the container list by name, image, or state (case-insensitive). Enter keeps the filter, Esc clears it. A master list is retained so refreshes preserve the filter. - Press 'a' to toggle a 5s background auto-refresh. The ticker only does timing; auto/busy state is read and written on the main goroutine inside QueueUpdateDraw, so it is race-free, and it refreshes silently to keep the hint bar intact. The ticker stops when the browser exits. - Extract a shared scheduleHintRestore and a pure filterContainers helper; add a table-driven test for the latter.
- Add Manager.Logs (and Backend.Logs): TTY-aware log streaming that returns the raw stream for -it containers and demuxes stdout/stderr via stdcopy for non-TTY ones. - Extract the tar pack/unpack and path validation into a shared internal/container/transfer.go (TarFile, UntarTo, ValidateTransferPath). UntarTo guards against tar-slip and bounds extraction with io.CopyN; extracted files use owner-only perms (0600/0700). Refactor the HTTP API handlers to reuse these instead of inline tar building. - Wire new list-browser actions: 'l' opens a scrollable log page, 'u' uploads a host file into the container, 'g' downloads a container path to the host. New list_logs.go and list_copy.go keep list.go focused. - Move the transfer-path validation test to the container package and add pack/unpack round-trip and tar-slip rejection tests. README: document the interactive browser and guided-setup features.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernizes SCRT's CLI and interactive TUI and refreshes the
.claudetooling. Delivered in five focused phases (plus earlier reviewer/tooling cleanup), each independently green undermake all(vet +-racetests + build).CLI ergonomics
charm.land/fang/v2→ styled help/errors,--version, manpage generation, and shell completion.enter/stop/destroy.import --repois now a cobra-enforced required flag.Interactive prompts (huh)
destroyconfirmation, thepulltag picker, and a newconfig initsetup wizard now usecharm.land/huh/v2(interactive on a TTY, accessible-mode stdin fallback).pull.gono longer depends on tview/tcell.Richer container browser (
scrt list)/filter (by name/image/state, live),atoggleable 5s auto-refresh (race-free),lscrollable log viewer,u/gfile upload/download — alongside the existing enter/stop/destroy/backup.Backend / shared internals
Manager.Logs(+Backend.Logs): TTY-aware log streaming — raw for-itcontainers,stdcopy-demuxed otherwise.internal/container/transfer.go(TarFile,UntarTo,ValidateTransferPath), reused by both the TUI and the HTTP API (removes duplicated inline tar logic).UntarToadds tar-slip protection and bounded extraction (io.CopyN), with owner-only perms (0600/0700).Dependency / toolchain
charm.land/*v2 modules (lipgloss/bubbletea/bubbles), which requires Go 1.25 (go.mod bumped; CI tracks it viago-version-file; README updated). An indirect lipgloss v1 remains transitively viacharmbracelet/log(no v2 logger exists); project code imports only v2..claudetooling (earlier commits on this branch)security-reviewerandgo-revieweragents on Go/Docker security; removed local skills/agents now provided by installed plugins (accounts for the large deletion count).Commits
83e6424feat(cli): migrate to charm v2 stack and add fang CLI polishde06aa3feat(tui): add huh prompts, pull picker, and config wizardb3f7afffeat(tui): add container search/filter and live auto-refresh2e9abddfeat(tui): add in-browser log viewer and file copy20c3a49chore(claude): remove local skills/agents superseded by plugins1d2443cdocs(claude): refocus reviewers on Go security; tighten README introTest plan
Automated (done):
make all—go vet,go test -race, build — all greenstripImageTag,nonEmpty,filterContainers;ValidateTransferPath, tar pack/unpack round-trip, tar-slip rejectiongosecreviewed (tightened extraction perms; remaining G304 is mitigated bysafeJoinand documented)Manual (recommended before merge — interactive paths can't run headless):
scrt listin a TTY:/filter,aauto-refresh,llogs,uupload,gdownload,e/s/d/bscrt config initwizard writes a valid~/.scrt.conf.jsonscrt pulltag picker;scrt destroy <p>confirm (and--forcebypass)scrt completion zsh/ bash / fish output is usable