rtk-ai/rtk
Voir sur GitHubExpand Go ecosystem coverage: go mod, go list, gotestsum, govulncheck, staticcheck, buf, goreleaser
Open
#1 990 ouverte le 20 mai 2026
area:clienhancementhelp wantedpriority:medium
Métriques du dépôt
- Stars
- (48 085 stars)
- Métriques de merge PR
- (Merge moyen 11j 1h) (45 PRs mergées en 30 j)
Description
Summary
RTK currently compresses go test, go build, go vet, and golangci-lint. Other Go-ecosystem commands run as passthrough with no token savings. This issue proposes adding compression for high-ROI tools.
Current Coverage
| Command | Strategy |
|---|---|
go test |
Inject -json, NDJSON aggregation |
go build |
Errors-only |
go vet |
Drop location noise |
golangci-lint |
Force JSON, cluster by rule |
Everything else: passthrough.
Proposed Additions (by ROI)
Tier 1 — high verbosity, high frequency
go mod tidy— dropgo: finding/downloading, keepadded/removed/upgradeddeltas. ~80% savings.go list -m all/go list ./...— inject-json, reuse NDJSON parser. ~80% savings.go mod graph— dedupe edges, depth-limit, optional--deep. ~70% savings.gotestsum— alias to existinggo testNDJSON path (gotestsum forwards-json). Trivial.govulncheck— JSON mode, one line per findingOSV-id pkg@ver call-path. ~85% savings on findings.staticcheck— JSON mode, reuse golangci clustering. ~60-80% savings.
Tier 2
buf lint/buf build—--error-format=json, cluster like golangci-lint.goreleaser release— line-filter progress bullets, keep section headers + artifacts + failures. ~80% savings.gofmt -l/goimports -l— count + first 10 paths. TOML filter sufficient.go generate ./...— bracket each//go:generate, keep only failed children.air— strip startup banner, keep build errors.delvenon-interactive — strip startup banner only.
Tier 3
migrate, sqlc generate, ent generate, swag init, wire, mockgen, revive, errcheck, ineffassign, benchstat.
Implementation Patterns
- Rust module +
GoCommandsenum branch:go mod,go list(subcommand ofgo). - Top-level enum +
src/cmds/go/<tool>_cmd.rs: gotestsum, govulncheck, staticcheck, buf, goreleaser (separate binaries). - TOML filter under
src/filters/: gofmt, goimports, air, migrate, swag (line-oriented, no JSON).
Data Point — current go test compression
Tested on minimal demo (2 pass / 2 fail / 1 skip, 1 package):
| Variant | Bytes | Lines |
|---|---|---|
go test -json (RTK input) |
3194 | 27 |
rtk go test (compressed) |
384 | 9 |
| Reduction | 88% | 67% |
Real-world projects with multiple packages have higher ratios.
Recommended Order
go mod tidy(line filter, easy)go list(reuse NDJSON parser)gotestsum(alias, trivial)govulncheck(new module, JSON)staticcheck(new module, JSON, reuse clustering)buf lint/buf buildgoreleaser- TOML filters:
gofmt -l,goimports -l
Open Questions
gotestsumauto-detect via PATH or require explicitrtk gotestsum ...?go mod graphdeep mode — full DAG to tempfile + path, or always inline?- Should TOML filters move to
src/filters/go/subdir once 3+ exist?