rtk-ai/rtk

Add python3 / python rewrite support

Open

#928 aperta il 30 mar 2026

Vedi su GitHub
 (5 commenti) (3 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:clieffort-mediumenhancementgood first issuehelp wantedpriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

Problem

rtk discover shows ~691 python3 heredoc commands and ~289 python3 script invocations not being rewritten. rtk rewrite has no rule for python3 or python.

Patterns to support

Pattern Example Count (30d)
python3 << 'PYEOF' Inline heredoc scripts ~691
python3 script.py Script execution ~289
python -m <module> Module execution (unittest, py_compile) ~83

Reproduction

$ rtk rewrite "python3 << 'PYEOF'"
# exit 1, no output — no rewrite rule

$ rtk rewrite "python3 scripts/my_script.py"
# exit 1, no output

$ rtk rewrite "python -m unittest discover -s ."
# exit 1, no output

Environment

  • rtk 0.30.1
  • macOS (Darwin 23.5.0)

Impact

Python heredoc scripts often produce large DataFrames/dicts as output — high token savings potential. Combined ~1,063 commands over 30 days.

Guida contributor