You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add rtk mysql — token-optimized MySQL client output (parity with rtk psql) #3130
RTK already wraps psql but not mysql. In a Claude Code agent workflow doing DB reporting, mysql is one of the top unhandled commands — 34 invocations in the last 30 days (per rtk discover) — and the raw result sets (wide tables, many rows) are exactly the large tool-output RTK is built to shrink. Today they pass through raw.
Request
A rtk mysql wrapper analogous to rtk psql that executes the query and returns a token-optimized rendering of the result set:
compact column widths
repeated-value elision
row truncation with an "N more rows" footer
null/blank normalization
…plus a rewrite-registry entry so mysql … auto-rewrites through the Claude Code hook.
Invocation patterns to handle
mysql --defaults-file=<cnf> -e "SQL" — must preserve --defaults-file (credentials are never passed on the CLI)
mysql -h <host> -u <user> <db> -e "SQL"
batch mode -B (TSV) and table mode -t
Example
mysql --defaults-file=/tmp/.my.cnf -t -e "SELECT ..."
→
rtk mysql --defaults-file=/tmp/.my.cnf -t -e "SELECT ..."
Why it matters
rtk psql already proves the pattern works for Postgres; MySQL parity would close one of the largest remaining raw-output gaps for teams whose reporting/analytics runs against MySQL.
Filed from findings via rtk discover (rtk 0.38.0, hook v3).
Add an rtk mysql wrapper with token-optimized result-set rendering (parity with existing rtk psql) plus a rewrite-registry entry; well-specified with concrete invocation patterns and usage data (34 unhandled calls/30d).
📁 Relevant files
src/filters/psql.rs
src/registry.rs
filters.toml
Triaged automatically by wshm · This is an automated analysis, not a human review.
Hi! I'd like to take this on. My plan is to mirror the existing rtk psql implementation, adapting the parsing for MySQL's output — handling both batch mode (-B, TSV) and table mode (-t), and making sure --defaults-file is preserved untouched (never logging credential-bearing args).
Heads-up that I'm fairly new to the rtk codebase, so I'll spend a little time studying how psql and the command/rewrite registration work before I open a PR — so this may take me a bit longer than a regular contributor, but I'll keep it moving. I would very much appreciate your feedback on the PR and the approach if that's okay?
Hey there, I've explored around, and found the codebase quite easy to navigate actually. I'm an engineer at plane.so, and I worked on a similar project a few years back, pasting the link here.
Activity
pszymkowiak commentedon Jul 21, 2026
🔍 Automated Triage
featuremediumSummary
Add an
rtk mysqlwrapper with token-optimized result-set rendering (parity with existingrtk psql) plus a rewrite-registry entry; well-specified with concrete invocation patterns and usage data (34 unhandled calls/30d).📁 Relevant files
src/filters/psql.rssrc/registry.rsfilters.tomlTriaged automatically by wshm · This is an automated analysis, not a human review.
henit-chobisa commentedon Jul 22, 2026
Hi! I'd like to take this on. My plan is to mirror the existing rtk psql implementation, adapting the parsing for MySQL's output — handling both batch mode (-B, TSV) and table mode (-t), and making sure --defaults-file is preserved untouched (never logging credential-bearing args).
Heads-up that I'm fairly new to the rtk codebase, so I'll spend a little time studying how psql and the command/rewrite registration work before I open a PR — so this may take me a bit longer than a regular contributor, but I'll keep it moving. I would very much appreciate your feedback on the PR and the approach if that's okay?
henit-chobisa commentedon Jul 22, 2026
Hey there, I've explored around, and found the codebase quite easy to navigate actually. I'm an engineer at plane.so, and I worked on a similar project a few years back, pasting the link here.
https://x.com/planepowers/status/1783503768690340077
That's the reason, I found the codebase quite familiar and easy to navigate. I've raised the PR, for resolving this. Thanks!! 😄