rtk-ai/rtk

Add wrappers for common dev/infra commands (kubectl exec, uv run, sqlc, flutter, git checkout/remote, gh auth, npm install/test, npx jest --watch, env-prefixed go run)

Open

#1,711 创建于 2026年5月5日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clienhancementhelp wantedpriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

Summary

After running rtk discover against ~30 days of Claude Code transcripts (~34k Bash calls across Go/TS/Python/Flutter projects + EKS/OKE infra work), here are commands that show up in high volume but have no rtk equivalent today. Filing one consolidated issue rather than fragmenting.

Counts (30d, single user)

Command Count Typical form
kubectl exec 87 kubectl exec deployment/api -n ns -- ...
uv run 89 uv run --extra dev pytest tests/...
sqlc generate 88 ~/go/bin/sqlc generate
flutter run 55 flutter run -d chrome --web-port=4000
npm install 67 npm install 2>&1
npm test 103 npm test -- foo.test.tsx
npx jest --watch (subset of 381 npx jest) npx jest --watch — note: npx jest without --watch does rewrite
node (script runner) 80 node tools/lint-prisma-injection.mjs
go run (env-prefixed) 74 DATABASE_URL=postgres://... go run ./...
git checkout 336 git checkout -b scratch/...
git remote 126 git remote -v
gh auth 316 gh auth status
lsof 172 lsof -nP -iTCP:5173 -sTCP:LISTEN
pkill 104 pkill -f "mcp-chrome-..."

Notes

  • npx jest --watch specifically exits 1 from rtk rewrite even though npx jest (no --watch) rewrites fine. Watch-mode flags should probably pass through with a rewrite, or at least short-circuit cleanly.
  • git checkout / git remote are surprising omissions given git status/log/diff/add/commit/push/pull are all wrapped. Output for these is short and rarely needs filtering, but consistency matters — agents reach for rtk git ... and lose the rewrite.
  • gh auth status output is small but called constantly in multi-account workflows. Low savings, high volume.
  • kubectl exec is the big k8s gap — long output (logs, shells), called regularly during debugging.
  • uv run pytest mirrors npx jest pattern — runner-prefix + test command.
  • flutter run has noisy hot-reload chatter that would benefit from filtering.

Suggestion

Prioritize by token impact: kubectl exec > uv run pytest > flutter run > npm test/install > node <script> > git checkout/remote > gh auth > lsof/pkill.

Happy to test rewrites on real workloads if you ship a branch.

Side note (separate concern)

rtk discover's "Already using RTK: N (0%)" appears to count literal rtk strings in transcript tool_input.command, which stores the pre-hook command. When the PreToolUse hook rewrites via updatedInput, discover doesn't see it — so hit rate looks ~0% even when rtk gain shows 77.8% lifetime savings. Worth a separate issue if you want one filed.

贡献者指南